From c0a44557ef92b7afc12def07e34df339067a1cd2 Mon Sep 17 00:00:00 2001 From: Tim Walling Date: Sat, 5 Jan 2013 22:11:15 -0500 Subject: [PATCH] add script to generate temple --- scripts/temple.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/temple.js diff --git a/scripts/temple.js b/scripts/temple.js new file mode 100644 index 0000000..4e209ea --- /dev/null +++ b/scripts/temple.js @@ -0,0 +1,24 @@ +load($SCRIPT_DIR + "/drone.js"); +// +// constructs a mayan temple +// +Drone.extend('temple', function(side) { + if (!side) { + side = 20; + } + var stone = '98:1'; + var stair = '109:' + Drone.PLAYER_STAIRS_FACING[this.dir]; + + this.chkpt('temple'); + + while (side > 4) { + var middle = Math.round((side-2)/2); + this.chkpt('corner') + .box(stone, side, 1, side) + .right(middle).box(stair).right().box(stair) + .move('corner').up().fwd().right(); + side = side - 2; + } + + return this.move('temple'); +}); \ No newline at end of file