De-nest Construct modes' display code

This commit is contained in:
NOT_A_ROBOT
2023-10-03 07:32:56 +07:00
parent a475232432
commit 2f6a3392e6
3 changed files with 87 additions and 96 deletions

View File

@@ -60,16 +60,15 @@ return {
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
end
if not D.showGuide then return end
ply_applyField(P)
local mark=TEXTURE.puzzleMark
if D.showGuide then
local firstMistake=nil
for y=1,D.rankPts+1 do
for x=1,10 do
local texture=targetField[y][x]
-- Missing blocks
if not P:solid(x,y) and texture>0 then
-- Missing block under overhang
if P:solid(x,y+1) then
firstMistake=firstMistake or y
@@ -77,7 +76,6 @@ return {
else
gc_setColor(COLOR.Z)
end
gc_draw(mark[texture],30*x-30,600-30*y)
elseif texture<0 then
-- X always gets displayed, color changes based on whether there is a block there
@@ -97,7 +95,6 @@ return {
love.graphics.rectangle("fill",0,600-30*y,300,30)
end
end
end
PLY.draw.cancelField()
end,
task=function(P)

View File

@@ -61,16 +61,15 @@ return {
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
end
if not D.showGuide then return end
ply_applyField(P)
local mark=TEXTURE.puzzleMark
if D.showGuide then
local firstMistake=nil
for y=1,D.rankPts+1 do
for x=1,10 do
local texture=targetField[y][x]
-- Missing blocks
if not P:solid(x,y) and texture>0 then
-- Missing block under overhang
if P:solid(x,y+1) then
firstMistake=firstMistake or y
@@ -78,7 +77,6 @@ return {
else
gc_setColor(COLOR.Z)
end
gc_draw(mark[texture],30*x-30,600-30*y)
elseif texture<0 then
-- X always gets displayed, color changes based on whether there is a block there
@@ -98,7 +96,6 @@ return {
love.graphics.rectangle("fill",0,600-30*y,300,30)
end
end
end
PLY.draw.cancelField()
end,
task=function(P)

View File

@@ -61,16 +61,15 @@ return {
GC.mStr(text.highest:repD(D.maxRankPts+1),63,336)
end
if not D.showGuide then return end
ply_applyField(P)
local mark=TEXTURE.puzzleMark
if D.showGuide then
local firstMistake=nil
for y=1,D.rankPts+1 do
for x=1,10 do
local texture=targetField[y][x]
-- Missing blocks
if not P:solid(x,y) and texture>0 then
-- Missing block under overhang
if P:solid(x,y+1) then
firstMistake=firstMistake or y
@@ -78,7 +77,6 @@ return {
else
gc_setColor(COLOR.Z)
end
gc_draw(mark[texture],30*x-30,600-30*y)
elseif texture<0 then
-- X always gets displayed, color changes based on whether there is a block there
@@ -98,7 +96,6 @@ return {
love.graphics.rectangle("fill",0,600-30*y,300,30)
end
end
end
PLY.draw.cancelField()
end,
task=function(P)