intro场景NOGAME铁门改为启动时弹窗提示重启;不再接受v0.13.2前的设置(自动删除重置)

This commit is contained in:
MrZ626
2021-03-19 17:33:20 +08:00
parent edd903c0df
commit 5000be3263
2 changed files with 15 additions and 38 deletions

View File

@@ -22,7 +22,6 @@ SAVEDIR=fs.getSaveDirectory()
--Global Vars & Settings
LOADED=false
DAILYLAUNCH=false
NOGAME=false
LOGIN=false
EDITING=""
WSCONN=false
@@ -271,22 +270,7 @@ LANG.set(SETTING.lang)
--Update data
do
local needSave
--Check setting file
if
type(STAT.version)~="number"or
type(SETTING.block)~="boolean"or
type(SETTING.sfx_spawn)~="number"or
type(SETTING.ghost)~="number"or
type(SETTING.center)~="number"or
type(SETTING.grid)~="number"or
#SETTING.skin<29 or
SETTING.bgm>1 or SETTING.sfx>1 or SETTING.voc>1 or
SETTING.stereo>1 or SETTING.VKSFX>1 or SETTING.VKAlpha>1 or
SETTING.VKCurW>1 or SETTING.VKCurW>1
then
NOGAME=true
fs.remove("conf/settings")
end
local noGame
if STAT.extraRate then
STAT.finesseRate=5*(STAT.piece-STAT.extraRate)
@@ -301,24 +285,18 @@ do
RANKS.sprintLock=nil
needSave=true
end
if STAT.version<1208 then
SETTING.skinSet=1
needSave=true
end
if STAT.version<1300 then
for _,name in next,fs.getDirectoryItems("replay")do
fs.remove("replay/"..name)
end
end
if STAT.version<1302 then
if RANKS.pctrain_n then RANKS.pctrain_n=0 end
if RANKS.pctrain_l then RANKS.pctrain_l=0 end
fs.remove("conf/user")
NOGAME=true
fs.remove("conf/settings")
noGame=true
end
if STAT.version<1303 then
SETTING.appLock=false
needSave=true
@@ -326,7 +304,7 @@ do
for _,v in next,VK_org do
if not v.color then
NOGAME=true
noGame=true
fs.remove("conf/virtualkey")
break
end
@@ -334,7 +312,6 @@ do
if RANKS.infinite then RANKS.infinite=6 end
if RANKS.infinite_dig then RANKS.infinite_dig=6 end
for k in next,RANKS do
if type(k)=="number"then
RANKS[k]=nil
@@ -370,7 +347,7 @@ do
end
if keyMap[1]then
NOGAME=true
noGame=true
fs.remove("conf/key")
end
USER.username=nil
@@ -380,4 +357,9 @@ do
STAT.version=VERSION_CODE
FILE.save(STAT,"conf/data","q")
end
if noGame then
love.window.showMessageBox("重启更新 Restart to Update","检测到大版本更新,请重启游戏完成\nOld version detected & saving file changed, please restart the game",{"Get it!"},"info",true)
love.event.quit()
end
end

View File

@@ -15,17 +15,12 @@ end
function scene.mouseDown(_,_,k)
if k~=2 then
if NOGAME then
LOG.print("检测到大版本更新,请重启游戏完成",600,COLOR.yellow)
LOG.print("Old version detected & saving file changed, please restart the game",600,COLOR.yellow)
if newVersionLaunch then
SCN.push(SETTING.simpMode and"main_simple"or"main")
SCN.swapTo("history","fade")
LOG.print(text.newVersion,"warn",COLOR.lBlue)
else
if newVersionLaunch then
SCN.push(SETTING.simpMode and"main_simple"or"main")
SCN.swapTo("history","fade")
LOG.print(text.newVersion,"warn",COLOR.lBlue)
else
SCN.go(SETTING.simpMode and"main_simple"or"main")
end
SCN.go(SETTING.simpMode and"main_simple"or"main")
end
end
end