整理代码,较复杂的单行if-then-end拆成多行
This commit is contained in:
68
main.lua
68
main.lua
@@ -111,11 +111,17 @@ else
|
||||
FIELD[1]=DATA.newBoard()
|
||||
end
|
||||
local sequenceData=FILE.load('conf/customSequence')
|
||||
if sequenceData then DATA.pasteSequence(sequenceData)end
|
||||
if sequenceData then
|
||||
DATA.pasteSequence(sequenceData)
|
||||
end
|
||||
local missionData=FILE.load('conf/customMissions')
|
||||
if missionData then DATA.pasteMission(missionData)end
|
||||
if missionData then
|
||||
DATA.pasteMission(missionData)
|
||||
end
|
||||
local customData=FILE.load('conf/customEnv')
|
||||
if customData and customData.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)
|
||||
|
||||
|
||||
@@ -285,12 +291,22 @@ do
|
||||
end
|
||||
if STAT.version==1506 then
|
||||
local temp1,temp2
|
||||
if fs.getInfo('record/master_l.rec')then temp1=fs.read('record/master_l.rec')end
|
||||
if fs.getInfo('record/master_u.rec')then temp2=fs.read('record/master_u.rec')end
|
||||
if temp1 then fs.write('record/master_u.rec',temp1)end
|
||||
if temp2 then fs.write('record/master_l.rec',temp2)end
|
||||
if fs.getInfo('record/master_l.rec')then
|
||||
temp1=fs.read('record/master_l.rec')
|
||||
end
|
||||
if fs.getInfo('record/master_u.rec')then
|
||||
temp2=fs.read('record/master_u.rec')
|
||||
end
|
||||
if temp1 then
|
||||
fs.write('record/master_u.rec',temp1)
|
||||
end
|
||||
if temp2 then
|
||||
fs.write('record/master_l.rec',temp2)
|
||||
end
|
||||
RANKS.master_l,RANKS.master_u=RANKS.master_u,RANKS.master_l
|
||||
if RANKS.tsd_u then RANKS.tsd_u=0 end
|
||||
if RANKS.tsd_u then
|
||||
RANKS.tsd_u=0
|
||||
end
|
||||
needSave=true
|
||||
end
|
||||
if STAT.version==1601 then
|
||||
@@ -320,22 +336,40 @@ do
|
||||
end
|
||||
SETTING.appLock=nil
|
||||
SETTING.dataSaving=nil
|
||||
if not SETTING.VKSkin then SETTING.VKSkin=1 end
|
||||
if not SETTING.VKSkin then
|
||||
SETTING.VKSkin=1
|
||||
end
|
||||
for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end
|
||||
if
|
||||
SETTING.RS=='ZRS'or SETTING.RS=='BRS'or
|
||||
SETTING.RS=='ASCplus'or SETTING.RS=='C2sym'
|
||||
then SETTING.RS='TRS'end
|
||||
if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'end
|
||||
if type(SETTING.skinSet)=='number'then SETTING.skinSet='crystal_scf'end
|
||||
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then SETTING.frameMul=100 end
|
||||
if SETTING.ghostType=='greyCell'then
|
||||
SETTING.ghostType='grayCell'
|
||||
end
|
||||
if type(SETTING.skinSet)=='number'then
|
||||
SETTING.skinSet='crystal_scf'
|
||||
end
|
||||
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then
|
||||
SETTING.frameMul=100
|
||||
end
|
||||
|
||||
for _,v in next,VK_org do v.color=nil end
|
||||
if RANKS.infinite then RANKS.infinite=0 end
|
||||
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
|
||||
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
||||
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end
|
||||
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
|
||||
if RANKS.infinite then
|
||||
RANKS.infinite=0
|
||||
end
|
||||
if RANKS.infinite_dig then
|
||||
RANKS.infinite_dig=0
|
||||
end
|
||||
if not RANKS.sprint_10l then
|
||||
RANKS.sprint_10l=0
|
||||
end
|
||||
if RANKS.master_l then
|
||||
RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true
|
||||
end
|
||||
if RANKS.master_u then
|
||||
RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true
|
||||
end
|
||||
for k in next,RANKS do
|
||||
if type(k)=='number'then
|
||||
RANKS[k]=nil
|
||||
|
||||
Reference in New Issue
Block a user