修复更新后自动删除老版本rank的代码位置错误
This commit is contained in:
24
main.lua
24
main.lua
@@ -366,30 +366,6 @@ do
|
||||
end
|
||||
newVersionLaunch=true
|
||||
|
||||
--Try unlock modes which should be unlocked & delete old ranks
|
||||
for name,rank in next,RANKS do
|
||||
if rank and rank>0 then
|
||||
local exist
|
||||
for _,mode in next,MODES do
|
||||
if mode.name==name then
|
||||
if mode.score then
|
||||
exist=true
|
||||
end
|
||||
if mode.unlock then
|
||||
for _,unlockName in next,mode.unlock do
|
||||
if not RANKS[unlockName]then
|
||||
RANKS[unlockName]=0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if not exist then
|
||||
RANKS[name]=nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
S.version=VERSION_CODE
|
||||
FILE.save(RANKS,"conf/unlock","q")
|
||||
FILE.save(STAT,"conf/data")
|
||||
|
||||
Reference in New Issue
Block a user