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

Temple Routine

Started by zwzsg, 11 November 2012 - 02:41 PM
zwzsg #1
Posted 11 November 2012 - 03:41 PM
I taught my turtles to do this:



Not pictured above is how it places torches, and how it adorn the inside of the room with columns.


Here's the code: http://pastebin.ca/2250491

I used the construction not (a==b) instead of a~=b so that CC-Copy can be used to autotype it into turtles.

To run, you can either supply the three arguments, (length, width and height), or none and the program will ask them at start. Length and Width are the dimension of the base, while Height is the columns' height, which is a bit inconsistent, but that I find easier to deal with. Also, all three have to be natural integers, and Length and Width will be floored to an odd number, as columns wouldn't be distributed nicely on even dimensions.

Make sure the turtle is properly loaded:



The first four slots are for the base, walls, and roof, the middle slot is for the lighting, and the last four slots are for column and middle of gable. You can ofc use other materials, but I find marble fitting for temples. By modifying the top of the script, you can change what is built with what slots. The turtle will always leave at least 1 item in each slot, for easy refilling. Whenever the turtle lacks a block type, it stops there and wait for the player to manually refill it.

For my own convenience, I also coded something for auto-refilling. Since the server I play on runs tekkit, it's the old turtle API without all the new function to suck for chest, so I had to use a still computer controlling BuildCraft's steam engine. So it's not as easy to set up, but just in case here is what it looks like (modem below the computer), and here's the computer code. But in addition to building the refill station right, it also needs manual edit of the temple code to set the position of the turtle and station, and even more adaptation if you use slots differently. So I would say you'd be better of keeping the refill manual, it's much easier.

If you use too small dimensions, the inner wall will be skipped. Like there :

Matt21 #2
Posted 12 November 2012 - 06:44 AM
nice!
kazagistar #3
Posted 12 November 2012 - 07:03 AM
That is sick… well done.

Let the era of greek temples everywhere begin!