From 5000be3263b617a0f30a53d81719c8e85b6315d2 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 19 Mar 2021 17:33:20 +0800 Subject: [PATCH] =?UTF-8?q?intro=E5=9C=BA=E6=99=AFNOGAME=E9=93=81=E9=97=A8?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=90=AF=E5=8A=A8=E6=97=B6=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=87=8D=E5=90=AF=EF=BC=9B=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E6=8E=A5=E5=8F=97v0.13.2=E5=89=8D=E7=9A=84=E8=AE=BE=E7=BD=AE(?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=A0=E9=99=A4=E9=87=8D=E7=BD=AE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.lua | 38 ++++++++++---------------------------- parts/scenes/intro.lua | 15 +++++---------- 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/main.lua b/main.lua index 1e283d76..b3f6d3e4 100644 --- a/main.lua +++ b/main.lua @@ -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 \ No newline at end of file diff --git a/parts/scenes/intro.lua b/parts/scenes/intro.lua index 87989337..99b57890 100644 --- a/parts/scenes/intro.lua +++ b/parts/scenes/intro.lua @@ -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