From 998eb56348c7a55815c92f555e71c805fe7bc1b5 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 12 Apr 2021 12:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=98=E6=A1=A3=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.lua | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/main.lua b/main.lua index 4c5de208..dc8c9faf 100644 --- a/main.lua +++ b/main.lua @@ -258,6 +258,7 @@ do end if STAT.version<1400 then fs.remove("conf/user") + fs.remove("conf/key") SETTING.appLock=false needSave=true autoRestart=true @@ -300,16 +301,6 @@ do RANKS.sprint_10l=0 needSave=true end - if needSave then - FILE.save(RANKS,"conf/unlock","q") - FILE.save(SETTING,"conf/settings","q") - end - - if keyMap[1]then - autoRestart=true - fs.remove("conf/key") - end - USER.username=nil if STAT.version~=VERSION.code then newVersionLaunch=true @@ -317,6 +308,10 @@ do FILE.save(STAT,"conf/data","q") end + if needSave then + FILE.save(RANKS,"conf/unlock","q") + FILE.save(SETTING,"conf/settings","q") + end if autoRestart then love.event.quit("restart") end