Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }