public static bool WantsToBeOn(Thing t)
        {
            CompFlickable compFlickable = t.TryGetComp <CompFlickable>();

            if (compFlickable != null && !compFlickable.SwitchIsOn)
            {
                return(false);
            }
            CompSchedule compSchedule = t.TryGetComp <CompSchedule>();

            return(compSchedule == null || compSchedule.Allowed);
        }
        public static bool WantsToBeOn(Thing t)
        {
            CompFlickable compFlickable = t.TryGetComp <CompFlickable>();
            bool          result;

            if (compFlickable != null && !compFlickable.SwitchIsOn)
            {
                result = false;
            }
            else
            {
                CompSchedule compSchedule = t.TryGetComp <CompSchedule>();
                result = (compSchedule == null || compSchedule.Allowed);
            }
            return(result);
        }