diff --git a/changelog.md b/changelog.md index b074645..67c2617 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,8 @@ # The Modding Tree changelog: - Fixed formatting for small negative numbers. +- Fixed divide by zero when a 0-second tick occurs. +- "deactivated" now also affects achievement/milestone unlocking. # v2.6.4.2 - 6/17/21 - Fixed a bug with the endgame screen. diff --git a/docs/layer-features.md b/docs/layer-features.md index ec24abc..bcf0b11 100644 --- a/docs/layer-features.md +++ b/docs/layer-features.md @@ -177,7 +177,7 @@ componentStyles: { - previousTab: **optional**, a layer's id. If a layer has a previousTab, the layer will always have a back arrow and pressing the back arrow on this layer will take you to the layer with this id. -- deactivated: **optional**, if this is true, hasUpgrade, hasChallenge, hasAchievement, and hasMilestone will return false for things in the layer, and you will be unable to buy or click things on the layer. You will have to disable effects of buyables, the innate layer effect, and possibly other things yourself. +- deactivated: **optional**, if this is true, hasUpgrade, hasChallenge, hasAchievement, and hasMilestone will return false for things in the layer, and you will be unable to buy or click things, or gain achievements/milestones on the layer. You will have to disable effects of buyables, the innate layer effect, and possibly other things yourself. ## Custom Prestige type (All of these can also be used by other prestige types) diff --git a/js/technical/displays.js b/js/technical/displays.js index 3566eff..28c8cff 100644 --- a/js/technical/displays.js +++ b/js/technical/displays.js @@ -64,7 +64,7 @@ function updateWidth() { function updateOomps(diff) { tmp.other.oompsMag = 0 - if (player.points.lte(new Decimal(1e100))) return + if (player.points.lte(new Decimal(1e100)) || diff == 0) return var pp = new Decimal(player.points); var lp = tmp.other.lastPoints || new Decimal(0); diff --git a/js/utils.js b/js/utils.js index 503cc62..75705d3 100644 --- a/js/utils.js +++ b/js/utils.js @@ -256,6 +256,7 @@ function toNumber(x) { } function updateMilestones(layer) { + if (tmp[layer].deactivated) return for (id in layers[layer].milestones) { if (!(hasMilestone(layer, id)) && layers[layer].milestones[id].done()) { player[layer].milestones.push(id) @@ -267,6 +268,7 @@ function updateMilestones(layer) { } function updateAchievements(layer) { + if (tmp[layer].deactivated) return for (id in layers[layer].achievements) { if (isPlainObject(layers[layer].achievements[id]) && !(hasAchievement(layer, id)) && layers[layer].achievements[id].done()) { player[layer].achievements.push(id)