From 0d9e81d7f96e8d4c754fba2e4c27995b8b4e304a Mon Sep 17 00:00:00 2001
From: Jacorb90 <39597610+Jacorb90@users.noreply.github.com>
Date: Wed, 19 Aug 2020 18:20:42 -0400
Subject: [PATCH] Alpha Build 2 Patch 1
---
index.html | 5 ++---
js/game.js | 3 +++
2 files changed, 5 insertions(+), 3 deletions(-)
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