From 7d1aaebc5b9a40f765c7b3152eb8365a4287e3ce Mon Sep 17 00:00:00 2001 From: nif Date: Thu, 18 Apr 2024 18:01:59 +0000 Subject: [PATCH] same as last commit but in a better way Signed-off-by: nif --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index e9cdf63..c8a04d7 100644 --- a/main.js +++ b/main.js @@ -209,13 +209,13 @@ document.getElementById("wipe-game").addEventListener("click", () => { } }) -try { +if (localStorage.getItem("nif's-infinite-generators")) { let falsePlayer = JSON.parse(atob(localStorage.getItem("nif's-infinite-generators"))) player = {...player, ...falsePlayer} if (falsePlayer.unlocked) player.unlocked = {...player.unlocked, ...falsePlayer.unlocked} if (falsePlayer.cupgs) player.cupgs = [...player.cupgs, ...falsePlayer.cupgs] for (const i in player.gens) newGenerator(Number(i)) -} catch (TypeError) {} +} function updateVars() { const dt = 0.05