mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-12-03 13:21:34 +00:00
Fixed diff=0 and deactivated milestones
This commit is contained in:
parent
1a172ad61d
commit
e7b83e634d
4 changed files with 6 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue