Save custom mode (#1007)

* first step to save custom game

* localize various settings in custom game

* rename fields to lower cases

* fix many bugs

* fixes #1014
This commit is contained in:
Imple Lee
2023-10-20 01:42:04 +08:00
committed by GitHub
parent 7ac2c282f6
commit 90c428cf44
13 changed files with 240 additions and 158 deletions

View File

@@ -19,7 +19,21 @@ return {
end
for _,P in next,PLY_ALIVE do
setField(P,1)
setField(P,FIELD[1])
end
end,
savePrivate=function()
return {
FIELD=FIELD,
BAG=BAG,
MISSION=MISSION,
CUSTOMENV=CUSTOMENV,
}
end,
loadPrivate=function(private)
FIELD=private.FIELD
BAG=private.BAG
MISSION=private.MISSION
CUSTOMENV=private.CUSTOMENV
end,
}