清除自定义游戏的老版本残留无用代码,移除bagLen变量,直接用bagLine保存包间隔块数
This commit is contained in:
@@ -31,10 +31,10 @@ local function checkClear(P)
|
||||
D.finished=D.finished+1
|
||||
if FIELD[D.finished+1]then
|
||||
P.waiting=26
|
||||
for _=#P.field,1,-1 do
|
||||
FREEROW.discard(P.field[_])
|
||||
FREEROW.discard(P.visTime[_])
|
||||
P.field[_],P.visTime[_]=nil
|
||||
for i=#P.field,1,-1 do
|
||||
FREEROW.discard(P.field[i])
|
||||
FREEROW.discard(P.visTime[i])
|
||||
P.field[i],P.visTime[i]=nil
|
||||
end
|
||||
setField(P,D.finished+1)
|
||||
SYSFX.newShade(1.4,P.absFieldX,P.absFieldY,300*P.size,610*P.size,.6,.8,.6)
|
||||
@@ -50,19 +50,17 @@ return{
|
||||
load=function()
|
||||
applyCustomGame()
|
||||
|
||||
local ENV=GAME.modeEnv
|
||||
ENV.dropPiece=PLY.check_lineReach
|
||||
for y=1,20 do
|
||||
if notAir(FIELD[1][y])then
|
||||
--Switch clear sprint mode on
|
||||
ENV.dropPiece=checkClear
|
||||
GAME.modeEnv.dropPiece=checkClear
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
PLY.newPlayer(1)
|
||||
local AItype=ENV.opponent:sub(1,2)
|
||||
local AIlevel=tonumber(ENV.opponent:sub(-1))
|
||||
local AItype=GAME.modeEnv.opponent:sub(1,2)
|
||||
local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1))
|
||||
if AItype=='9S'then
|
||||
PLY.newAIPlayer(2,AIBUILDER('9S',2*AIlevel))
|
||||
elseif AItype=='CC'then
|
||||
|
||||
@@ -39,10 +39,9 @@ return{
|
||||
},
|
||||
load=function()
|
||||
applyCustomGame()
|
||||
local AItype=GAME.modeEnv.opponent:sub(1,2)
|
||||
local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1))
|
||||
PLY.newPlayer(1)
|
||||
local ENV=GAME.modeEnv
|
||||
local AItype=ENV.opponent:sub(1,2)
|
||||
local AIlevel=tonumber(ENV.opponent:sub(-1))
|
||||
if AItype=='9S'then
|
||||
PLY.newAIPlayer(2,AIBUILDER('9S',2*AIlevel))
|
||||
elseif AItype=='CC'then
|
||||
|
||||
@@ -494,7 +494,7 @@ function draw.drawNext_norm(P)
|
||||
|
||||
if ENV.bagLine then
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=-P.pieceCount%ENV.bagLen,N-1,ENV.bagLen do--i=phase
|
||||
for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase
|
||||
gc_rectangle('fill',2,72*i+3,120,2)
|
||||
end
|
||||
end
|
||||
@@ -528,7 +528,7 @@ function draw.drawNext_hidden(P)
|
||||
|
||||
if ENV.bagLine then
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=-P.pieceCount%ENV.bagLen,N-1,ENV.bagLen do--i=phase
|
||||
for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase
|
||||
gc_rectangle('fill',2,72*i+3,120,2)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -311,11 +311,7 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
ENV.arr=max(ENV.arr,ENV.minarr)
|
||||
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
|
||||
|
||||
if ENV.sequence~='bag'and ENV.sequence~='loop'then
|
||||
ENV.bagLine=false
|
||||
else
|
||||
ENV.bagLen=#ENV.seqData
|
||||
end
|
||||
ENV.bagLine=(ENV.sequence=='bag'or ENV.sequence=='loop')and #ENV.seqData
|
||||
|
||||
if ENV.nextCount==0 then ENV.nextPos=false end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user