Skip to content

Commit

Permalink
don't connect lamp to trainstation when migrating/placing a smart
Browse files Browse the repository at this point in the history
trainstop
  • Loading branch information
Choumiko committed Jul 3, 2016
1 parent db4e30d commit 1c6f569
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,6 @@ local update_from_version = {
local behavior = stop.signalProxy.get_control_behavior()
if behavior then
smart_conditions[stop.station.backer_name] = behavior.circuit_condition.condition
stop.signalProxy.connect_neighbour{target_entity = stop.station, wire = defines.wire_type.red}
stop.signalProxy.connect_neighbour{target_entity = stop.station, wire = defines.wire_type.green}
end
end
end
Expand Down Expand Up @@ -551,13 +549,6 @@ function on_configuration_changed(data)
end
end

local function connect_wires(a, b)
if a.valid and b.valid then
a.connect_neighbour{target_entity = b, wire = defines.wire_type.red}
a.connect_neighbour{target_entity = b, wire = defines.wire_type.green}
end
end

local function getProxyPositions(trainstop)
local offset = {
[0] = {x=-0.5,y=-0.5},
Expand Down Expand Up @@ -588,7 +579,6 @@ function createProxy(trainstop)
if signal and signal.valid then
--debugDump("signal: "..serpent.line(signal.position),true)
signal.revive()
connect_wires(trainstop, signal)
end
global.blueprinted_proxies[keySignal] = nil
end
Expand All @@ -604,7 +594,6 @@ function createProxy(trainstop)
signalProxy = trainstop.surface.find_entity("smart-train-stop-proxy", positions.signalProxy)
if not signalProxy then
signalProxy = trainstop.surface.create_entity(proxy)
connect_wires(trainstop, signalProxy)
end

cargoProxy = trainstop.surface.find_entity("smart-train-stop-proxy-cargo", positions.cargo)
Expand Down

0 comments on commit 1c6f569

Please sign in to comment.