Skip to content

Commit 8a10620

Browse files
committed
fix: fixed crash when rotating an underground belt. resolves #282
1 parent 991421e commit 8a10620

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

script/connections/connections.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ factorissimo.on_event(defines.events.on_player_rotated_entity, function(event)
399399
elseif is_connectable(entity) then
400400
recheck_nearby_connections(entity)
401401
if entity.valid and entity.type == "underground-belt" then
402-
local neighbour = entity.neighbours
402+
local neighbour = entity.underground_belt_neighbour
403403
if neighbour then
404404
recheck_nearby_connections(neighbour)
405405
end

script/connections/fluid.lua

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ Fluid.color = {r = 167 / 255, g = 229 / 255, b = 255 / 255}
44
Fluid.entity_types = {"pipe", "pipe-to-ground", "pump", "storage-tank", "infinity-pipe", "offshore-pump", "elevated-pipe"}
55
Fluid.unlocked = function(force) return force.technologies["factory-connection-type-fluid"].researched end
66

7-
local function is_connected(dummy_connector, entity)
8-
if blacklist[entity.name] then return false end
9-
for _, e in pairs(dummy_connector.neighbours[1]) do
10-
if e.unit_number == entity.unit_number then return true end
11-
end
12-
end
13-
147
local function create_linked_connections(factory, cpos, settings)
158
local inside_surface = factory.inside_surface
169
local outside_surface = factory.outside_surface

0 commit comments

Comments
 (0)