From 5954e8ef7eedf1d27b3aedcc12ee5883003ef9e0 Mon Sep 17 00:00:00 2001 From: Harley White Date: Sat, 25 Jun 2022 20:01:00 -0400 Subject: [PATCH] Enforces changing the gameInfo id. --- js/technical/systemComponents.js | 2 ++ js/utils/save.js | 1 + 2 files changed, 3 insertions(+) diff --git a/js/technical/systemComponents.js b/js/technical/systemComponents.js index 307bb0f..205d14b 100644 --- a/js/technical/systemComponents.js +++ b/js/technical/systemComponents.js @@ -114,6 +114,8 @@ var systemComponents = {
You have

{{format(player.points)}}

+ Change your game's id in gameInfo. Saving is disabled until you do. +
{{pluralize(player.points, gameInfo.singularName || gameInfo.pointsName, gameInfo.pointsName)}}
({{tmp.other.oompsMag != 0 ? format(tmp.other.oomps) + " OOM" + (tmp.other.oompsMag < 0 ? "^OOM" : tmp.other.oompsMag > 1 ? "^" + tmp.other.oompsMag : "") + "s" : formatSmall(getPointGen())}}/sec) diff --git a/js/utils/save.js b/js/utils/save.js index f54ea45..3dccc83 100644 --- a/js/utils/save.js +++ b/js/utils/save.js @@ -1,6 +1,7 @@ // ************ Save stuff ************ function save(force) { NaNcheck(player) + if (gameInfo.id == "mygame") return if (NaNalert && !force) return localStorage.setItem(gameInfo.id, btoa(unescape(encodeURIComponent(JSON.stringify(player))))); localStorage.setItem(gameInfo.id+"_options", btoa(unescape(encodeURIComponent(JSON.stringify(options)))));