CLOSES #303, CLOSES #307, CLOSES #314, CLOSES #318

This commit is contained in:
bryanthaboi
2026-07-28 06:16:21 -04:00
parent 72f83760b7
commit 3b1032cc63
38 changed files with 1116 additions and 99 deletions
+5 -1
View File
@@ -162,7 +162,11 @@ function Loader:_loadState()
if next(options.mods or {}) == nil and self.fs.getInfo
and self.fs.getInfo(MOD_STATE_FILE) then
local chunk = self.fs.load(MOD_STATE_FILE)
local ok, state = chunk and pcall(chunk)
-- `chunk and pcall(chunk)` truncates to one value, so state came back nil
-- however well the chunk ran and the migration below never fired once:
-- the guard has to be a statement for pcall's second return to survive.
local ok, state = false, nil
if chunk then ok, state = pcall(chunk) end
if ok and type(state) == "table" then
for id, disabled in pairs(state) do
if disabled then