From 2968a838d6ed5f5557840c54cdca3d6613fcdae3 Mon Sep 17 00:00:00 2001 From: Harley White Date: Wed, 7 Jul 2021 13:15:03 -0400 Subject: [PATCH] Fixed subtab glow issue --- changelog.md | 3 +++ js/game.js | 3 ++- js/technical/layerSupport.js | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index f4a149d..a26d053 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,12 @@ # The Modding Tree changelog: + +# v2.6.5 - 7/7/21 - Fixed offline production. - Fixed formatting for small negative numbers. - Fixed divide by zero when a 0-second tick occurs. - "deactivated" now also affects achievement/milestone unlocking. - Locked challenges cannot be entered. +- Fixed a bug with subtab glow colors. # v2.6.4.2 - 6/17/21 - Fixed a bug with the endgame screen. diff --git a/js/game.js b/js/game.js index b6d4515..8edfc3d 100644 --- a/js/game.js +++ b/js/game.js @@ -94,7 +94,8 @@ function shouldNotify(layer){ if (isPlainObject(tmp[layer].tabFormat)) { for (subtab in tmp[layer].tabFormat){ if (subtabShouldNotify(layer, 'mainTabs', subtab)) { - tmp[layer].trueGlowColor = tmp[layer].tabFormat[subtab].glowColor + tmp[layer].trueGlowColor = tmp[layer].tabFormat[subtab].glowColor || defaultGlow + return true } } diff --git a/js/technical/layerSupport.js b/js/technical/layerSupport.js index f8412c6..745906f 100644 --- a/js/technical/layerSupport.js +++ b/js/technical/layerSupport.js @@ -4,6 +4,9 @@ const decimalZero = new Decimal(0) const decimalOne = new Decimal(1) const decimalNaN = new Decimal(NaN) +const defaultGlow = "#ff0000" + + function layerShown(layer){ return tmp[layer].layerShown; } @@ -187,7 +190,7 @@ function setupLayer(layer){ if(layers[layer].displayRow === undefined) layers[layer].displayRow = layers[layer].row if(layers[layer].name === undefined) layers[layer].name = layer if(layers[layer].layerShown === undefined) layers[layer].layerShown = true - if(layers[layer].glowColor === undefined) layers[layer].glowColor = "#ff0000" + if(layers[layer].glowColor === undefined) layers[layer].glowColor = defaultGlow let row = layers[layer].row