From 9570acb5e3fdd563df73fd02057af3af2ca88900 Mon Sep 17 00:00:00 2001 From: Harley White Date: Thu, 17 Jun 2021 14:20:27 -0400 Subject: [PATCH] Fixed hotkey crash --- changelog.md | 3 ++- js/Demo/demoMod.js | 2 +- js/game.js | 2 +- js/utils.js | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index cf5446e..95386f7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # The Modding Tree changelog: -# v2.6.4.1 - 6/17/21 +# v2.6.4.2 - 6/17/21 - Fixed a bug with the endgame screen. +- Fixed hotkey-related crash. # v2.6.4 - 6/17/21 - The game now autosaves before closing, if autosave is on. (Thank you to thepaperpilot for this!) diff --git a/js/Demo/demoMod.js b/js/Demo/demoMod.js index 59a652e..b04b735 100644 --- a/js/Demo/demoMod.js +++ b/js/Demo/demoMod.js @@ -13,7 +13,7 @@ let modInfo = { // Set your version in num and name let VERSION = { - num: "2.6.4.1", + num: "2.6.4.2", name: "Fixed Reality", } diff --git a/js/game.js b/js/game.js index 8c6a416..c944ec6 100644 --- a/js/game.js +++ b/js/game.js @@ -3,7 +3,7 @@ var needCanvasUpdate = true; // Don't change this const TMT_VERSION = { - tmtNum: "2.6.4.1", + tmtNum: "2.6.4.2", tmtName: "Fixed Reality" } diff --git a/js/utils.js b/js/utils.js index 76e2619..503cc62 100644 --- a/js/utils.js +++ b/js/utils.js @@ -305,9 +305,9 @@ ctrlDown = false document.onkeydown = function (e) { if (player === undefined) return; - if (gameEnded && !player.keepGoing) return; shiftDown = e.shiftKey ctrlDown = e.ctrlKey + if (tmp.gameEnded && !player.keepGoing) return; let key = e.key if (ctrlDown) key = "ctrl+" + key if (onFocused) return