read if gay

This commit is contained in:
Crispy 2025-06-01 02:23:34 +02:00
parent 4f2631b349
commit 61eefcba8c
24 changed files with 21871 additions and 4224 deletions

View file

@ -11,9 +11,9 @@ function build(chunk)
for w = 1,8 do
store[h][w] = {depth = 0}
for d = 1,8 do
bool, data = sf.blockat(x+w,z+d,y+h)
bool, block = sf.blockat(x+w,z+d,y+h)
if bool then
store[h][w][d] = data
store[h][w][d] = block
store[h][w].depth = d
grocerylist[store[h][w][d]] =
(grocerylist[store[h][w][d]] or 0)+1
@ -30,7 +30,7 @@ function build(chunk)
if store.height==0 then
--print("cell at",x,y,z,"is done")
return true
end
flag = false
count = im.countinventory()
@ -45,21 +45,21 @@ function build(chunk)
flag = true
end
if flag then
pf.to(vector.new(pf.home.x,position.y+8,pf.home.z))
pf.returnHome()
return false
pf.to(vector.new(pf.home.x,position.y+8,pf.home.z))
pf.returnHome()
return false
end
pf.to(origin + vector.new(x+1,y+8,z+1))
for w = 1,8 do
for h = 1,8 do
for d = 1,8 do
for d = 1,8 do
if store[h][w][d] then
pf.to(origin+vector.new(x+w,y+h,z+d))
im.select(store[h][w][d])
turtle.placeDown()
end
end
end
end
end
return true
end
@ -72,10 +72,10 @@ function stringtovec(str)
return unpack(parts)
end
repeat
rednet.send(1,nil,"getnexttobuild")
repeat
rednet.send(1,(_G.position-origin):tostring(),"getnexttobuild")
_,chunk = rednet.receive("nexttobuild")
until not build(chunk)
until not build(chunk)
rednet.send(1,chunk,"failedtobuild")