Skip to content

Commit

Permalink
Fixed subtab glow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Acamaeda committed Jul 7, 2021
1 parent 5e9d4ea commit 2968a83
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
5 changes: 4 additions & 1 deletion js/technical/layerSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 2968a83

Please sign in to comment.