add small progress thing in fill
This commit is contained in:
@@ -90,14 +90,21 @@ local function fill(ntype, x,y,z, buf, sx,sz)
|
||||
|
||||
local neighbors = fill_getneighbors(x,y,z, sx,sz, inittype,buf)
|
||||
buf[posasstring(x,y,z)] = ntype
|
||||
local processed = 0
|
||||
local totalneighbors = #neighbors
|
||||
term.setcol(colors.white, colors.black)
|
||||
while #neighbors > 0 do
|
||||
term.setCursorPos(1,1)
|
||||
term.write(tostring(processed).."/"..tostring(#totalneighbors))
|
||||
local cn = table.remove(neighbors, 1)
|
||||
local cx,cz = cn[1],cn[2]
|
||||
local newneigh = fill_getneighbors(cx,y,cz, sx,sz, inittype,buf)
|
||||
for _,v in pairs(newneigh) do
|
||||
table.insert(neighbors, v)
|
||||
totalneighbors = totalneighbors + 1
|
||||
end
|
||||
buf[posasstring(cx,y,cz)] = ntype
|
||||
processed = processed + 1
|
||||
end
|
||||
end
|
||||
local function newdesign()
|
||||
|
||||
Reference in New Issue
Block a user