1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Made things more backwards-compatible

This commit is contained in:
Acamaeda 2020-12-12 23:32:55 -05:00
parent 8e36404ad8
commit 437f4313ce
3 changed files with 10 additions and 10 deletions

View file

@ -94,7 +94,7 @@ function canReset(layer)
if(tmp[layer].type == "none")
return false
else
return run(layers[layer].canReset, tmp[layer])
return run(layers[layer].canReset, layers[layer])
}
function rowReset(row, layer) {
@ -102,7 +102,7 @@ function rowReset(row, layer) {
if(layers[lr].doReset) {
player[lr].activeChallenge = null // Exit challenges on any row reset on an equal or higher row
run(layers[lr].doReset, tmp[lr], layer)
run(layers[lr].doReset, layers[lr], layer)
}
else
if(tmp[layer].row > tmp[lr].row && row !== "side" && !isNaN(row)) layerDataReset(lr)
@ -164,7 +164,7 @@ function doReset(layer, force=false) {
}
if (layers[layer].onPrestige)
run(layers[layer].onPrestige, tmp[layer], gain)
run(layers[layer].onPrestige, layers[layer], gain)
addPoints(layer, gain)
updateMilestones(layer)
@ -268,7 +268,7 @@ function completeChallenge(layer, x) {
if (player[layer].challenges[x] < tmp[layer].challenges[x].completionLimit) {
needCanvasUpdate = true
player[layer].challenges[x] += 1
if (layers[layer].challenges[x].onComplete) run(layers[layer].challenges[x].onComplete, tmp[layer].challenges[x])
if (layers[layer].challenges[x].onComplete) run(layers[layer].challenges[x].onComplete, layers[layer].challenges[x])
}
player[layer].activeChallenge = null
updateChallengeTemp(layer)

View file

@ -18,7 +18,7 @@ var systemComponents = {
v-bind:id="layer"
v-on:click="function() {
if(tmp[layer].isLayer) {showTab(layer)}
else {run(layers[layer].onClick, tmp[layer])}
else {run(layers[layer].onClick, layers[layer])}
}"
v-bind:tooltip="(tmp[layer].tooltip == '') ? false : (tmp[layer].isLayer) ? (

View file

@ -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)
}