mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
commit
92ba6d7e1c
2 changed files with 8 additions and 1 deletions
|
@ -109,7 +109,7 @@ function layerDataReset(layer, keep = []) {
|
|||
storedData[keep[thing]] = player[layer][keep[thing]]
|
||||
}
|
||||
|
||||
player[layer] = layers[layer].startData();
|
||||
layOver(player[layer], layers[layer].startData());
|
||||
player[layer].upgrades = []
|
||||
player[layer].milestones = []
|
||||
player[layer].challenges = getStartChallenges(layer)
|
||||
|
|
|
@ -622,6 +622,13 @@ function goBack() {
|
|||
else showTab(player.lastSafeTab)
|
||||
}
|
||||
|
||||
function layOver(obj1, obj2) {
|
||||
for (let x in obj2) {
|
||||
if (obj2[x] instanceof Object) layOver(obj1[x], obj2[x]);
|
||||
else obj1[x] = obj2[x];
|
||||
}
|
||||
}
|
||||
|
||||
function notifyLayer(name) {
|
||||
if (player.tab == name || !layerunlocked(name)) return
|
||||
player.notify[name] = 1
|
||||
|
|
Loading…
Reference in a new issue