mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-02-16 09:41:41 +00:00
Update docs and made base optional
This commit is contained in:
parent
dbff7b3f5f
commit
55bed8b9d6
4 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
# The Modding Tree changelog:
|
||||
|
||||
### v2.1.4 - 10/25/20
|
||||
- Added an infobox component. Thank you to thepaperpilot for this contribution!
|
||||
- Layer type is now optional, and defaults to "none".
|
||||
- Improved the look of bars and tab buttons.
|
||||
|
|
|
@ -53,6 +53,8 @@ These are the existing components, but you can create more in v.js:
|
|||
|
||||
- bar: Display a bar. The argument is the id of the bar to display.
|
||||
|
||||
- infobox: Display an infobox. The argument is the id of the infobox to display.
|
||||
|
||||
- toggle: A toggle button that toggles a bool value. The data is a pair that identifies what bool to toggle, [layer, id]
|
||||
|
||||
|
||||
|
|
|
@ -118,7 +118,8 @@ Key:
|
|||
|
||||
- exponent: Used as described above.
|
||||
|
||||
- base: **sometimes required**, required for "static" layers, used as described above.
|
||||
- base: **sometimes required**, required for "static" layers, used as described above. If absent, defaults to 2.
|
||||
Must be greater than 1.
|
||||
|
||||
- roundUpCost: **optional**, a bool, which is true if the resource cost needs to be rounded up.
|
||||
(use if the base resource is a "static" currency.)
|
||||
|
|
|
@ -127,6 +127,7 @@ function updateLayers(){
|
|||
if(layers[layer].gainMult === undefined) layers[layer].gainMult = new Decimal(1)
|
||||
if(layers[layer].gainExp === undefined) layers[layer].gainExp = new Decimal(1)
|
||||
if(layers[layer].type === undefined) layers[layer].type = "none"
|
||||
if(layers[layer].base === undefined || layers[layer].base <= 1) layers[layer].base = 2
|
||||
|
||||
let row = layers[layer].row
|
||||
if(!ROW_LAYERS[row]) ROW_LAYERS[row] = {}
|
||||
|
|
Loading…
Add table
Reference in a new issue