尝试修复更新后加载爆炸

This commit is contained in:
MrZ626
2020-12-19 14:52:34 +08:00
parent 622177e0df
commit 2a0154dfa0

View File

@@ -177,7 +177,9 @@ function scene.update()
if newVersionLaunch then--Delete old ranks & Unlock modes which should be unlocked
for name,rank in next,RANKS do
local M=MODES[name]
if M and M.unlock and rank>0 then
if type(rank)~="number"then
RANKS[name]=nil
elseif M and M.unlock and rank>0 then
for _,unlockName in next,M.unlock do
if not RANKS[unlockName]then
RANKS[unlockName]=0