修正解除自定义场地绘制高度限制后出现的其他衍生问题

“自定义场地页面”使用元表实现自动补充尺寸(编辑之后需要手动清空多余空行,目前仅一处)
This commit is contained in:
MrZ626
2021-10-06 22:27:02 +08:00
parent 3060d89ed4
commit d932a0a990
5 changed files with 37 additions and 66 deletions

View File

@@ -4,15 +4,12 @@ return{
load=function()
applyCustomGame()
for y=1,20 do
if notEmptyLine(FIELD[1][y])then
--Switch clear sprint mode on
GAME.modeEnv.dropPiece=require'parts.eventsets.checkClearBoard'.dropPiece
goto BREAK_clearMode
end
--Switch clear sprint mode on
if #FIELD[1]>0 then
GAME.modeEnv.dropPiece=require'parts.eventsets.checkClearBoard'.dropPiece
else
GAME.modeEnv.dropPiece=NULL
end
GAME.modeEnv.dropPiece=NULL
::BREAK_clearMode::
PLY.newPlayer(1)
local AItype=GAME.modeEnv.opponent:sub(1,2)
local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1))

View File

@@ -8,7 +8,7 @@ return{
dropPiece=function(P)
local D=P.modeData
local F=FIELD[D.finished+1]
for y=1,20 do
for y=1,#F do
local L=P.field[y]
for x=1,10 do
local a,b=F[y][x],L and L[x]or 0
@@ -42,7 +42,7 @@ return{
local mark=TEXTURE.puzzleMark
local F=FIELD[P.modeData.finished+1]
gc_setColor(1,1,1)
for y=1,20 do for x=1,10 do
for y=1,#F do for x=1,10 do
local T=F[y][x]
if T~=0 then
gc_draw(mark[T],30*x-30,600-30*y)