public void CheckWiringCompat(Wire w) { Node ThisNode = w.GetNode(this); //If this node can only be wired once, make sure a wire for it doesn't already exist if (ThisNode.CanOnlyBeWiredOnce()) { foreach (Wire test in WiredTo) { if (test.GetNode(this) == ThisNode) { throw new Exception("Invalid wiring attempted; tronic " + this + " has wire " + test + " and was trying to add wire " + w + " which re-wires node " + ThisNode); } } } }