This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
luingar's profile picture

Quarry Filling Program

Started by luingar, 27 July 2012 - 05:03 PM
luingar #1
Posted 27 July 2012 - 07:03 PM
This program fills in the hole left by buildcraft quarries with whatever resource you load the turtle's inventory with (I recommend dirt obviously). Supports mid-run reloading, only puts a 1 block cover of dirt.

local x = 1
turtle.forward() -- Move into hole
while(true)
do
   while (turtle.detectDown() == false)
   do
	 if(turtle.getItemCount(x)==0)
	 then
	    x=x+1
	    if(x==10) then
		  x = 1
	    end
	    turtle.select(x)
	 end
	 turtle.placeDown()
	 turtle.forward()
	 if(turtle.detect()) and (turtle.detectDown() == false)
	 then
	   turtle.turnLeft()
	 end
   end
   while (turtle.detectDown() == true) do
    turtle.back()
    turtle.turnLeft()
    turtle.forward()
   end
--   turtle.back()
--   turtle.turnLeft()
end
Tiin57 #2
Posted 27 July 2012 - 07:18 PM
Where is code or a download?
luingar #3
Posted 28 July 2012 - 06:58 AM
Sorry, i don't know what happened. added to original post.
Noodle #4
Posted 28 July 2012 - 10:36 AM
Why so much spacing?
while(true)
do
TortuousAugur #5
Posted 09 September 2012 - 12:33 PM
Does this fill all the way to the bottom, just a few layers, or a specified ammount from the surface?
PROdotes #6
Posted 09 September 2012 - 02:01 PM
looking at the code, it only fills the top… and i think it works in a spiral pattern… that's from what i can roughly determine :D/>/>
TortuousAugur #7
Posted 12 September 2012 - 03:54 PM
looking at the code, it only fills the top… and i think it works in a spiral pattern… that's from what i can roughly determine :)/>/>
If that's the case, I'll be using this to cover my massive quarry holes for sure. Just don't have the resources to fill the whole thing. If I remember correctly, it was around 1.5 x 2 chunks…