diff --git a/sparkmachine/lua/quarry.lua b/sparkmachine/lua/quarry.lua index 52cfa6c..4644262 100644 --- a/sparkmachine/lua/quarry.lua +++ b/sparkmachine/lua/quarry.lua @@ -138,14 +138,30 @@ local function clear_area(pos, pos2) if not ((x == pos.x and y == pos.y and z == pos.z) or (x == pos2.x and y == pos2.y and z == pos2.z)) then - if dig_node(Position(x, y, z), pos) then - return false + local count = 0 + if x == pos.x then count = count +1 end + if x == pos2.x then count = count +1 end + if y == pos.y then count = count +1 end + if y == pos2.y then count = count +1 end + if z == pos.z then count = count +1 end + if z == pos2.z then count = count +1 end + if count >= 2 then + if minetest.get_node(Position(x, y, z)).name ~= NAME .. ":static_strut" then + if dig_node(Position(x, y, z), pos) then + return false + end + + end + else + if dig_node(Position(x, y, z), pos) then + return false + end end end end end end - return true + return true --true: cleared end local function place_strut(position, quarrypos)