Posted 05 May 2012 - 07:23 AM
This is a pretty simple turtle program that removes the frames that remain after a BuildCraft Quarry has ran.
I am fluent in several other programming languages ( Java, Ruby, Python, Asm, some C, and a few others ) but this is my first Lua program. It took me about 4 hours to write (mostly figuring out how I wanted to implement it) and I still have a few changes to make. The next release will allow the turtle to be placed anywhere on the quarry frame and the code will have comments and better flow for others to learn from. Feel free to make any suggestions, praises, or criticisms.
Usage
The turtle will then begin the calibration process to determine its orientation to the quarry and go about removing the quarry. Once completed, the turtle will return to where it was originally placed and display the dimensions of the quarry frame it has just removed.
Note: When placing the turtle, the turtle must touch a corner frame piece, do not remove the corner of the frame and place the turtle there (see `Pictures – Properly placing the turtle` below for more information). The quarry frame must be fully intact, otherwise the calibration will be off, so remember to get a frame piece from another quarry or break a piece off when it is running.
Pictures
Place the turtle at a corner, put a piece of `Frame` in the first slot, and run the program.
http://i.imgur.com/sQt2V.png
http://i.imgur.com/8rLNZ.png
Once completed, the turtle will return to its starting position and will display the size of the quarry it just removed.
http://i.imgur.com/HD9yq.png
Pictures – Properly placing the turtle
http://i.imgur.com/9MJp2.png
These are the valid places (at the bottom and top of the frame) for the turtle. The blue line shows the corner frame piece. Notice the turtle does not have to face the frame, it just has to touch it. The turtle can even be above/below the frame.
http://i.imgur.com/PTqJC.png
DO NOT place the turtle in any of these positions.
1) DO NOT destroy a frame piece and place the turtle there.
2) DO NOT place the turtle on a frame piece that is not the corner piece.
3) DO NOT remove the corner frame piece and place the turtle there.
http://i.imgur.com/kOvDB.png
Releases
BCQuarryRemover v1.1: http://pastebin.com/R3bwhLwh
BCQuarryRemover v1.0: http://pastebin.com/BTf8xvvk
Changelog
Licensing Terms:
I am fluent in several other programming languages ( Java, Ruby, Python, Asm, some C, and a few others ) but this is my first Lua program. It took me about 4 hours to write (mostly figuring out how I wanted to implement it) and I still have a few changes to make. The next release will allow the turtle to be placed anywhere on the quarry frame and the code will have comments and better flow for others to learn from. Feel free to make any suggestions, praises, or criticisms.
Usage
Spoiler
Place the turtle adjacent to (top, bottom, a side) one of the corners of the frame, put a piece of quarry frame (not from the quarry you are removing) in the top-left turtle inventory slot, and run the program.The turtle will then begin the calibration process to determine its orientation to the quarry and go about removing the quarry. Once completed, the turtle will return to where it was originally placed and display the dimensions of the quarry frame it has just removed.
Note: When placing the turtle, the turtle must touch a corner frame piece, do not remove the corner of the frame and place the turtle there (see `Pictures – Properly placing the turtle` below for more information). The quarry frame must be fully intact, otherwise the calibration will be off, so remember to get a frame piece from another quarry or break a piece off when it is running.
Pictures
Spoiler
http://i.imgur.com/mouIP.pngPlace the turtle at a corner, put a piece of `Frame` in the first slot, and run the program.
http://i.imgur.com/sQt2V.png
http://i.imgur.com/8rLNZ.png
Once completed, the turtle will return to its starting position and will display the size of the quarry it just removed.
http://i.imgur.com/HD9yq.png
Pictures – Properly placing the turtle
Spoiler
The turtle must be adjacent to a corner frame piece (like the one selected here).http://i.imgur.com/9MJp2.png
These are the valid places (at the bottom and top of the frame) for the turtle. The blue line shows the corner frame piece. Notice the turtle does not have to face the frame, it just has to touch it. The turtle can even be above/below the frame.
http://i.imgur.com/PTqJC.png
DO NOT place the turtle in any of these positions.
1) DO NOT destroy a frame piece and place the turtle there.
2) DO NOT place the turtle on a frame piece that is not the corner piece.
3) DO NOT remove the corner frame piece and place the turtle there.
http://i.imgur.com/kOvDB.png
Releases
BCQuarryRemover v1.1: http://pastebin.com/R3bwhLwh
Changelog
Spoiler
Version 1.1
Bugfixes
Turtle placed above/below the frame and not facing it only remove one side.
Version 1.0
Initial release
Licensing Terms: