mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 17:31:50 +00:00
Fixed Decimals not being kept on reset
This commit is contained in:
parent
4414580408
commit
4f99695b0a
4 changed files with 8 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
||||||
# The Modding Tree changelog:
|
# The Modding Tree changelog:
|
||||||
|
|
||||||
|
## v2.3.6 -
|
||||||
|
- Fixed keeping Decimal values on reset.
|
||||||
|
|
||||||
## v2.3.5 - 12/21/20
|
## v2.3.5 - 12/21/20
|
||||||
- Added resetTime, which tracks the time since a layer prestiged or was reset.
|
- Added resetTime, which tracks the time since a layer prestiged or was reset.
|
||||||
- A layer node will be highlighted red if one of its subtabs is highlighted red.
|
- A layer node will be highlighted red if one of its subtabs is highlighted red.
|
||||||
|
@ -8,7 +11,7 @@
|
||||||
- Other minor fixes.
|
- Other minor fixes.
|
||||||
|
|
||||||
## v2.3.4 - 12/16/20
|
## v2.3.4 - 12/16/20
|
||||||
- Added an node image feature.
|
- Added a node image feature.
|
||||||
- Resource display now always shows the amount of the currency the layer's gain is based on.
|
- Resource display now always shows the amount of the currency the layer's gain is based on.
|
||||||
- Added spacing between tree nodes.
|
- Added spacing between tree nodes.
|
||||||
- Another attempt to fix tooltip flickering.
|
- Another attempt to fix tooltip flickering.
|
||||||
|
|
|
@ -200,7 +200,7 @@ addLayer("c", {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
doReset(resettingLayer){ // Triggers when this layer is being reset, along with the layer doing the resetting. Not triggered by lower layers resetting, but is by layers on the same row.
|
doReset(resettingLayer){ // Triggers when this layer is being reset, along with the layer doing the resetting. Not triggered by lower layers resetting, but is by layers on the same row.
|
||||||
if(layers[resettingLayer].row > this.row) layerDataReset(this.layer) // This is actually the default behavior
|
if(layers[resettingLayer].row > this.row) layerDataReset(this.layer, ["points"]) // This is actually the default behavior
|
||||||
},
|
},
|
||||||
layerShown() {return true}, // Condition for when layer appears on the tree
|
layerShown() {return true}, // Condition for when layer appears on the tree
|
||||||
automate() {
|
automate() {
|
||||||
|
|
|
@ -663,7 +663,8 @@ function goBack() {
|
||||||
|
|
||||||
function layOver(obj1, obj2) {
|
function layOver(obj1, obj2) {
|
||||||
for (let x in obj2) {
|
for (let x in obj2) {
|
||||||
if (obj2[x] instanceof Object) layOver(obj1[x], obj2[x]);
|
if (obj2[x] instanceof Decimal) obj1[x] = new Decimal(obj2[x])
|
||||||
|
else if (obj2[x] instanceof Object) layOver(obj1[x], obj2[x]);
|
||||||
else obj1[x] = obj2[x];
|
else obj1[x] = obj2[x];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue