summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-04 01:36:47 +0100
committerubq323 <ubq323@ubq323.website>2024-04-04 01:36:47 +0100
commit451ca4a0313fbb1efd74a97671858c8433c3b0f9 (patch)
tree3606362e603beb3616a86f64a85fab3b46b3465e
parent94ba1acfbabdf7c11ee4493b78783b4876c4e060 (diff)
launch cactus
-rw-r--r--cactus.lua25
1 files changed, 19 insertions, 6 deletions
diff --git a/cactus.lua b/cactus.lua
index 7558461..08df1aa 100644
--- a/cactus.lua
+++ b/cactus.lua
@@ -96,13 +96,26 @@ local function moveby(delta)
moveby_y(delta.y)
moveby_xz(delta)
end
+local function moveto(target)
+ moveby(target - POS)
+end
local datum = vector.new(-18, 128, -1837)
-local delta = datum - POS
-moveby(delta)
-for i=1,4 do
- move_linear(11)
- turn_right()
-end
+moveto(datum)
+turn_to_face(vector.new(0,0,+1))
+
+repeat
+ do_column()
+ move_linear(1)
+until POS.z == -1826
+do_column()
+turn_right()
+move_linear(1)
+turn_right()
+repeat
+ do_column()
+ move_linear(1)
+until POS.z == datum.z
+