mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-10 12:01:32 +00:00
Added "buyables" which can fill the roles of Enhancers or Space Buildings or more! Also enables custom CSS on all components!
This commit is contained in:
parent
37286ac520
commit
2933537307
7 changed files with 223 additions and 25 deletions
js
12
js/temp.js
12
js/temp.js
|
@ -15,11 +15,23 @@ function updateTemp() {
|
|||
if (!tmp.layerReqs) tmp.layerReqs = {}
|
||||
for (layer in layers) tmp.layerReqs[layer] = layers[layer].requires()
|
||||
|
||||
if (!tmp.buyables) tmp.buyables = {}
|
||||
for (layer in layers) if (layers[layer].buyables) {
|
||||
if (!tmp.buyables[layer]) tmp.buyables[layer] = {}
|
||||
for (id in player[layer].buyables){
|
||||
if (!tmp.buyables[layer][id]) tmp.buyables[layer][id] = {}
|
||||
tmp.buyables[layer][id]
|
||||
tmp.buyables[layer][id].cost = layers[layer].buyables[id].cost(player[layer].buyables[id])
|
||||
tmp.buyables[layer][id].effects = layers[layer].buyables[id].effects(player[layer].buyables[id])
|
||||
}
|
||||
}
|
||||
|
||||
if (!tmp.gainMults) tmp.gainMults = {}
|
||||
if (!tmp.gainExp) tmp.gainExp = {}
|
||||
if (!tmp.resetGain) tmp.resetGain = {}
|
||||
if (!tmp.nextAt) tmp.nextAt = {}
|
||||
if (!tmp.layerAmt) tmp.layerAmt = {}
|
||||
|
||||
for (layer in layers) {
|
||||
tmp.layerAmt[layer] = layers[layer].baseAmount()
|
||||
tmp.gainMults[layer] = layers[layer].gainMult()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue