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

Buildcraft Quarry Frame Remover - v1.1 Bugfix

Started by opensourcery93, 05 May 2012 - 05:23 AM
opensourcery93 #1
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
SpoilerPlace 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
Spoilerhttp://i.imgur.com/mouIP.png


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
SpoilerThe 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
BCQuarryRemover v1.0: http://pastebin.com/BTf8xvvk

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:
SpoilerAnyone and everyone is allowed to use, copy, modify, and/or distribute (non-commercially and with this license) this code as long as I (opensourcery93) am attributed as the original author (my forum tag and/or a link to this topic is sufficient attribution). Further details of these licensing terms can be found at http://creativecommo...s/by-nc-sa/3.0/
Arc_turus #2
Posted 06 May 2012 - 08:01 PM
That's a very good idea. I'd love to use that to clear some field I mined. Thanks !
opensourcery93 #3
Posted 07 May 2012 - 02:53 AM
That's a very good idea. I'd love to use that to clear some field I mined. Thanks !
Glad to see someone besides me has a use for it. :)/>/> Feel free to use this.
2bias22 #4
Posted 08 September 2012 - 06:19 PM
At first I thought that the program didn't work. Then I saw that I have to place a quarry frame piece in the top left slot. Now it's working perfect :D/>/> :D/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/>
opensourcery93 #5
Posted 08 September 2012 - 06:35 PM
At first I thought that the program didn't work. Then I saw that I have to place a quarry frame piece in the top left slot. Now it's working perfect :D/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/> :)/>/>

Awesome to see that people are actually using my Turtle program. Glad to see that you found out what the problem was and how to fix it. :D/>/>
The frame piece is required for the turtle to rotate itself to face the quarry. This makes it where you can place the turtle facing any direction. :)/>/>
RichardG867 #6
Posted 08 September 2012 - 10:47 PM
Note that in BC 3.2, quarry frames decay after you break the quarry.
opensourcery93 #7
Posted 08 September 2012 - 11:03 PM
Note that in BC 3.2, quarry frames decay after you break the quarry.

Oh really? I did not know that, but I have not used BC in a while. Seems SpaceToad has made my Turtle program useless now. :D/>/>
I do not think BC 3 is available for MP yet (please correct me if I'm wrong) so my program will probably better suit those using CC as part of of a multi-player server.
TortuousAugur #8
Posted 09 September 2012 - 12:12 PM
Note that in BC 3.2, quarry frames decay after you break the quarry.

Oh really? I did not know that, but I have not used BC in a while. Seems SpaceToad has made my Turtle program useless now. :D/>/>
I do not think BC 3 is available for MP yet (please correct me if I'm wrong) so my program will probably better suit those using CC as part of of a multi-player server.

Well, even if it did, the Technic/Tekkit packs have yet to advance to that version, so I'm actually looking into getting this and setting it up for the massive quarry I placed that just finished. Clearing a four chunk quarry by hand would not be fun…