自定义游戏的序列任务场地等数据退出后会保存
This commit is contained in:
20
main.lua
20
main.lua
@@ -81,8 +81,24 @@ PLY= require'parts.player'
|
||||
netPLY= require'parts.netPlayer'
|
||||
MODES= require'parts.modes'
|
||||
|
||||
--Initialize field[1]
|
||||
FIELD[1]=DATA.newBoard()
|
||||
--Initialize field
|
||||
local fieldData=FILE.load('conf/customBoards')
|
||||
if fieldData then
|
||||
fieldData=STRING.split(fieldData,"!")
|
||||
for i=1,#fieldData do
|
||||
DATA.pasteBoard(fieldData[i],i)
|
||||
end
|
||||
else
|
||||
FIELD[1]=DATA.newBoard()
|
||||
end
|
||||
DATA.pasteSequence(FILE.load('conf/customSequence'))
|
||||
DATA.pasteMission(FILE.load('conf/customMissions'))
|
||||
local customData=FILE.load('conf/customEnv')--gameEnv for cutsom game
|
||||
if customData or CUSTOMENV.version~=VERSION.code then
|
||||
TABLE.complete(customData,CUSTOMENV)
|
||||
end
|
||||
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
||||
|
||||
|
||||
--First start for phones
|
||||
if not fs.getInfo('conf/settings')and MOBILE then
|
||||
|
||||
Reference in New Issue
Block a user