From 801570167d596ed41e14ccb66c492ebb3bbea33b Mon Sep 17 00:00:00 2001 From: Harley White Date: Mon, 3 May 2021 13:30:01 -0400 Subject: [PATCH] Highlight nodes even if player is on the tab, also a tmp fix --- changelog.md | 1 + js/game.js | 1 - js/technical/temp.js | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 87248c4..85f4fc5 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ # v2.4.2 (beta) - Optimizations, hopefully a significant amount. +- Layer nodes will be highlighted even if the player is on the same tab. - Added buyable purchaseLimit. - Amount is automatically supplied to buyable cost and effect functions. diff --git a/js/game.js b/js/game.js index 029ab0c..4e3aa57 100644 --- a/js/game.js +++ b/js/game.js @@ -77,7 +77,6 @@ function softcap(value, cap, power = 0.5) { // Return true if the layer should be highlighted. By default checks for upgrades only. function shouldNotify(layer){ - if (player.tab == layer || player.navTab == layer) return false for (id in tmp[layer].upgrades){ if (!isNaN(id)){ if (canAffordUpgrade(layer, id) && !hasUpgrade(layer, id) && tmp[layer].upgrades[id].unlocked){ diff --git a/js/technical/temp.js b/js/technical/temp.js index 08cc63a..b94a7aa 100644 --- a/js/technical/temp.js +++ b/js/technical/temp.js @@ -120,8 +120,10 @@ function updateTempData(layerData, tmpData, funcsData) { } } - - tmpData[item]=value + if (tmpData[item] === undefined) + Vue.set(tmpData, item, value) + else + tmpData[item]=value } } }