refact by claude
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful

This commit is contained in:
Zsolt Tasnadi
2026-02-23 10:22:41 +01:00
parent 272a54ea87
commit 7deeffa8d6
20 changed files with 85 additions and 77 deletions

View File

@@ -31,7 +31,8 @@ end
function Context.reset()
local initial_data = Context.initial_data()
for k in pairs(Context) do
if type(Context[k]) ~= "function" then Context[k] = nil
if type(Context[k]) ~= "function" then
Context[k] = nil
end
end
@@ -57,7 +58,7 @@ end
--- Loads a saved game state.
function Context.load_game()
if mget(SAVE_GAME_MAGIC_VALUE_ADDRESS, SAVE_GAME_BANK) ~= SAVE_GAME_MAGIC_VALUE then
Context.new_game()
Context.new_game()
return
end
Context.reset()