整理代码

This commit is contained in:
MrZ626
2021-11-08 03:08:42 +08:00
parent 546104ba5b
commit cce93b6df9
3 changed files with 7 additions and 7 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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,