1
0
Fork 0
mirror of https://github.com/thepaperpilot/The-Modding-Tree.git synced 2025-03-01 14:58:06 +00:00

Made generators not generate if the layer isn't active

This commit is contained in:
thepaperpilot 2021-03-04 14:55:07 -06:00
parent 61f2dbc7e1
commit 34e2f1a520

View file

@ -23,14 +23,14 @@ addLayer("generators", {
return new Decimal(0);
}
let gain = new Decimal(0);
if (player.generators.flowerActive) {
gain = gain.add(getJobLevel("flowers").div(10));
if (player.generators.flowerActive && (player.tab === "flowers" || player.flowers.timeLoopActive)) {
gain = gain.add(getJobLevel("flowers").div(25));
}
if (player.generators.studyActive) {
if (player.generators.studyActive && (player.tab === "study" || player.study.timeLoopActive)) {
gain = gain.add(getJobLevel("study").div(10));
}
if (player.generators.sandsActive) {
gain = gain.add(getJobLevel("sands").div(10));
if (player.generators.sandsActive && (player.tab === "sands" || player.sands.timeLoopActive)) {
gain = gain.add(getJobLevel("sands").div(5));
}
gain = gain.times(new Decimal(1.1).pow(getJobLevel(this.layer)));
return gain;