mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 17:31:50 +00:00
Added fix for subtab crashes
This commit is contained in:
parent
7f1fbe058d
commit
69bd05b469
2 changed files with 10 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
- Added buyUpgrade function (buyUpg still works though)
|
||||
- Added author name to modInfo.
|
||||
- Fix to crash caused when the name of a subtab or microtab is changed.
|
||||
- Fixes to outdated information in docs.
|
||||
- Improvements to Discord links.
|
||||
- Thank you to thepaperpilot for contributing to this update!
|
||||
|
|
|
@ -157,6 +157,15 @@ function fixSave() {
|
|||
{
|
||||
if (player[layer].best !== undefined) player[layer].best = new Decimal (player[layer].best)
|
||||
if (player[layer].total !== undefined) player[layer].total = new Decimal (player[layer].total)
|
||||
|
||||
if (layers[layer].tabFormat && !Array.isArray(layers[layer].tabFormat)) {
|
||||
|
||||
if(!Object.keys(layers[layer].tabFormat).includes(player.subtabs[layer].mainTabs)) player.subtabs[layer].mainTabs = Object.keys(layers[layer].tabFormat)[0]
|
||||
}
|
||||
if (layers[layer].microtabs) {
|
||||
for (item in layers[layer].microtabs)
|
||||
if(!Object.keys(layers[layer].microtabs[item]).includes(player.subtabs[layer][item])) player.subtabs[layer][item] = Object.keys(layers[layer].microtabs[item])[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue