整理代码
This commit is contained in:
8
main.lua
8
main.lua
@@ -143,8 +143,8 @@ Z.setOnFnKeys({
|
|||||||
function()
|
function()
|
||||||
if GAME.playing and not GAME.net then
|
if GAME.playing and not GAME.net then
|
||||||
for _=1,8 do
|
for _=1,8 do
|
||||||
local P=PLY_ALIVE[math.random(#PLY_ALIVE)]
|
if #PLY_ALIVE>1 then
|
||||||
if P and P~=PLAYERS[1]then
|
local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)]
|
||||||
P.lastRecv=PLAYERS[1]
|
P.lastRecv=PLAYERS[1]
|
||||||
P:lose()
|
P:lose()
|
||||||
end
|
end
|
||||||
@@ -153,7 +153,7 @@ Z.setOnFnKeys({
|
|||||||
end,
|
end,
|
||||||
function()print(WIDGET.getSelected()or"no widget selected")end,
|
function()print(WIDGET.getSelected()or"no widget selected")end,
|
||||||
function()for k,v in next,_G do print(k,v)end 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
|
do--Z.setOnFocus
|
||||||
local function task_autoSoundOff()
|
local function task_autoSoundOff()
|
||||||
@@ -222,7 +222,7 @@ if missionData then
|
|||||||
DATA.pasteMission(missionData)
|
DATA.pasteMission(missionData)
|
||||||
end
|
end
|
||||||
local customData=FILE.load('conf/customEnv')
|
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)
|
TABLE.complete(customData,CUSTOMENV)
|
||||||
end
|
end
|
||||||
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
||||||
|
|||||||
@@ -261,8 +261,8 @@ local moveFunc={
|
|||||||
right=moveRight,
|
right=moveRight,
|
||||||
}
|
}
|
||||||
local arrows={
|
local arrows={
|
||||||
up="↑",down="↓",left="←",right="→",
|
up='↑',down='↓',left='←',right='→',
|
||||||
["↑"]="up",["↓"]="down",["←"]="left",["→"]="right",
|
['↑']='up',['↓']='down',['←']='left',['→']='right',
|
||||||
}
|
}
|
||||||
local function setFocus(n)
|
local function setFocus(n)
|
||||||
if state~=2 then
|
if state~=2 then
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ local function isEmpty(L)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
local penKey={
|
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,
|
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,
|
a=17,s=18,d=19,f=20,g=21,h=22,j=23,k=24,
|
||||||
z=0,x=-1,
|
z=0,x=-1,
|
||||||
|
|||||||
Reference in New Issue
Block a user