From 46320b87be7f6be64e114e1eb3243768cde2981b Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 13 Jan 2019 13:06:14 -0500 Subject: [PATCH] Fixed some properties not resetting on quit --- game.js | 2 ++ satiate.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/game.js b/game.js index 4aca084..6441a32 100644 --- a/game.js +++ b/game.js @@ -12,6 +12,8 @@ function initGame(story, state) { function initGamePostSetup(state) { const holder = document.querySelector("#player-info"); + holder.innerHTML = ""; + Object.entries(state.player.stats).forEach(([key, val]) => { if (val.type == "meter") { diff --git a/satiate.js b/satiate.js index bddc461..1822afc 100644 --- a/satiate.js +++ b/satiate.js @@ -53,6 +53,9 @@ function openModal(modal) { function returnToStart() { stopAllSound(); + stopAllTimers(state); + setBackgroundColor(0, 0, 0); + log.innerHTML = ""; document.querySelector("#game").classList.remove("scene");