升级存档会自动重启了
This commit is contained in:
@@ -492,7 +492,7 @@ function love.run()
|
|||||||
love[N](a,b,c,d,e)
|
love[N](a,b,c,d,e)
|
||||||
elseif N=="quit"then
|
elseif N=="quit"then
|
||||||
destroyPlayers()
|
destroyPlayers()
|
||||||
return true
|
return a or true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
14
main.lua
14
main.lua
@@ -271,7 +271,7 @@ LANG.set(SETTING.lang)
|
|||||||
--Update data
|
--Update data
|
||||||
do
|
do
|
||||||
local needSave
|
local needSave
|
||||||
local noGame
|
local autoRestart
|
||||||
|
|
||||||
if STAT.extraRate then
|
if STAT.extraRate then
|
||||||
STAT.finesseRate=5*(STAT.piece-STAT.extraRate)
|
STAT.finesseRate=5*(STAT.piece-STAT.extraRate)
|
||||||
@@ -296,7 +296,7 @@ do
|
|||||||
if RANKS.pctrain_l then RANKS.pctrain_l=0 end
|
if RANKS.pctrain_l then RANKS.pctrain_l=0 end
|
||||||
fs.remove("conf/user")
|
fs.remove("conf/user")
|
||||||
fs.remove("conf/settings")
|
fs.remove("conf/settings")
|
||||||
noGame=true
|
autoRestart=true
|
||||||
end
|
end
|
||||||
if STAT.version<1303 then
|
if STAT.version<1303 then
|
||||||
SETTING.appLock=false
|
SETTING.appLock=false
|
||||||
@@ -305,7 +305,7 @@ do
|
|||||||
|
|
||||||
for _,v in next,VK_org do
|
for _,v in next,VK_org do
|
||||||
if not v.color then
|
if not v.color then
|
||||||
noGame=true
|
autoRestart=true
|
||||||
fs.remove("conf/virtualkey")
|
fs.remove("conf/virtualkey")
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -345,7 +345,7 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
if keyMap[1]then
|
if keyMap[1]then
|
||||||
noGame=true
|
autoRestart=true
|
||||||
fs.remove("conf/key")
|
fs.remove("conf/key")
|
||||||
end
|
end
|
||||||
USER.username=nil
|
USER.username=nil
|
||||||
@@ -356,8 +356,8 @@ do
|
|||||||
FILE.save(STAT,"conf/data","q")
|
FILE.save(STAT,"conf/data","q")
|
||||||
end
|
end
|
||||||
|
|
||||||
if noGame then
|
if autoRestart then
|
||||||
love.window.showMessageBox("重启更新 Restart to Update","检测到大版本更新,请重启游戏完成\nOld version detected & saving file changed, please restart the game",{"Get it!"},"info",true)
|
-- love.window.showMessageBox("重启更新 Restart to Update","检测到大版本更新,请重启游戏完成\nOld version detected & saving file changed, please restart the game",{"Get it!"},"info",true)
|
||||||
love.event.quit()
|
love.event.quit("restart")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user