1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-05-01 14:01:09 +00:00

Renamed many things to be more readable and updated docs

This commit is contained in:
Acamaeda 2020-10-12 23:08:19 -04:00
parent 02da021fb1
commit fde714d73f
21 changed files with 281 additions and 253 deletions

View file

@ -36,8 +36,8 @@ function updateLayers(){
if (!isNaN(thing)){
layers[layer].upgrades[thing].id = thing
layers[layer].upgrades[thing].layer = layer
if (layers[layer].upgrades[thing].unl === undefined)
layers[layer].upgrades[thing].unl = true
if (layers[layer].upgrades[thing].unlocked === undefined)
layers[layer].upgrades[thing].unlocked = true
}
}
}
@ -46,20 +46,20 @@ function updateLayers(){
if (!isNaN(thing)){
layers[layer].milestones[thing].id = thing
layers[layer].milestones[thing].layer = layer
if (layers[layer].milestones[thing].unl === undefined)
layers[layer].milestones[thing].unl = true
if (layers[layer].milestones[thing].unlocked === undefined)
layers[layer].milestones[thing].unlocked = true
}
}
}
if (layers[layer].challs){
for (thing in layers[layer].challs){
if (layers[layer].challenges){
for (thing in layers[layer].challenges){
if (!isNaN(thing)){
layers[layer].challs[thing].id = thing
layers[layer].challs[thing].layer = layer
if (layers[layer].challs[thing].unl === undefined)
layers[layer].challs[thing].unl = true
if (layers[layer].challs[thing].completionLimit === undefined)
layers[layer].challs[thing].completionLimit = 1
layers[layer].challenges[thing].id = thing
layers[layer].challenges[thing].layer = layer
if (layers[layer].challenges[thing].unlocked === undefined)
layers[layer].challenges[thing].unlocked = true
if (layers[layer].challenges[thing].completionLimit === undefined)
layers[layer].challenges[thing].completionLimit = 1
}
}
@ -70,8 +70,8 @@ function updateLayers(){
if (!isNaN(thing)){
layers[layer].buyables[thing].id = thing
layers[layer].buyables[thing].layer = layer
if (layers[layer].buyables[thing].unl === undefined)
layers[layer].buyables[thing].unl = true
if (layers[layer].buyables[thing].unlocked === undefined)
layers[layer].buyables[thing].unlocked = true
}
}
}
@ -82,8 +82,8 @@ function updateLayers(){
if (!isNaN(thing)){
layers[layer].clickables[thing].id = thing
layers[layer].clickables[thing].layer = layer
if (layers[layer].clickables[thing].unl === undefined)
layers[layer].clickables[thing].unl = true
if (layers[layer].clickables[thing].unlocked === undefined)
layers[layer].clickables[thing].unlocked = true
}
}
}
@ -94,8 +94,8 @@ function updateLayers(){
if (!isNaN(thing)){
layers[layer].bars[thing].id = thing
layers[layer].bars[thing].layer = layer
if (layers[layer].bars[thing].unl === undefined)
layers[layer].bars[thing].unl = true
if (layers[layer].bars[thing].unlocked === undefined)
layers[layer].bars[thing].unlocked = true
}
}
}
@ -134,7 +134,7 @@ function readData(data, args=null){
function someLayerUnlocked(row){
for (layer in ROW_LAYERS[row])
if (player[layer].unl)
if (player[layer].unlocked)
return true
return false
}