From 35d7b34fd502d96d8c0960bbc1883f3c46c303b6 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Thu, 2 Jan 2014 11:10:37 +0100 Subject: [PATCH] Game will not warn you if you try to load an already tainted savefile in developer mode --- game/engines/default/engine/Savefile.lua | 1 + game/engines/default/modules/boot/dialogs/LoadGame.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/game/engines/default/engine/Savefile.lua b/game/engines/default/engine/Savefile.lua index 9bca19be17..428ebf39a3 100644 --- a/game/engines/default/engine/Savefile.lua +++ b/game/engines/default/engine/Savefile.lua @@ -240,6 +240,7 @@ function _M:saveGame(game, no_dialog) f:write(("short_name = %q\n"):format(self.short_name)) f:write(("timestamp = %d\n"):format(os.time())) f:write(("loadable = %s\n"):format(game:isLoadable() and "true" or "false")) + f:write(("cheat = %s\n"):format(game:isTainted() and "true" or "false")) f:write(("description = %q\n"):format(desc.description)) f:close() if core.steam then core.steam.writeFile(self.save_dir.."desc.lua") end diff --git a/game/engines/default/modules/boot/dialogs/LoadGame.lua b/game/engines/default/modules/boot/dialogs/LoadGame.lua index 22003757a9..dfd99f33e7 100644 --- a/game/engines/default/modules/boot/dialogs/LoadGame.lua +++ b/game/engines/default/modules/boot/dialogs/LoadGame.lua @@ -162,7 +162,7 @@ end function _M:playSave() if not self.save_sel then return end - if config.settings.cheat then + if config.settings.cheat and not self.save_sel.cheat then Dialog:yesnoPopup("Developer Mode", "#LIGHT_RED#WARNING: #LAST#Loading a savefile while in developer mode will permanently invalidate it. Proceed?", function(ret) if not ret then Module:instanciate(self.save_sel.mod, self.save_sel.base_name, false) end end, "Cancel", "Load anyway", true) -- GitLab