예제 #1
0
    public bool IsAllowed(Schedulable schedulable, ScheduleBlockType schedule_block_type)
    {
        int           blockIdx = Schedule.GetBlockIdx();
        ScheduleBlock block    = GetSchedule(schedulable).GetBlock(blockIdx);

        return(block.IsAllowed(schedule_block_type));
    }
예제 #2
0
        private Chore CreateShowerChore(Instance smi)
        {
            ChoreType         shower  = Db.Get().ChoreTypes.Shower;
            Shower            master  = smi.master;
            ScheduleBlockType hygiene = Db.Get().ScheduleBlockTypes.Hygiene;

            return(new WorkChore <Shower>(shower, master, null, true, null, null, null, false, hygiene, false, true, null, false, true, false, PriorityScreen.PriorityClass.high, 5, false, true));
        }
예제 #3
0
        private Chore CreateChore(StatesInstance smi)
        {
            Workable          component  = smi.master.GetComponent <EspressoMachineWorkable>();
            ChoreType         relax      = Db.Get().ChoreTypes.Relax;
            Workable          target     = component;
            ScheduleBlockType recreation = Db.Get().ScheduleBlockTypes.Recreation;
            Chore             chore      = new WorkChore <EspressoMachineWorkable>(relax, target, null, true, null, null, null, false, recreation, false, true, null, false, true, false, PriorityScreen.PriorityClass.high, 5, false, true);

            chore.AddPrecondition(ChorePreconditions.instance.CanDoWorkerPrioritizable, component);
            return(chore);
        }
    private Chore CreateChore(int i)
    {
        Workable          workable   = workables[i];
        ChoreType         relax      = Db.Get().ChoreTypes.Relax;
        Workable          target     = workable;
        ScheduleBlockType recreation = Db.Get().ScheduleBlockTypes.Recreation;
        Chore             chore      = new WorkChore <PhonoboxWorkable>(relax, target, null, true, null, null, OnSocialChoreEnd, false, recreation, false, true, null, false, true, false, PriorityScreen.PriorityClass.high, 5, false, true);

        chore.AddPrecondition(ChorePreconditions.instance.CanDoWorkerPrioritizable, workable);
        return(chore);
    }
예제 #5
0
 public bool IsAllowed(ScheduleBlockType type)
 {
     if (allowed_types != null)
     {
         foreach (ScheduleBlockType allowed_type in allowed_types)
         {
             if (type.IdHash == allowed_type.IdHash)
             {
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #6
0
 public static void OnLoad()
 {
     FinishBlock                     = null;
     FinishColor                     = ScriptableObject.CreateInstance <ColorStyleSetting>();
     FinishColor.activeColor         = new Color(0.6f, 1.0f, 0.6f, 1.0f);
     FinishColor.inactiveColor       = new Color(0.286f, 1.0f, 0.286f, 1.0f);
     FinishColor.disabledColor       = new Color(0.4f, 0.416f, 0.4f, 1.0f);
     FinishColor.disabledActiveColor = new Color(0.588f, 0.625f, 0.588f, 1.0f);
     FinishColor.hoverColor          = new Color(0.6f, 1.0f, 0.6f, 1.0f);
     FinishColor.disabledhoverColor  = new Color(0.46f, 0.5f, 0.46f, 1.0f);
     FinishTask = null;
     Work       = null;
     PUtil.InitLibrary();
     LocString.CreateLocStringKeys(typeof(FinishTasksStrings.DUPLICANTS));
     LocString.CreateLocStringKeys(typeof(FinishTasksStrings.UI));
     PLocalization.Register();
 }
예제 #7
0
 public override void OnLoad(Harmony harmony)
 {
     base.OnLoad(harmony);
     FinishBlock                     = null;
     FinishColor                     = ScriptableObject.CreateInstance <ColorStyleSetting>();
     FinishColor.activeColor         = new Color(0.8f, 0.6f, 1.0f, 1.0f);
     FinishColor.inactiveColor       = new Color(0.5f, 0.286f, 1.0f, 1.0f);
     FinishColor.disabledColor       = new Color(0.4f, 0.4f, 0.416f, 1.0f);
     FinishColor.disabledActiveColor = new Color(0.6f, 0.588f, 0.625f, 1.0f);
     FinishColor.hoverColor          = FinishColor.activeColor;
     FinishColor.disabledhoverColor  = new Color(0.48f, 0.46f, 0.5f, 1.0f);
     FinishTask = null;
     Work       = null;
     PUtil.InitLibrary();
     LocString.CreateLocStringKeys(typeof(FinishTasksStrings.DUPLICANTS));
     LocString.CreateLocStringKeys(typeof(FinishTasksStrings.UI));
     new PLocalization().Register();
     new PVersionCheck().Register(this, new SteamVersionChecker());
 }
예제 #8
0
 public bool Allowed(ScheduleBlockType type)
 {
     return(allowedTypes.Contains(type));
 }
예제 #9
0
 public bool IsAllowed(ScheduleBlockType schedule_block_type)
 {
     return(VignetteManager.Instance.Get().IsRedAlert() || ScheduleManager.Instance.IsAllowed(this, schedule_block_type));
 }
예제 #10
0
 /// <summary>
 /// Looks up and caches the Finish Tasks schedule block type, if available.
 /// </summary>
 internal static void Init()
 {
     finishTasks = Db.Get().ScheduleBlockTypes.TryGet("FinishTask");
 }
예제 #11
0
 /// <summary>
 /// Initializes after the Db is loaded.
 /// </summary>
 internal static void Init()
 {
     recreation = Db.Get().ScheduleBlockTypes.Recreation;
 }