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)); }
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)); }
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); }
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); }
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(); }
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()); }
public bool Allowed(ScheduleBlockType type) { return(allowedTypes.Contains(type)); }
public bool IsAllowed(ScheduleBlockType schedule_block_type) { return(VignetteManager.Instance.Get().IsRedAlert() || ScheduleManager.Instance.IsAllowed(this, schedule_block_type)); }
/// <summary> /// Looks up and caches the Finish Tasks schedule block type, if available. /// </summary> internal static void Init() { finishTasks = Db.Get().ScheduleBlockTypes.TryGet("FinishTask"); }
/// <summary> /// Initializes after the Db is loaded. /// </summary> internal static void Init() { recreation = Db.Get().ScheduleBlockTypes.Recreation; }