same as last commit but in a better way

Signed-off-by: nif <nif@incremental.social>
This commit is contained in:
Nif 2024-04-18 18:01:59 +00:00
parent ed8777f56f
commit 7d1aaebc5b

View file

@ -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"))) let falsePlayer = JSON.parse(atob(localStorage.getItem("nif's-infinite-generators")))
player = {...player, ...falsePlayer} player = {...player, ...falsePlayer}
if (falsePlayer.unlocked) player.unlocked = {...player.unlocked, ...falsePlayer.unlocked} if (falsePlayer.unlocked) player.unlocked = {...player.unlocked, ...falsePlayer.unlocked}
if (falsePlayer.cupgs) player.cupgs = [...player.cupgs, ...falsePlayer.cupgs] if (falsePlayer.cupgs) player.cupgs = [...player.cupgs, ...falsePlayer.cupgs]
for (const i in player.gens) newGenerator(Number(i)) for (const i in player.gens) newGenerator(Number(i))
} catch (TypeError) {} }
function updateVars() { function updateVars() {
const dt = 0.05 const dt = 0.05