From 59a5b529935c8beccad337d6760ec98e09841533 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 8 Nov 2021 03:08:42 +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 | 8 ++++---- parts/scenes/app_2048.lua | 4 ++-- parts/scenes/custom_field.lua | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main.lua b/main.lua index bb21a7bf..a554eb80 100644 --- a/main.lua +++ b/main.lua @@ -143,8 +143,8 @@ Z.setOnFnKeys({ function() if GAME.playing and not GAME.net then for _=1,8 do - local P=PLY_ALIVE[math.random(#PLY_ALIVE)] - if P and P~=PLAYERS[1]then + if #PLY_ALIVE>1 then + local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)] P.lastRecv=PLAYERS[1] P:lose() end @@ -153,7 +153,7 @@ Z.setOnFnKeys({ end, function()print(WIDGET.getSelected()or"no widget selected")end, function()for k,v in next,_G do print(k,v)end end, - function()if love["_openConsole"]then love["_openConsole"]()end end, + function()if love['_openConsole']then love['_openConsole']()end end, }) do--Z.setOnFocus local function task_autoSoundOff() @@ -222,7 +222,7 @@ if missionData then DATA.pasteMission(missionData) end local customData=FILE.load('conf/customEnv') -if customData and customData.version==VERSION.code then +if customData and customData['version']==VERSION.code then TABLE.complete(customData,CUSTOMENV) end TABLE.complete(require"parts.customEnv0",CUSTOMENV) diff --git a/parts/scenes/app_2048.lua b/parts/scenes/app_2048.lua index 6973eb57..114327de 100644 --- a/parts/scenes/app_2048.lua +++ b/parts/scenes/app_2048.lua @@ -261,8 +261,8 @@ local moveFunc={ right=moveRight, } local arrows={ - up="↑",down="↓",left="←",right="→", - ["↑"]="up",["↓"]="down",["←"]="left",["→"]="right", + up='↑',down='↓',left='←',right='→', + ['↑']='up',['↓']='down',['←']='left',['→']='right', } local function setFocus(n) if state~=2 then diff --git a/parts/scenes/custom_field.lua b/parts/scenes/custom_field.lua index 60c594ab..f480db26 100644 --- a/parts/scenes/custom_field.lua +++ b/parts/scenes/custom_field.lua @@ -23,7 +23,7 @@ local function isEmpty(L) return true end local penKey={ - ["1"]=1,["2"]=2,["3"]=3,["4"]=4,["5"]=5,["6"]=6,["7"]=7,["8"]=8, + ['1']=1,['2']=2,['3']=3,['4']=4,['5']=5,['6']=6,['7']=7,['8']=8, q=9,w=10,e=11,r=12,t=13,y=14,u=15,i=16, a=17,s=18,d=19,f=20,g=21,h=22,j=23,k=24, z=0,x=-1,