eventSet可以修改所有参数
整理代码
This commit is contained in:
@@ -659,7 +659,6 @@ function love.run()
|
|||||||
gc_print("Lines "..FREEROW.getCount(),safeX+5,-60)
|
gc_print("Lines "..FREEROW.getCount(),safeX+5,-60)
|
||||||
gc_print("Tasks "..TASK.getCount(),safeX+5,-80)
|
gc_print("Tasks "..TASK.getCount(),safeX+5,-80)
|
||||||
gc_print("Voices "..VOC.getQueueCount(),safeX+5,-100)
|
gc_print("Voices "..VOC.getQueueCount(),safeX+5,-100)
|
||||||
gc_print(tostring(GAME.playing),safeX+5,-120)
|
|
||||||
|
|
||||||
--Update & draw frame time
|
--Update & draw frame time
|
||||||
ins(frameTimeList,1,dt)rem(frameTimeList,126)
|
ins(frameTimeList,1,dt)rem(frameTimeList,126)
|
||||||
|
|||||||
2
conf.lua
2
conf.lua
@@ -32,4 +32,4 @@ function love.conf(t)
|
|||||||
M.graphics,M.font,M.image=true,true,true
|
M.graphics,M.font,M.image=true,true,true
|
||||||
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
|
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
|
||||||
M.physics=false
|
M.physics=false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,21 @@
|
|||||||
return{
|
return{
|
||||||
|
das=16,
|
||||||
|
arr=6,
|
||||||
|
sddas=2,
|
||||||
|
sdarr=2,
|
||||||
|
irs=false,
|
||||||
|
ims=false,
|
||||||
|
drop=3,
|
||||||
|
lock=3,
|
||||||
|
wait=10,
|
||||||
|
fall=25,
|
||||||
|
fieldH=19,
|
||||||
|
nextCount=1,
|
||||||
|
holdCount=0,
|
||||||
|
RS='Classic',
|
||||||
|
sequence='rnd',
|
||||||
|
noTele=true,
|
||||||
|
keyCancel={5,6},
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(75)
|
setFont(75)
|
||||||
local r=P.modeData.target*.1
|
local r=P.modeData.target*.1
|
||||||
@@ -7,25 +24,6 @@ return{
|
|||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.das=16
|
|
||||||
P.gameEnv.arr=6
|
|
||||||
P.gameEnv.sddas=2
|
|
||||||
P.gameEnv.sdarr=2
|
|
||||||
P.gameEnv.irs=false
|
|
||||||
P.gameEnv.ims=false
|
|
||||||
P.gameEnv.drop=3
|
|
||||||
P.lockDelay=3
|
|
||||||
P.gameEnv.lock=3
|
|
||||||
P.gameEnv.wait=10
|
|
||||||
P.gameEnv.fall=25
|
|
||||||
P.gameEnv.fieldH=19
|
|
||||||
P.gameEnv.nextCount=1
|
|
||||||
P.gameEnv.holdCount=0
|
|
||||||
P.gameEnv.RS='Classic'
|
|
||||||
P.gameEnv.sequence='rnd'
|
|
||||||
P.gameEnv.noTele=true
|
|
||||||
P.gameEnv.keyCancel={5,6}
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25}
|
local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=60,
|
||||||
|
wait=8,
|
||||||
|
fall=20,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.drop=60
|
|
||||||
P.gameEnv.wait=8
|
|
||||||
P.gameEnv.fall=20
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
return
|
return
|
||||||
{
|
{
|
||||||
|
drop=.5,
|
||||||
|
wait=8,
|
||||||
|
fall=20,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.drop=.5
|
|
||||||
P.gameEnv.wait=8
|
|
||||||
P.gameEnv.fall=20
|
|
||||||
|
|
||||||
P.modeData.target=50
|
P.modeData.target=50
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
|
|||||||
@@ -2,15 +2,14 @@ local dropSpeed={50,40,30,24,18,14,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25}
|
|||||||
|
|
||||||
return
|
return
|
||||||
{
|
{
|
||||||
|
drop=60,
|
||||||
|
wait=8,
|
||||||
|
fall=20,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.drop=60
|
|
||||||
P.gameEnv.wait=8
|
|
||||||
P.gameEnv.fall=20
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ local sectionName={"D","C","B","A","A+","S-","S","S+","S+","SS","SS","U","U","X"
|
|||||||
local passPoint=16
|
local passPoint=16
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=0,
|
||||||
|
lock=15,
|
||||||
|
wait=15,
|
||||||
|
fall=6,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
mText(drawableText.line,63,310)
|
mText(drawableText.line,63,310)
|
||||||
mText(drawableText.techrash,63,420)
|
mText(drawableText.techrash,63,420)
|
||||||
@@ -25,12 +29,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=15
|
|
||||||
P.gameEnv.lock=15
|
|
||||||
P.gameEnv.wait=15
|
|
||||||
P.gameEnv.fall=6
|
|
||||||
|
|
||||||
P.modeData.rankPoint=0
|
P.modeData.rankPoint=0
|
||||||
P.modeData.rankName=sectionName[1]
|
P.modeData.rankName=sectionName[1]
|
||||||
while true do
|
while true do
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
return{
|
return{
|
||||||
|
drop=0,
|
||||||
|
lock=12,
|
||||||
|
wait=10,
|
||||||
|
fall=10,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
@@ -42,12 +46,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=12
|
|
||||||
P.gameEnv.lock=12
|
|
||||||
P.gameEnv.wait=10
|
|
||||||
P.gameEnv.fall=10
|
|
||||||
|
|
||||||
P.modeData.pt=0
|
P.modeData.pt=0
|
||||||
P.modeData.target=100
|
P.modeData.target=100
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ local death_wait={10,9, 8, 7,6, 6,6,5,5,4}
|
|||||||
local death_fall={10,9, 8, 7,6, 6,5,5,4,4}
|
local death_fall={10,9, 8, 7,6, 6,5,5,4,4}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=0,
|
||||||
|
lock=death_lock[1],
|
||||||
|
wait=death_wait[1],
|
||||||
|
fall=death_fall[1],
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
@@ -58,12 +62,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=death_lock[1]
|
|
||||||
P.gameEnv.lock=death_lock[1]
|
|
||||||
P.gameEnv.wait=death_wait[1]
|
|
||||||
P.gameEnv.fall=death_fall[1]
|
|
||||||
|
|
||||||
P.modeData.pt=0
|
P.modeData.pt=0
|
||||||
P.modeData.target=100
|
P.modeData.target=100
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ local rush_wait={12,10, 9, 8, 7}
|
|||||||
local rush_fall={18,16,14,13,12}
|
local rush_fall={18,16,14,13,12}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=0,
|
||||||
|
lock=rush_lock[1],
|
||||||
|
wait=rush_wait[1],
|
||||||
|
fall=rush_fall[1],
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
@@ -44,12 +48,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=rush_lock[1]
|
|
||||||
P.gameEnv.lock=rush_lock[1]
|
|
||||||
P.gameEnv.wait=rush_wait[1]
|
|
||||||
P.gameEnv.fall=rush_fall[1]
|
|
||||||
|
|
||||||
P.modeData.pt=0
|
P.modeData.pt=0
|
||||||
P.modeData.target=100
|
P.modeData.target=100
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
return
|
return
|
||||||
{
|
{
|
||||||
|
das=6,
|
||||||
|
arr=2,
|
||||||
|
drop=0,
|
||||||
|
lock=15,
|
||||||
|
wait=6,
|
||||||
|
fall=2,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
PLY.draw.drawTargetLine(P,200-P.stat.row)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.das=6
|
|
||||||
P.gameEnv.arr=2
|
|
||||||
P:set20G(true)
|
|
||||||
P.gameEnv.lock=15
|
|
||||||
P.lockDelay=15
|
|
||||||
P.gameEnv.wait=6
|
|
||||||
P.gameEnv.fall=2
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
end,
|
end,
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ local rush_wait={12,11,11,10,10, 10,10, 9, 9, 9}
|
|||||||
local rush_fall={18,16,14,13,12, 12,11,11,10,10}
|
local rush_fall={18,16,14,13,12, 12,11,11,10,10}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=0,
|
||||||
|
lock=rush_lock[1],
|
||||||
|
wait=rush_wait[1],
|
||||||
|
fall=rush_fall[1],
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
@@ -58,12 +62,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=rush_lock[1]
|
|
||||||
P.gameEnv.lock=rush_lock[1]
|
|
||||||
P.gameEnv.wait=rush_wait[1]
|
|
||||||
P.gameEnv.fall=rush_fall[1]
|
|
||||||
|
|
||||||
P.modeData.pt=0
|
P.modeData.pt=0
|
||||||
P.modeData.target=100
|
P.modeData.target=100
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
return
|
return
|
||||||
{
|
{
|
||||||
|
drop=0,
|
||||||
|
lock=15,
|
||||||
|
wait=10,
|
||||||
|
fall=10,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
@@ -133,11 +137,6 @@ return
|
|||||||
P.modeData.pt=p
|
P.modeData.pt=p
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=15
|
|
||||||
P.gameEnv.lock=15
|
|
||||||
P.gameEnv.wait=10
|
|
||||||
P.gameEnv.fall=10
|
|
||||||
P.modeData.target=12
|
P.modeData.target=12
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@ local death_wait={10, 9, 8,7,6, 6,5,4,4,3}
|
|||||||
local death_fall={10, 9, 8,7,6, 5,5,4,3,3}
|
local death_fall={10, 9, 8,7,6, 5,5,4,3,3}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=0,
|
||||||
|
lock=death_lock[1],
|
||||||
|
wait=death_wait[1],
|
||||||
|
fall=death_fall[1],
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
|
||||||
end,
|
end,
|
||||||
@@ -53,12 +57,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P:set20G(true)
|
|
||||||
P.lockDelay=death_lock[1]
|
|
||||||
P.gameEnv.lock=death_lock[1]
|
|
||||||
P.gameEnv.wait=death_wait[1]
|
|
||||||
P.gameEnv.fall=death_fall[1]
|
|
||||||
|
|
||||||
P.modeData.pt=0
|
P.modeData.pt=0
|
||||||
P.modeData.target=100
|
P.modeData.target=100
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
return{
|
return{
|
||||||
|
heightLimit=4,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
setFont(60)
|
setFont(60)
|
||||||
mStr(P.stat.pc,63,340)
|
mStr(P.stat.pc,63,340)
|
||||||
mText(drawableText.pc,63,410)
|
mText(drawableText.pc,63,410)
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
|
||||||
P.gameEnv.heightLimit=4
|
|
||||||
end,
|
|
||||||
dropPiece=function(P)
|
dropPiece=function(P)
|
||||||
if P.lastPiece.pc then
|
if P.lastPiece.pc then
|
||||||
P.gameEnv.heightLimit=4
|
P.gameEnv.heightLimit=4
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ local gc=love.graphics
|
|||||||
local dropSpeed={[0]=40,33,27,20,16,12,11,10,9,8,7,6,5,4,3,3,2,2,1,1}
|
local dropSpeed={[0]=40,33,27,20,16,12,11,10,9,8,7,6,5,4,3,3,2,2,1,1}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=40,
|
||||||
|
lock=1e99,
|
||||||
|
wait=20,
|
||||||
|
fall=90,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
|
|
||||||
@@ -32,11 +36,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.drop=40
|
|
||||||
P.gameEnv.lock=1e99
|
|
||||||
P.gameEnv.wait=20
|
|
||||||
P.gameEnv.fall=90
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
P.modeData.bpm=40
|
P.modeData.bpm=40
|
||||||
P.modeData.beatFrame=90
|
P.modeData.beatFrame=90
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ local gc=love.graphics
|
|||||||
local dropSpeed={[0]=30,26,23,20,17,14,12,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25}
|
local dropSpeed={[0]=30,26,23,20,17,14,12,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=30,
|
||||||
|
lock=1e99,
|
||||||
|
wait=10,
|
||||||
|
fall=60,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
|
|
||||||
@@ -32,11 +36,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.drop=30
|
|
||||||
P.gameEnv.lock=1e99
|
|
||||||
P.gameEnv.wait=10
|
|
||||||
P.gameEnv.fall=60
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
P.modeData.bpm=60
|
P.modeData.bpm=60
|
||||||
P.modeData.beatFrame=60
|
P.modeData.beatFrame=60
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
drop=.5,
|
||||||
|
lock=1e99,
|
||||||
|
wait=5,
|
||||||
|
fall=30,
|
||||||
mesDisp=function(P)
|
mesDisp=function(P)
|
||||||
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
|
||||||
|
|
||||||
@@ -37,11 +41,6 @@ return{
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task=function(P)
|
task=function(P)
|
||||||
P.gameEnv.drop=.5
|
|
||||||
P.gameEnv.lock=1e99
|
|
||||||
P.gameEnv.wait=5
|
|
||||||
P.gameEnv.fall=30
|
|
||||||
|
|
||||||
P.modeData.target=10
|
P.modeData.target=10
|
||||||
P.modeData.bpm=120
|
P.modeData.bpm=120
|
||||||
P.modeData.beatFrame=30
|
P.modeData.beatFrame=30
|
||||||
|
|||||||
@@ -222,12 +222,12 @@ local function _loadGameEnv(P)--Load gameEnv
|
|||||||
v=GAME.setting[k] --Game setting
|
v=GAME.setting[k] --Game setting
|
||||||
-- print("game-"..k..":"..tostring(v))
|
-- print("game-"..k..":"..tostring(v))
|
||||||
elseif SETTING[k]~=nil then
|
elseif SETTING[k]~=nil then
|
||||||
v=SETTING[k] --Global setting
|
v=SETTING[k] --Global setting
|
||||||
-- print("global-"..k..":"..tostring(v))
|
-- print("global-"..k..":"..tostring(v))
|
||||||
-- else
|
-- else
|
||||||
-- print("default-"..k..":"..tostring(v))
|
-- print("default-"..k..":"..tostring(v))
|
||||||
end
|
end
|
||||||
if type(v)~='table'then--Default setting
|
if type(v)~='table'then --Default setting
|
||||||
ENV[k]=v
|
ENV[k]=v
|
||||||
else
|
else
|
||||||
ENV[k]=TABLE.copy(v)
|
ENV[k]=TABLE.copy(v)
|
||||||
@@ -278,6 +278,37 @@ end
|
|||||||
local function _applyGameEnv(P)--Finish gameEnv processing
|
local function _applyGameEnv(P)--Finish gameEnv processing
|
||||||
local ENV=P.gameEnv
|
local ENV=P.gameEnv
|
||||||
|
|
||||||
|
--Apply events
|
||||||
|
ENV.mesDisp=_mergeFuncTable(ENV.mesDisp,{})
|
||||||
|
ENV.dropPiece=_mergeFuncTable(ENV.dropPiece,{})
|
||||||
|
ENV.task=_mergeFuncTable(ENV.task,{})
|
||||||
|
|
||||||
|
--Apply eventSet
|
||||||
|
if ENV.eventSet and ENV.eventSet~="X"then
|
||||||
|
if type(ENV.eventSet)=='string'then
|
||||||
|
local eventSet=require('parts.eventsets.'..ENV.eventSet)
|
||||||
|
if eventSet then
|
||||||
|
for k,v in next,eventSet do
|
||||||
|
if
|
||||||
|
k=='mesDisp'or
|
||||||
|
k=='dropPiece'or
|
||||||
|
k=='task'
|
||||||
|
then
|
||||||
|
_mergeFuncTable(v,ENV[k])
|
||||||
|
elseif type(v)=='table'then
|
||||||
|
ENV[k]=TABLE.copy(v)
|
||||||
|
else
|
||||||
|
ENV[k]=v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
MES.new('warn',"No event set called: "..ENV.eventSet)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
MES.new('warn',"Wrong event set type: "..type(ENV.eventSet))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
P._20G=ENV.drop==0
|
P._20G=ENV.drop==0
|
||||||
P.dropDelay=ENV.drop
|
P.dropDelay=ENV.drop
|
||||||
P.lockDelay=ENV.lock
|
P.lockDelay=ENV.lock
|
||||||
@@ -285,7 +316,7 @@ local function _applyGameEnv(P)--Finish gameEnv processing
|
|||||||
|
|
||||||
P.life=ENV.life
|
P.life=ENV.life
|
||||||
|
|
||||||
P.keyAvailable={true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}
|
P.keyAvailable=TABLE.new(true,20)
|
||||||
if ENV.noTele then
|
if ENV.noTele then
|
||||||
for i=11,20 do
|
for i=11,20 do
|
||||||
if i~=14 then
|
if i~=14 then
|
||||||
@@ -361,28 +392,6 @@ local function _applyGameEnv(P)--Finish gameEnv processing
|
|||||||
if ENV.center==0 then ENV.center=false end
|
if ENV.center==0 then ENV.center=false end
|
||||||
if ENV.lineNum==0 then ENV.lineNum=false end
|
if ENV.lineNum==0 then ENV.lineNum=false end
|
||||||
|
|
||||||
--Apply events
|
|
||||||
ENV.mesDisp=_mergeFuncTable(ENV.mesDisp,{})
|
|
||||||
ENV.dropPiece=_mergeFuncTable(ENV.dropPiece,{})
|
|
||||||
ENV.task=_mergeFuncTable(ENV.task,{})
|
|
||||||
|
|
||||||
--Apply eventSet
|
|
||||||
if ENV.eventSet and ENV.eventSet~="X"then
|
|
||||||
if type(ENV.eventSet)=='string'then
|
|
||||||
local eventSet=require('parts.eventsets.'..ENV.eventSet)
|
|
||||||
if eventSet then
|
|
||||||
for k,v in next,eventSet do
|
|
||||||
assert(type(ENV[k])=='table',"No eventSet method: "..k)
|
|
||||||
_mergeFuncTable(v,ENV[k])
|
|
||||||
end
|
|
||||||
else
|
|
||||||
MES.new('warn',"No event set called: "..ENV.eventSet)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
MES.new('warn',"Wrong event set type: "..type(ENV.eventSet))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--Load tasks
|
--Load tasks
|
||||||
for i=1,#ENV.task do P:newTask(ENV.task[i])end
|
for i=1,#ENV.task do P:newTask(ENV.task[i])end
|
||||||
end
|
end
|
||||||
@@ -443,9 +452,8 @@ function PLY.newAIPlayer(id,AIdata,mini)
|
|||||||
P.type='computer'
|
P.type='computer'
|
||||||
|
|
||||||
_loadGameEnv(P)
|
_loadGameEnv(P)
|
||||||
local ENV=P.gameEnv
|
P.gameEnv.face={0,0,0,0,0,0,0}
|
||||||
ENV.face={0,0,0,0,0,0,0}
|
P.gameEnv.skin={1,7,11,3,14,4,9}
|
||||||
ENV.skin={1,7,11,3,14,4,9}
|
|
||||||
_applyGameEnv(P)
|
_applyGameEnv(P)
|
||||||
P:loadAI(AIdata)
|
P:loadAI(AIdata)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user