Exemple #1
0
    protected override bool OnWorkTick(Worker worker, float dt)
    {
        Schedulable component = worker.GetComponent <Schedulable>();

        if (!component.IsAllowed(Db.Get().ScheduleBlockTypes.Recreation))
        {
            Effects component2 = worker.GetComponent <Effects>();
            if (string.IsNullOrEmpty(specificEffect) || component2.HasEffect(specificEffect))
            {
                return(true);
            }
        }
        return(false);
    }
Exemple #2
0
        public bool IsSleepingOrSleepSchedule()
        {
            Schedulable component = GetComponent <Schedulable>();

            if ((Object)component != (Object)null && component.IsAllowed(Db.Get().ScheduleBlockTypes.Sleep))
            {
                return(true);
            }
            KPrefabID component2 = GetComponent <KPrefabID>();

            if ((Object)component2 != (Object)null && component2.HasTag(GameTags.Asleep))
            {
                return(true);
            }
            return(false);
        }
 /// <summary>
 /// Returns true if this chore is still allowed.
 /// </summary>
 /// <returns>true if the Duplicant is during finish time, or false otherwise.</returns>
 public bool IsFinishTasksTime()
 {
     return(schedule.IsAllowed(FinishTasksPatches.FinishBlock));
 }
Exemple #4
0
        public bool IsEatTime()
        {
            Schedulable component = base.master.GetComponent <Schedulable>();

            return(component.IsAllowed(Db.Get().ScheduleBlockTypes.Eat));
        }