mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-07 16:08:10 -06:00
Merge pull request #50 from rbandl/main
Fixed inaccurate automatic allow-lists in some cases when using loaders
This commit is contained in:
@@ -690,7 +690,7 @@ function update_stop_from_loader(map_data, loader, forbidden_entity)
|
||||
update_stop_from_rail(map_data, rails[1], forbidden_entity)
|
||||
end
|
||||
elseif direction == defines.direction.south then
|
||||
position.y = position.y - 1 -- input and facing south -> move on Y axis down 1 unit
|
||||
position.y = position.y + 1 -- input and facing south -> move on Y axis down 1 unit
|
||||
local rails = surface.find_entities_filtered({
|
||||
type = "straight-rail",
|
||||
position = position,
|
||||
@@ -710,7 +710,7 @@ function update_stop_from_loader(map_data, loader, forbidden_entity)
|
||||
update_stop_from_rail(map_data, rails[1], forbidden_entity)
|
||||
end
|
||||
elseif direction == defines.direction.north then
|
||||
position.y = position.y + 1 -- input and facing south -> move on Y axis up 1 unit
|
||||
position.y = position.y - 1 -- input and facing south -> move on Y axis up 1 unit
|
||||
local rails = surface.find_entities_filtered({
|
||||
type = "straight-rail",
|
||||
position = position,
|
||||
@@ -732,7 +732,7 @@ function update_stop_from_loader(map_data, loader, forbidden_entity)
|
||||
update_stop_from_rail(map_data, rails[1], forbidden_entity)
|
||||
end
|
||||
elseif direction == defines.direction.south then
|
||||
position.y = position.y + 1 -- output and facing south -> move on Y axis up 1 unit
|
||||
position.y = position.y - 1 -- output and facing south -> move on Y axis up 1 unit
|
||||
local rails = surface.find_entities_filtered({
|
||||
type = "straight-rail",
|
||||
position = position,
|
||||
@@ -752,7 +752,7 @@ function update_stop_from_loader(map_data, loader, forbidden_entity)
|
||||
update_stop_from_rail(map_data, rails[1], forbidden_entity)
|
||||
end
|
||||
elseif direction == defines.direction.north then
|
||||
position.y = position.y - 1 -- output and facing south -> move on Y axis down 1 unit
|
||||
position.y = position.y + 1 -- output and facing south -> move on Y axis down 1 unit
|
||||
local rails = surface.find_entities_filtered({
|
||||
type = "straight-rail",
|
||||
position = position,
|
||||
|
||||
@@ -639,7 +639,7 @@ local function on_broken(event)
|
||||
elseif entity.type == "inserter" then
|
||||
update_stop_from_inserter(global, entity, entity)
|
||||
elseif entity.type == "loader-1x1" then
|
||||
update_stop_from_loader(global, entity)
|
||||
update_stop_from_loader(global, entity, entity)
|
||||
elseif entity.type == "pump" then
|
||||
update_stop_from_pump(global, entity, entity)
|
||||
elseif entity.type == "straight-rail" then
|
||||
|
||||
Reference in New Issue
Block a user