Code: Select all
if player.surface.find_logistic_network_by_position(entity_position, force) then -- is this entity in a logistic network?
local nearest_cell = player.surface.find_logistic_network_by_position(entity_position, force).find_cell_closest_to(entity_position)
if nearest_cell.is_in_construction_range(entity_position) then
game.players[1].print (roster_entry.entity.name .. "found in range of a construction network. Time to rebuild.....")
end
end



