mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 09:21:46 +00:00
Fixed side layers appearing multiple times
This commit is contained in:
parent
baf5ec024d
commit
e0479407e2
2 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
# The Modding Tree changelog:
|
||||
|
||||
# v2.0.1 10/15/20
|
||||
- Fixed side layers appearing multiple times.
|
||||
|
||||
## v2.0 10/15/20
|
||||
- Added progress bars, which are highly customizable and can be horizontal or vertical!
|
||||
- Added "side layers", displayed smaller and off to the side, and don't get reset by default.
|
||||
|
|
|
@ -30,6 +30,7 @@ function updateLayers(){
|
|||
LAYERS = Object.keys(layers);
|
||||
ROW_LAYERS = {}
|
||||
TREE_LAYERS = {}
|
||||
OTHER_LAYERS = {}
|
||||
for (layer in layers){
|
||||
layers[layer].layer = layer
|
||||
if (layers[layer].upgrades){
|
||||
|
@ -126,10 +127,12 @@ function updateLayers(){
|
|||
else OTHER_LAYERS[row].push({layer: layer, position: position})
|
||||
|
||||
}
|
||||
for (row in OTHER_LAYERS) {
|
||||
OTHER_LAYERS[row].sort((a, b) => (a.position > b.position) ? 1 : -1)
|
||||
}
|
||||
for (row in TREE_LAYERS) {
|
||||
TREE_LAYERS[row].sort((a, b) => (a.position > b.position) ? 1 : -1)
|
||||
}
|
||||
|
||||
updateHotkeys()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue