fix attempt #2
This commit is contained in:
14
src/main.lua
14
src/main.lua
@@ -385,13 +385,13 @@ local function render(buf, pbuf, cx,cy,cz, tx,tz, sx,sz, shouldsetlist,invertsli
|
||||
}
|
||||
|
||||
local tsx,tsy = term.getSize()
|
||||
local camx,camy = cx+tsx/2,cz+tsy/2
|
||||
local camx,camy = cx-tsx/2,cz-tsy/2
|
||||
|
||||
reset()
|
||||
for x=1+camx,sx+camx,1 do
|
||||
for z=1+camy,sz+camy,1 do
|
||||
local currentbuf = pbuf[posasstring(x, cy, z)]
|
||||
term.setCursorPos(x-camx, z-camy)
|
||||
for x=1,sx,1 do
|
||||
for z=1,sz,1 do
|
||||
local currentbuf = pbuf[posasstring(x+camx, cy, z+camy)]
|
||||
term.setCursorPos(x+camx, z+camy)
|
||||
if currentbuf then -- wall
|
||||
term.blit(" ", colors.toBlit(colors.white), colors.toBlit(colors.white))
|
||||
elseif (currentbuf == false or currentbuf == nil) and (invertslist and not tcontains(shouldsetlist, buf[posasstring(x, cy, z)]) or tcontains(shouldsetlist, buf[posasstring(x, cy, z)])) then -- nothing
|
||||
@@ -399,9 +399,9 @@ local function render(buf, pbuf, cx,cy,cz, tx,tz, sx,sz, shouldsetlist,invertsli
|
||||
end
|
||||
end
|
||||
end
|
||||
term.setCursorPos(cx,cz)
|
||||
term.setCursorPos(cx+camx,cz+camy)
|
||||
term.blit(" ", colors.toBlit(colors.red), colors.toBlit(colors.red))
|
||||
term.setCursorPos(tx,tz)
|
||||
term.setCursorPos(tx+camx,tz+camy)
|
||||
term.blit(" ", colors.toBlit(colors.lime), colors.toBlit(colors.lime))
|
||||
end
|
||||
local function printdes(buf, dimensions)
|
||||
|
||||
Reference in New Issue
Block a user