From 5f24583e902ae4d84a5366d11ec83c54f5bfeeee Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Wed, 12 Feb 2025 20:20:42 +0900 Subject: [PATCH] . --- exp_legacy/module/modules/addons/miner.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/exp_legacy/module/modules/addons/miner.lua b/exp_legacy/module/modules/addons/miner.lua index c87097e1..596cb8be 100644 --- a/exp_legacy/module/modules/addons/miner.lua +++ b/exp_legacy/module/modules/addons/miner.lua @@ -108,6 +108,7 @@ local function miner_check(entity) if config.fluid and entity.fluidbox and #entity.fluidbox > 0 then table.insert(pipe_build, { x = 0, y = 0 }) + local rh = math.ceil(er / 2) local r = er + 1 local entities = es.find_entities_filtered{ area = { { ep.x - r, ep.y - r }, { ep.x + r, ep.y + r } }, type = { "mining-drill", "pipe", "pipe-to-ground" } } @@ -117,19 +118,19 @@ local function miner_check(entity) for _, e in pairs(entities) do if (e.position.x > ep.x) and (e.position.y == ep.y) then - for h = 1, er do + for h = 1, rh do table.insert(pipe_build, { x = h, y = 0 }) end elseif (e.position.x < ep.x) and (e.position.y == ep.y) then - for h = 1, er do + for h = 1, rh do table.insert(pipe_build, { x = -h, y = 0 }) end elseif (e.position.x == ep.x) and (e.position.y > ep.y) then - for h = 1, er do + for h = 1, rh do table.insert(pipe_build, { x = 0, y = h }) end elseif (e.position.x == ep.x) and (e.position.y < ep.y) then - for h = 1, er do + for h = 1, rh do table.insert(pipe_build, { x = 0, y = -h }) end end