mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
.
This commit is contained in:
@@ -108,6 +108,7 @@ local function miner_check(entity)
|
|||||||
|
|
||||||
if config.fluid and entity.fluidbox and #entity.fluidbox > 0 then
|
if config.fluid and entity.fluidbox and #entity.fluidbox > 0 then
|
||||||
table.insert(pipe_build, { x = 0, y = 0 })
|
table.insert(pipe_build, { x = 0, y = 0 })
|
||||||
|
local rh = math.ceil(er / 2)
|
||||||
local r = er + 1
|
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 = 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
|
for _, e in pairs(entities) do
|
||||||
if (e.position.x > ep.x) and (e.position.y == ep.y) then
|
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 })
|
table.insert(pipe_build, { x = h, y = 0 })
|
||||||
end
|
end
|
||||||
elseif (e.position.x < ep.x) and (e.position.y == ep.y) then
|
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 })
|
table.insert(pipe_build, { x = -h, y = 0 })
|
||||||
end
|
end
|
||||||
elseif (e.position.x == ep.x) and (e.position.y > ep.y) then
|
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 })
|
table.insert(pipe_build, { x = 0, y = h })
|
||||||
end
|
end
|
||||||
elseif (e.position.x == ep.x) and (e.position.y < ep.y) then
|
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 })
|
table.insert(pipe_build, { x = 0, y = -h })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user