mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
.
This commit is contained in:
@@ -110,30 +110,13 @@ 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 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" } }
|
for i = 1, #entity.fluidbox do
|
||||||
local entities_t = es.find_entities_filtered{ area = { { ep.x - r, ep.y - r }, { ep.x + r, ep.y + r } }, ghost_type = { "mining-drill", "pipe", "pipe-to-ground" } }
|
for _, p in pairs(entity.fluidbox[i].get_pipe_connections(i)) do
|
||||||
|
for x = 1, p.position.x do
|
||||||
table.insert_array(entities, entities_t)
|
for y = 1, p.position.y do
|
||||||
|
table.insert(pipe_build, { x = x, y = y })
|
||||||
for _, e in pairs(entities) do
|
end
|
||||||
if (e.position.x > ep.x) and (e.position.y == ep.y) then
|
|
||||||
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, 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, 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, rh do
|
|
||||||
table.insert(pipe_build, { x = 0, y = -h })
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user