diff --git a/index.html b/index.html index 7e78047..5ec96f2 100644 --- a/index.html +++ b/index.html @@ -10,10 +10,8 @@
-

i
-






Hotkeys



@@ -41,7 +39,8 @@
- You have

{{format(player.points)}}

Points + +
You have

{{format(player.points)}}

Points




diff --git a/js/game.js b/js/game.js index ad8f3b3..5450672 100644 --- a/js/game.js +++ b/js/game.js @@ -990,10 +990,12 @@ function hardReset() { } var saveInterval = setInterval(function() { + if (player===undefined) return; if (player.autosave) save(); }, 5000) var interval = setInterval(function() { + if (player===undefined) return; let diff = (Date.now()-player.time)/1000 player.time = Date.now() if (needCanvasUpdate && player.tab=="tree") resizeCanvas(); @@ -1001,6 +1003,7 @@ var interval = setInterval(function() { }, 50) document.onkeydown = function(e) { + if (player===undefined) return; let shiftDown = e.shiftKey let key = e.key if (!LAYERS.includes(key)) return