From 451ca4a0313fbb1efd74a97671858c8433c3b0f9 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 4 Apr 2024 01:36:47 +0100 Subject: launch cactus --- cactus.lua | 25 +++++++++++++++++++------ 1 file 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 + -- cgit v1.2.3