mirror of
https://github.com/thepaperpilot/The-Modding-Tree.git
synced 2025-05-10 12:01:29 +00:00
Made things more backwards-compatible
This commit is contained in:
parent
8e36404ad8
commit
437f4313ce
3 changed files with 10 additions and 10 deletions
js
10
js/utils.js
10
js/utils.js
|
@ -454,7 +454,7 @@ function respecBuyables(layer) {
|
|||
if (!layers[layer].buyables) return
|
||||
if (!layers[layer].buyables.respec) return
|
||||
if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (tmp[layer].name ? tmp[layer].name : layer) + "\" reset as well!")) return
|
||||
run(layers[layer].buyables.respec, tmp[layer].buyables)
|
||||
run(layers[layer].buyables.respec, layers[layer].buyables)
|
||||
updateBuyableTemp(layer)
|
||||
document.activeElement.blur()
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ function buyUpg(layer, id) {
|
|||
if (upg.canAfford === false) return
|
||||
let pay = layers[layer].upgrades[id].pay
|
||||
if (pay !== undefined)
|
||||
run(pay, upg)
|
||||
run(pay, layers[layer].upgrades[id])
|
||||
else
|
||||
{
|
||||
let cost = tmp[layer].upgrades[id].cost
|
||||
|
@ -596,7 +596,7 @@ function buyMaxBuyable(layer, id) {
|
|||
if (!tmp[layer].buyables[id].canAfford) return
|
||||
if (!layers[layer].buyables[id].buyMax) return
|
||||
|
||||
run(layers[layer].buyables[id].buyMax, tmp[layer].buyables[id])
|
||||
run(layers[layer].buyables[id].buyMax, layers[layer].buyables[id])
|
||||
updateBuyableTemp(layer)
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ function buyBuyable(layer, id) {
|
|||
if (!tmp[layer].buyables[id].unlocked) return
|
||||
if (!tmp[layer].buyables[id].canAfford) return
|
||||
|
||||
run(layers[layer].buyables[id].buy, tmp[layer].buyables[id])
|
||||
run(layers[layer].buyables[id].buy, layers[layer].buyables[id])
|
||||
updateBuyableTemp(layer)
|
||||
}
|
||||
|
||||
|
@ -614,7 +614,7 @@ function clickClickable(layer, id) {
|
|||
if (!tmp[layer].clickables[id].unlocked) return
|
||||
if (!tmp[layer].clickables[id].canClick) return
|
||||
|
||||
run(layers[layer].clickables[id].onClick, tmp[layer].clickables[id])
|
||||
run(layers[layer].clickables[id].onClick, layers[layer].clickables[id])
|
||||
updateClickableTemp(layer)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue