add rainbow wires
This commit is contained in:
@@ -184,7 +184,10 @@ function Simulation.connectwireat(sim, wire, x, y, z)
|
||||
for k, obj in pairs(objs) do
|
||||
if obj ~= wire and obj.group ~= nil then
|
||||
if is_wire(obj) then -- wire
|
||||
if Wire.getlayer(obj) == Wire.getlayer(wire) then -- same layer
|
||||
local layer1 = Wire.getlayer(wire)
|
||||
local layer2 = Wire.getlayer(obj)
|
||||
--if they are on the same real layer, or exactly one is rainbow but not both, then connect
|
||||
if ((layer1==layer2) or (layer1==-1 and layer2~=-1) or (layer1~=-1 and layer2==-1)) and (not (layer1==-1 and layer2==-1)) then
|
||||
Group.addwire(obj.group, wire)
|
||||
end
|
||||
else -- port
|
||||
|
||||
Reference in New Issue
Block a user