make an error with filled lines when using cc (#1015)

fixes #1013
This commit is contained in:
Imple Lee
2023-10-20 22:47:04 +08:00
committed by GitHub
parent 8e169dbde8
commit 045deb6954
12 changed files with 36 additions and 0 deletions

View File

@@ -104,6 +104,31 @@ local function _play(mode)
MES.new('error',text.cc_swap)
return
end
local hasSolidLine=false
for _,F in next,CUSTOMGAME_LOCAL.field do
local solidLineInThisField=false
for y=1,#F do
local solidLine=true
for x=1,10 do
if F[y][x]==0 then
solidLine=false
break
end
end
if solidLine then
solidLineInThisField=true
break
end
end
if solidLineInThisField then
hasSolidLine=true
break
end
end
if hasSolidLine then
MES.new('error',text.cc_solid)
return
end
end
if #CUSTOMGAME_LOCAL.bag>0 then
for _=1,#CUSTOMGAME_LOCAL.bag do