From ef8bf5fc3e488356fe3915016da22fdb652dfe7d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 6 Jun 2021 12:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.lua | 6 +++--- parts/globalTables.lua | 16 ++++++++-------- parts/netPlayer.lua | 1 - parts/scenes/login.lua | 8 ++++---- parts/scenes/setting_touch.lua | 8 ++++---- parts/scenes/stat.lua | 1 - 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/main.lua b/main.lua index 861f694d..bd131753 100644 --- a/main.lua +++ b/main.lua @@ -86,7 +86,7 @@ MODES= require"parts.modes" FIELD[1]=DATA.newBoard() --First start for phones -if not fs.getInfo("conf/settings")and MOBILE then +if not fs.getInfo('conf/settings')and MOBILE then SETTING.VKSwitch=true SETTING.swap=false SETTING.powerInfo=true @@ -244,8 +244,8 @@ do autoRestart=true end if STAT.version<1405 then - fs.remove("conf/user") - fs.remove("conf/key") + fs.remove('conf/user') + fs.remove('conf/key') needSave=true autoRestart=true end diff --git a/parts/globalTables.lua b/parts/globalTables.lua index f688eebe..d59b3e13 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -183,8 +183,8 @@ ROYALEDATA={ } --Userdata tables -RANKS=FILE.load("conf/unlock")or{sprint_10l=0}--Ranks of modes -USER=FILE.load("conf/user")or{--User infomation +RANKS=FILE.load('conf/unlock')or{sprint_10l=0}--Ranks of modes +USER=FILE.load('conf/user')or{--User infomation --Network infos uid=false, authToken=false, @@ -236,7 +236,7 @@ customEnv0={ bg='blockfall', bgm='hang out', } -CUSTOMENV=FILE.load("conf/customEnv")--gameEnv for cutsom game +CUSTOMENV=FILE.load('conf/customEnv')--gameEnv for cutsom game if not CUSTOMENV or CUSTOMENV.version~=VERSION.code then CUSTOMENV=TABLE.copy(customEnv0) else @@ -314,9 +314,9 @@ SETTING={--Settings VKIcon=true,--If disp icon VKAlpha=.3, } -local S=FILE.load("conf/settings") +local S=FILE.load('conf/settings') if S then TABLE.update(S,SETTING)end -S=FILE.load("conf/data") +S=FILE.load('conf/data') if S then--Statistics STAT=S else @@ -335,7 +335,7 @@ else todayTime=0, }for i=1,29 do STAT.clear[i]={0,0,0,0,0,0}STAT.spin[i]={0,0,0,0,0,0,0}end end -keyMap=FILE.load("conf/key")or{--Key setting +keyMap=FILE.load('conf/key')or{--Key setting keyboard={ left=1,right=2,x=3,z=4,c=5, up=6,down=7,space=8,a=9,s=10, @@ -347,7 +347,7 @@ keyMap=FILE.load("conf/key")or{--Key setting leftshoulder=0, }, } -VK_org=FILE.load("conf/virtualkey")or{--Virtualkey layout, refresh all VKs' position with this before each game +VK_org=FILE.load('conf/virtualkey')or{--Virtualkey layout, refresh all VKs' position with this before each game {ava=true, x=80, y=720-200, r=80},--moveLeft {ava=true, x=320, y=720-200, r=80},--moveRight {ava=true, x=1280-80, y=720-200, r=80},--rotRight @@ -369,4 +369,4 @@ VK_org=FILE.load("conf/virtualkey")or{--Virtualkey layout, refresh all VKs' posi {ava=false, x=900, y=50, r=80},--addToLeft {ava=false, x=1000, y=50, r=80},--addToRight } -REPLAY=FILE.load("conf/replay")or{} \ No newline at end of file +REPLAY=FILE.load('conf/replay')or{} \ No newline at end of file diff --git a/parts/netPlayer.lua b/parts/netPlayer.lua index c95aea4e..e1e2e559 100644 --- a/parts/netPlayer.lua +++ b/parts/netPlayer.lua @@ -92,7 +92,6 @@ function netPLY.clear() end function netPLY.add(p) p.connected=false - p.username=p.username p.place=1e99 p.stat=false local a=rnd()*6.2832 diff --git a/parts/scenes/login.lua b/parts/scenes/login.lua index 810f3af7..364a1482 100644 --- a/parts/scenes/login.lua +++ b/parts/scenes/login.lua @@ -12,10 +12,10 @@ local function login() end NET.wsconn_user_pswd(email,password) if savePW then - FILE.save({email,password},"conf/account",'q') + FILE.save({email,password},'conf/account','q') else - if love.filesystem.getInfo("conf/account")then - love.filesystem.remove("conf/account") + if love.filesystem.getInfo('conf/account')then + love.filesystem.remove('conf/account') end end end @@ -23,7 +23,7 @@ end local scene={} function scene.sceneInit() - local data=FILE.load("conf/account") + local data=FILE.load('conf/account') if data then savePW=true emailBox:setText(data[1]) diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index bb9c86f0..3abae973 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -9,10 +9,10 @@ local snapUnit=1 local selected--Button selected local function save1() - FILE.save(VK_org,"conf/vkSave1") + FILE.save(VK_org,'conf/vkSave1') end local function load1() - local D=FILE.load("conf/vkSave1") + local D=FILE.load('conf/vkSave1') if D then TABLE.update(D,VK_org) else @@ -20,10 +20,10 @@ local function load1() end end local function save2() - FILE.save(VK_org,"conf/vkSave2") + FILE.save(VK_org,'conf/vkSave2') end local function load2() - local D=FILE.load("conf/vkSave2") + local D=FILE.load('conf/vkSave2') if D then TABLE.update(D,VK_org) else diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index 39936f50..322e0034 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -3,7 +3,6 @@ local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth local gc_draw,gc_line=gc.draw,gc.line local gc_print=gc.print - local abs,int,sin=math.abs,math.floor,math.sin local mStr=mStr