mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-12-03 13:21:34 +00:00
doReset on non-numeric rows
This commit is contained in:
parent
0de11fc7ac
commit
50e7ac23d2
3 changed files with 8 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
- Added buyable and clickable trees.
|
||||
- Fixed the passiveGeneration display.
|
||||
- Fixed "marked" feature.
|
||||
- doReset now will function on non-numeric rows besides "side".
|
||||
|
||||
## v2.6.1 - 6/7/21
|
||||
- Added global background style to mod.js.
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
|
||||
## CSS
|
||||
A good way to give your game a unique feel is to customize the appearance of it. Modifying the CSS files helps you to do that on a global level. The CSS is broken up into several files to make it easier to find what is relevant to you.
|
||||
CSS tip: Every component is automatically given a CSS class with the same name as its layer id. You can use this toapply something specifically for a single layer! You can also combine classes, such as .p.achievement or .c.locked, to change specific things in specific layers.
|
||||
CSS tip: Every component is automatically given a CSS class with the same name as its layer id. You can use this toapply something specifically for a single layer! You can also combine classes, such as .p.achievement or .c.locked, to change specific things in specific layers.
|
||||
|
||||
## Temp
|
||||
temp/tmp (either works) is a data structure that is a copy of layers (which contains all of the layer data you defined plus default things), but it replaces most functions with the result of calling those functions. e.g. if layer p's baseAmount is based on points, layers.p.baseAmount is a function that returns player.points. The player currently has 54 points, so temp.p.baseAmount is 54 (as a Decimal). You can use temp to improve performance.
|
|
@ -228,7 +228,9 @@ function doReset(layer, force=false) {
|
|||
player.points = (row == 0 ? decimalZero : getStartPoints())
|
||||
|
||||
for (let x = row; x >= 0; x--) rowReset(x, layer)
|
||||
rowReset("side", layer)
|
||||
for (r in OTHER_LAYERS){
|
||||
rowReset(r, layer)
|
||||
}
|
||||
prevOnReset = undefined
|
||||
|
||||
player[layer].resetTime = 0
|
||||
|
|
Loading…
Reference in a new issue