From e34b6682ed2c7f6afec73701f249cbae33a59c02 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 7 Feb 2025 13:49:44 +0900 Subject: [PATCH] . --- exp_legacy/module/modules/addons/miner.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/exp_legacy/module/modules/addons/miner.lua b/exp_legacy/module/modules/addons/miner.lua index 8fe3bd1c..fcc4fae3 100644 --- a/exp_legacy/module/modules/addons/miner.lua +++ b/exp_legacy/module/modules/addons/miner.lua @@ -115,9 +115,7 @@ local function miner_check(entity) if config.fluid and entity.fluidbox and #entity.fluidbox > 0 then -- if require fluid to mine table.insert(pipe_build, { x = 0, y = 0 }) - - local half = math.floor(entity.get_radius()) - local r = 1 + er + 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" } } local entities_t = es.find_entities_filtered{ area = { { ep.x - r, ep.y - r }, { ep.x + r, ep.y + r } }, ghost_type = { "pipe", "pipe-to-ground" } } @@ -126,19 +124,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, half do + for h = 1, er 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, half do + for h = 1, er 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, half do + for h = 1, er 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, half do + for h = 1, er do table.insert(pipe_build, { x = 0, y = -h }) end end