新模式解锁检查代码微调,之前没把解锁信息保存到文件

This commit is contained in:
MrZ626
2020-11-04 00:44:53 +08:00
parent 3c7177c2fb
commit 493bb8161e

View File

@@ -225,11 +225,13 @@ do
if S.version~=gameVersion then if S.version~=gameVersion then
S.version=gameVersion S.version=gameVersion
newVersionLaunch=true newVersionLaunch=true
--Try unlock modes which should be unlocked
for name,rank in next,RANKS do for name,rank in next,RANKS do
if rank and rank>0 then if rank and rank>0 then
for i=1,#MODES do for _,mode in next,MODES do
if MODES[i].name==name and MODES[i].unlock then if mode.name==name and mode.unlock then
for _,unlockName in next,MODES[i].unlock do for _,unlockName in next,mode.unlock do
if not RANKS[unlockName]then if not RANKS[unlockName]then
RANKS[unlockName]=0 RANKS[unlockName]=0
end end
@@ -238,8 +240,8 @@ do
end end
end end
end end
FILE.saveUnlock()
FILE.saveData() FILE.saveData()
FILE.saveSetting()
end end
if MOBILE and not SETTING.fullscreen then if MOBILE and not SETTING.fullscreen then
LOG.print("如果手机上方状态栏不消失,请到设置界面开启全屏",300,COLOR.yellow) LOG.print("如果手机上方状态栏不消失,请到设置界面开启全屏",300,COLOR.yellow)