mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-24 02:01:03 +00:00
Optimized more things out of temp
This commit is contained in:
parent
faebc2f075
commit
a8a5a2f46a
6 changed files with 70 additions and 71 deletions
js
13
js/utils.js
13
js/utils.js
|
@ -364,19 +364,6 @@ function focused(x) {
|
|||
onFocused = x
|
||||
}
|
||||
|
||||
function prestigeButtonText(layer) {
|
||||
if (layers[layer].prestigeButtonText !== undefined)
|
||||
return run(layers[layer].prestigeButtonText(), layers[layer])
|
||||
else if (tmp[layer].type == "normal")
|
||||
return `${player[layer].points.lt(1e3) ? (tmp[layer].resetDescription !== undefined ? tmp[layer].resetDescription : "Reset for ") : ""}+<b>${formatWhole(tmp[layer].resetGain)}</b> ${tmp[layer].resource} ${tmp[layer].resetGain.lt(100) && player[layer].points.lt(1e3) ? `<br><br>Next at ${(tmp[layer].roundUpCost ? formatWhole(tmp[layer].nextAt) : format(tmp[layer].nextAt))} ${tmp[layer].baseResource}` : ""}`
|
||||
else if (tmp[layer].type == "static")
|
||||
return `${tmp[layer].resetDescription !== undefined ? tmp[layer].resetDescription : "Reset for "}+<b>${formatWhole(tmp[layer].resetGain)}</b> ${tmp[layer].resource}<br><br>${player[layer].points.lt(30) ? (tmp[layer].baseAmount.gte(tmp[layer].nextAt) && (tmp[layer].canBuyMax !== undefined) && tmp[layer].canBuyMax ? "Next:" : "Req:") : ""} ${formatWhole(tmp[layer].baseAmount)} / ${(tmp[layer].roundUpCost ? formatWhole(tmp[layer].nextAtDisp) : format(tmp[layer].nextAtDisp))} ${tmp[layer].baseResource}
|
||||
`
|
||||
else if (tmp[layer].type == "none")
|
||||
return ""
|
||||
else
|
||||
return "You need prestige button text"
|
||||
}
|
||||
|
||||
function isFunction(obj) {
|
||||
return !!(obj && obj.constructor && obj.call && obj.apply);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue