1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-04-21 17:01:00 +00:00

Many minor fixes, updated b_e

This commit is contained in:
Harley White 2021-09-07 23:53:54 -04:00
parent 5180497c90
commit dccdae2f2a
6 changed files with 23 additions and 18 deletions

View file

@ -53,7 +53,7 @@ function buyUpgrade(layer, id) {
function buyUpg(layer, id) {
if (!tmp[layer].upgrades || !tmp[layer].upgrades[id]) return
let upg = tmp[layer].upgrades[id]
if (!player[layer].unlocked) return
if (!player[layer].unlocked || player[layer].deactivated) return
if (!tmp[layer].upgrades[id].unlocked) return
if (player[layer].upgrades.includes(id)) return
if (upg.canAfford === false) return
@ -346,7 +346,7 @@ document.title = modInfo.name
function toValue(value, oldValue) {
if (oldValue instanceof Decimal) {
value = new Decimal (value)
if (value.eq(decimalNaN)) return decimalZero
if (checkDecimalNaN(value)) return decimalZero
return value
}
if (!isNaN(oldValue))