public Instance(IStateMachineTarget master, Def def) : base(master, def) { alignment = master.GetComponent <FactionAlignment>(); navigator = master.GetComponent <Navigator>(); refreshThreatDelegate = RefreshThreat; }
public AttributeModifier baseHeartAttackChance; // базовый шанс public Instance(IStateMachineTarget master) : base(master) { minionIdentity = master.GetComponent <MinionIdentity>(); effects = master.GetComponent <Effects>(); sicknesses = master.gameObject.GetSicknesses(); health = master.GetComponent <Health>(); baseHeartAttackChance = new AttributeModifier(ATTRIBUTE_ID, 0, STRINGS.DUPLICANTS.ATTRIBUTES.HEARTATTACKSUSCEPTIBILITY.AGE_MODIFIER, false, false, false); }
public EquipChore(IStateMachineTarget equippable) : base(Db.Get().ChoreTypes.Equip, equippable, (ChoreProvider)null, false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.personalNeeds, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); base.smi.sm.equippable_source.Set(equippable.gameObject, base.smi); base.smi.sm.requested_units.Set(1f, base.smi); showAvailabilityInHoverText = false; AddPrecondition(ChorePreconditions.instance.IsAssignedtoMe, equippable.GetComponent <Assignable>()); AddPrecondition(ChorePreconditions.instance.CanPickup, equippable.GetComponent <Pickupable>()); }
public Instance(IStateMachineTarget master) : base(master) { sicknesses = master.GetComponent <MinionModifiers>().sicknesses; primaryElement = master.GetComponent <PrimaryElement>(); traits = master.GetComponent <Traits>(); lastDiseaseSources = new Dictionary <HashedString, DiseaseSourceInfo>(); lastExposureTime = new Dictionary <HashedString, float>(); inhaleExposureTick = new Dictionary <HashedString, InhaleTickInfo>(); GameClock.Instance.Subscribe(-722330267, OnNightTime); OxygenBreather component = GetComponent <OxygenBreather>(); component.onSimConsume = (Action <Sim.MassConsumedCallback>)Delegate.Combine(component.onSimConsume, new Action <Sim.MassConsumedCallback>(OnAirConsumed)); }
public Instance(IStateMachineTarget master, Def def) : base(master, def) { light = master.GetComponent <Light2D>(); originalLux = light.Lux; originalRange = light.Range; }
public Instance(IStateMachineTarget master, GameObject owner) : base(master) { base.sm.owner.Set(owner, base.smi); navigator = owner.GetComponent <Navigator>(); jet_suit_tank = master.GetComponent <JetSuitTank>(); }
public FleeChore(IStateMachineTarget target, GameObject enemy) : base(Db.Get().ChoreTypes.Flee, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); base.smi.sm.self.Set(gameObject, base.smi); nav = gameObject.GetComponent <Navigator>(); base.smi.sm.fleeFromTarget.Set(enemy, base.smi); }
public EatChore(IStateMachineTarget master) : base(Db.Get().ChoreTypes.Eat, master, master.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.personalNeeds, 5, false, true, 0, false, ReportManager.ReportType.PersonalTime) { base.smi = new StatesInstance(this); showAvailabilityInHoverText = false; AddPrecondition(ChorePreconditions.instance.IsNotRedAlert, null); AddPrecondition(EdibleIsNotNull, null); }
public Instance(IStateMachineTarget master, Def def) : base(master, def) { KBoxCollider2D component = master.GetComponent <KBoxCollider2D>(); originalColliderSize = component.size; originalColliderOffset = component.offset; }
public MournChore(IStateMachineTarget master) : base(Db.Get().ChoreTypes.Mourn, master, master.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.high, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); AddPrecondition(ChorePreconditions.instance.IsNotRedAlert, null); AddPrecondition(ChorePreconditions.instance.NoDeadBodies, null); AddPrecondition(HasValidMournLocation, master); }
public ReactEmoteChore(IStateMachineTarget target, ChoreType chore_type, EmoteReactable reactable, HashedString emote_kanim, HashedString[] emote_anims, KAnim.PlayMode play_mode, Func <StatusItem> get_status_item) : base(chore_type, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.basic, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { AddPrecondition(ChorePreconditions.instance.IsMoving, null); AddPrecondition(ChorePreconditions.instance.IsOffLadder, null); AddPrecondition(ChorePreconditions.instance.NotInTube, null); AddPrecondition(ChorePreconditions.instance.IsAwake, null); getStatusItem = get_status_item; base.smi = new StatesInstance(this, target.gameObject, reactable, emote_kanim, emote_anims, play_mode); }
public Instance(IStateMachineTarget master) : base(master) { Health component = master.GetComponent <Health>(); if ((bool)component) { component.CanBeIncapacitated = true; } }
public MingleChore(IStateMachineTarget target) : base(Db.Get().ChoreTypes.Relax, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.high, 5, false, true, 0, false, ReportManager.ReportType.PersonalTime) { showAvailabilityInHoverText = false; base.smi = new StatesInstance(this, target.gameObject); AddPrecondition(HasMingleCell, this); AddPrecondition(ChorePreconditions.instance.IsNotRedAlert, null); AddPrecondition(ChorePreconditions.instance.IsScheduledTime, Db.Get().ScheduleBlockTypes.Recreation); AddPrecondition(ChorePreconditions.instance.CanDoWorkerPrioritizable, this); }
public DirtyVomitChore( ChoreType chore_type, IStateMachineTarget target, StatusItem status_item, Notification notification, SimUtil.DiseaseInfo diseaseInfo, Action <Chore> on_complete = null) : base(Db.Get().ChoreTypes.Vomit, target, target.GetComponent <ChoreProvider>(), true, on_complete, null, null, PriorityScreen.PriorityClass.compulsory) { smi = new StatesInstance(this, target.gameObject, status_item, notification, diseaseInfo); }
// Idle Priority 9 puts it above Idle task but below the task the Dupe is finishing public FinishMingleChore(IStateMachineTarget target) : base(Db.Get().ChoreTypes.Relax, target, target.GetComponent <ChoreProvider>(), false, null, null, null, PriorityScreen.PriorityClass.idle, 9, false, true, 0, false, ReportManager.ReportType.PersonalTime) { showAvailabilityInHoverText = false; smi = new StatesInstance(this, target.gameObject); AddPrecondition(HAS_MINGLE_CELL, this); AddPrecondition(ChorePreconditions.instance.IsNotRedAlert, null); AddPrecondition(ChorePreconditions.instance.IsScheduledTime, FinishTasksPatches. FinishBlock); AddPrecondition(ChorePreconditions.instance.CanDoWorkerPrioritizable, this); }
public SleepChore(ChoreType choreType, IStateMachineTarget target, GameObject bed, bool bedIsLocator, bool isInterruptable) : base(choreType, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.personalNeeds, 5, false, true, 0, false, ReportManager.ReportType.PersonalTime) { base.smi = new StatesInstance(this, target.gameObject, bed, bedIsLocator, isInterruptable); if (isInterruptable) { AddPrecondition(ChorePreconditions.instance.IsNotRedAlert, null); } AddPrecondition(IsOkayTimeToSleep, null); Operational component = bed.GetComponent <Operational>(); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { AddPrecondition(ChorePreconditions.instance.IsOperational, component); } }
public BeIncapacitatedChore(IStateMachineTarget master) : base(Db.Get().ChoreTypes.BeIncapacitated, master, master.GetComponent <ChoreProvider>(), true, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); }
public BingeEatChore(IStateMachineTarget target, Action <Chore> on_complete = null) : base(Db.Get().ChoreTypes.BingeEat, target, target.GetComponent <ChoreProvider>(), false, on_complete, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this, target.gameObject); Subscribe(1121894420, OnEat); }
public DieChore(IStateMachineTarget master, Death death) : base(Db.Get().ChoreTypes.Die, master, master.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { showAvailabilityInHoverText = false; base.smi = new StatesInstance(this, death); }
public Instance(IStateMachineTarget master, Def def) : base(master, def) { operational = master.GetComponent <Operational>(); _light = master.GetComponent <Light2D>(); }
public Instance(IStateMachineTarget master) : base(master) { choreDriver = master.GetComponent <ChoreDriver>(); }
public MoveToQuarantineChore(IStateMachineTarget target, KMonoBehaviour quarantine_area) : base(Db.Get().ChoreTypes.MoveToQuarantine, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this, target.gameObject); base.smi.sm.locator.Set(quarantine_area.gameObject, base.smi); }
public AttackChore(IStateMachineTarget target, GameObject enemy) : base(Db.Get().ChoreTypes.Attack, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.basic, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); base.smi.sm.attackTarget.Set(enemy, base.smi); }
public MoveChore(IStateMachineTarget target, ChoreType chore_type, Func <StatesInstance, int> get_cell_callback, bool update_cell = false) : base(chore_type, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this, target.gameObject, get_cell_callback, update_cell); }
public PeeChore(IStateMachineTarget target) : base(Db.Get().ChoreTypes.Pee, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this, target.gameObject); }
public Instance(IStateMachineTarget master) : base(master) { sicknesses = master.GetComponent <MinionModifiers>().sicknesses; }
public EmoteChore(IStateMachineTarget target, ChoreType chore_type, HashedString emote_kanim, HashedString[] emote_anims, Func <StatusItem> get_status_item) : base(chore_type, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this, target.gameObject, emote_kanim, emote_anims, KAnim.PlayMode.Once, false); getStatusItem = get_status_item; }
public Instance(IStateMachineTarget master, Def def) : base(master, def) { navigator = master.GetComponent <Navigator>(); }
public DropUnusedInventoryChore(ChoreType chore_type, IStateMachineTarget target) : base(chore_type, target, target.GetComponent <ChoreProvider>(), true, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.compulsory, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); }
public DeliverFoodChore(IStateMachineTarget target) : base(Db.Get().ChoreTypes.DeliverFood, target, target.GetComponent <ChoreProvider>(), false, (Action <Chore>)null, (Action <Chore>)null, (Action <Chore>)null, PriorityScreen.PriorityClass.basic, 5, false, true, 0, false, ReportManager.ReportType.WorkTime) { base.smi = new StatesInstance(this); AddPrecondition(ChorePreconditions.instance.IsChattable, target); }