From 3dc2e52cdecf265ebabf5681d2e2158889782750 Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Mon, 30 Sep 2019 19:29:35 +0200 Subject: [PATCH] finish final preperation stage --- sparkmachine/lua/quarry.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sparkmachine/lua/quarry.lua b/sparkmachine/lua/quarry.lua index 2bae354..521f177 100644 --- a/sparkmachine/lua/quarry.lua +++ b/sparkmachine/lua/quarry.lua @@ -137,6 +137,15 @@ local function timer_trigger(pos, elapsed) strut_line_y(pos.x, pos.y, pos.z, marker_pos.y) elseif framenum == 0 then --shrink the operational area here to a 2d space with one piece of border taken away to drill there + posx, pos2x = order(pos.x, marker_pos.x) + posy, pos2y = order(pos.y, marker_pos.y) + posz, pos2z = order(pos.z, marker_pos.z) + posx = posx +1 + pos2x = pos2x -1 + posy = posy + 1 + pos2y = pos2y -1 + meta:set_string("dig_area_start", { x= posx, y= posy, z= posz}) + meta:set_string("dig_area_end", { x= pos2x, y= pos2y, z= posz}) -- can use this last z as counter, or ignore it end minetest.debug(framenum) end