fix fill hopefully A G A I N
This commit is contained in:
@@ -75,10 +75,10 @@ local function load(name)
|
||||
return content["buf"],content["dimensions"]
|
||||
end
|
||||
local function bufistype(buf, x,y,z, targettype)
|
||||
if targettype == 0 then
|
||||
return (buf[posasstring(x,y,z)] == 0) or (buf[posasstring(x,y,z)] == nil)
|
||||
if buf[posasstring(x,y,z)] == targettype then
|
||||
return true
|
||||
else
|
||||
return buf[posasstring(x,y,z)] == targettype
|
||||
return targettype == 0 and buf[posasstring(x,y,z)] == nil
|
||||
end
|
||||
end
|
||||
local function fill_getneighbors(x,y,z, sx,sz, seltype,buf)
|
||||
@@ -91,6 +91,7 @@ local function fill_getneighbors(x,y,z, sx,sz, seltype,buf)
|
||||
end
|
||||
local function fill(ntype, x,y,z, buf, sx,sz)
|
||||
local inittype = buf[posasstring(x,y,z)]
|
||||
if inittype == ntype then return end -- no work needs to be done
|
||||
|
||||
local neighbors = fill_getneighbors(x,y,z, sx,sz, inittype,buf)
|
||||
buf[posasstring(x,y,z)] = ntype
|
||||
|
||||
Reference in New Issue
Block a user