From cfc23834d42ca274ca9e9a7752809832f78eff03 Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Sun, 27 Sep 2020 00:04:08 -0400 Subject: [PATCH] Added a check for new milestones before resetting --- js/game.js | 3 ++- js/layers.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/game.js b/js/game.js index 7a8a19b..d49a391 100644 --- a/js/game.js +++ b/js/game.js @@ -300,7 +300,8 @@ function doReset(layer, force=false) { layers[layer].onPrestige(gain) addPoints(layer, gain) - + updateMilestones(layer) + if (!player[layer].unl) { player[layer].unl = true; needCanvasUpdate = true; diff --git a/js/layers.js b/js/layers.js index 8b06066..81a2c72 100644 --- a/js/layers.js +++ b/js/layers.js @@ -140,7 +140,7 @@ for (layer in layers){ } function addLayer(layerName, layerData){ // Call this to add layers from a different file! - layers[name] = layerData + layers[layerName] = layerData LAYERS = Object.keys(layers); ROW_LAYERS = {} for (layer in layers){