private bool IsEligibleToBeElevatorCounter(PowerCounter counter) { // Ignore parented counters such as the lift counter if (counter.HasParent()) { return(false); } if (HasConnectedInput(counter)) { return(false); } return(true); }
private PowerCounter GetEligibleElevatorCounter(PowerCounter counter) { if (counter == null) { return(null); } // Ignore parented counters such as the lift counter if (counter.HasParent()) { return(null); } // Ignore counters that have a connected input if (counter.inputs[0].connectedTo.Get() != null) { return(null); } return(counter); }