mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-10 14:08:16 -06:00
migrate get_rail_segment_entity for 2.0
This commit is contained in:
@@ -656,7 +656,7 @@ function update_stop_from_rail(map_data, rail, forbidden_entity, force)
|
|||||||
---@type defines.rail_direction
|
---@type defines.rail_direction
|
||||||
for i = 1, 112 do
|
for i = 1, 112 do
|
||||||
if rail_back then
|
if rail_back then
|
||||||
local entity = rail_back.get_rail_segment_entity(defines_back, false)
|
local entity = rail_back.get_rail_segment_signal(defines_back, false)
|
||||||
if entity and entity.name == "train-stop" then
|
if entity and entity.name == "train-stop" then
|
||||||
resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force)
|
resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force)
|
||||||
return
|
return
|
||||||
@@ -664,7 +664,7 @@ function update_stop_from_rail(map_data, rail, forbidden_entity, force)
|
|||||||
rail_back = rail_back.get_connected_rail({rail_direction = defines_back, rail_connection_direction = defines_straight})
|
rail_back = rail_back.get_connected_rail({rail_direction = defines_back, rail_connection_direction = defines_straight})
|
||||||
end
|
end
|
||||||
if rail_front then
|
if rail_front then
|
||||||
local entity = rail_front.get_rail_segment_entity(defines_front, false)
|
local entity = rail_front.get_rail_segment_signal(defines_front, false)
|
||||||
if entity and entity.name == "train-stop" then
|
if entity and entity.name == "train-stop" then
|
||||||
resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force)
|
resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user