修复加载自定义模式参数文件时可能报错

This commit is contained in:
MrZ626
2021-08-01 19:47:59 +08:00
parent ee089b0f31
commit adefb776fe
2 changed files with 3 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ if sequenceData then DATA.pasteSequence(sequenceData)end
local missionData=FILE.load('conf/customMissions')
if missionData then DATA.pasteMission(missionData)end
local customData=FILE.load('conf/customEnv')
if customData or CUSTOMENV.version~=VERSION.code then TABLE.complete(customData,CUSTOMENV)end
if customData and customData.version==VERSION.code then TABLE.complete(customData,CUSTOMENV)end
TABLE.complete(require"parts.customEnv0",CUSTOMENV)

View File

@@ -88,7 +88,8 @@ function scene.keyDown(key,isRep)
TABLE.cut(FIELD)TABLE.cut(BAG)TABLE.cut(MISSION)
FIELD[1]=DATA.newBoard()
freshMiniFieldVisible()
TABLE.update(require"parts.customEnv0",CUSTOMENV)
TABLE.clear(CUSTOMENV)
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
for _,W in next,scene.widgetList do W:reset()end
sure=0
SFX.play('finesseError',.7)