public override void Assign(IAssignableIdentity new_assignee) { if (new_assignee != assignee) { if (base.slot != null && new_assignee is MinionIdentity) { new_assignee = (new_assignee as MinionIdentity).assignableProxy.Get(); } if (base.slot != null && new_assignee is StoredMinionIdentity) { new_assignee = (new_assignee as StoredMinionIdentity).assignableProxy.Get(); } if (new_assignee is MinionAssignablesProxy) { Ownables soleOwner = new_assignee.GetSoleOwner(); Ownables component = soleOwner.GetComponent <Ownables>(); AssignableSlotInstance slot = component.GetSlot(base.slot); if (slot != null) { Assignable assignable = slot.assignable; if ((Object)assignable != (Object)null) { assignable.Unassign(); } } } base.Assign(new_assignee); } }
public void ConfigureAssignableSlots() { if (!slotsConfigured) { Ownables component = GetComponent <Ownables>(); Equipment component2 = GetComponent <Equipment>(); if ((Object)component2 != (Object)null) { foreach (AssignableSlot resource in Db.Get().AssignableSlots.resources) { if (resource is OwnableSlot) { OwnableSlotInstance slot_instance = new OwnableSlotInstance(component, (OwnableSlot)resource); component.Add(slot_instance); } else if (resource is EquipmentSlot) { EquipmentSlotInstance slot_instance2 = new EquipmentSlotInstance(component2, (EquipmentSlot)resource); component2.Add(slot_instance2); } } } slotsConfigured = true; } }
public void UnassignClinic() { Ownables soleOwner = base.sm.masterTarget.Get(base.smi).GetComponent <MinionIdentity>().GetSoleOwner(); AssignableSlot clinic = Db.Get().AssignableSlots.Clinic; soleOwner.GetSlot(clinic)?.Unassign(true); }
public void UpdateBed() { Ownables soleOwner = base.sm.masterTarget.Get(base.smi).GetComponent <MinionIdentity>().GetSoleOwner(); Assignable assignable = null; Assignable assignable2 = soleOwner.GetAssignable(Db.Get().AssignableSlots.MedicalBed); if ((Object)assignable2 != (Object)null && assignable2.CanAutoAssignTo(base.sm.masterTarget.Get(base.smi).GetComponent <MinionIdentity>().assignableProxy.Get())) { assignable = assignable2; } else { assignable = soleOwner.GetAssignable(Db.Get().AssignableSlots.Bed); if ((Object)assignable == (Object)null) { assignable = soleOwner.AutoAssignSlot(Db.Get().AssignableSlots.Bed); if ((Object)assignable != (Object)null) { AssignableReachabilitySensor sensor = GetComponent <Sensors>().GetSensor <AssignableReachabilitySensor>(); sensor.Update(); } } } base.smi.sm.bed.Set(assignable, base.smi); }
public void FindAvailableMedicalBed(Navigator navigator) { Clinic clinic = null; AssignableSlot clinic2 = Db.Get().AssignableSlots.Clinic; Ownables soleOwner = gameObject.GetComponent <MinionIdentity>().GetSoleOwner(); AssignableSlotInstance slot = soleOwner.GetSlot(clinic2); if ((UnityEngine.Object)slot.assignable == (UnityEngine.Object)null) { Assignable assignable = soleOwner.AutoAssignSlot(clinic2); if ((UnityEngine.Object)assignable != (UnityEngine.Object)null) { clinic = assignable.GetComponent <Clinic>(); } } else { clinic = slot.assignable.GetComponent <Clinic>(); } if ((UnityEngine.Object)clinic != (UnityEngine.Object)null && navigator.CanReach(clinic)) { base.smi.sm.clinic.Set(clinic.gameObject, base.smi); base.smi.GoTo(base.smi.sm.incapacitation_root.rescue.waitingForPickup); } }
public virtual void Unassign() { if (assignee != null) { GetComponent <KPrefabID>().RemoveTag(GameTags.Assigned); if (slot != null) { Ownables soleOwner = assignee.GetSoleOwner(); if ((bool)soleOwner) { soleOwner.GetSlot(slot)?.Unassign(true); Equipment component = soleOwner.GetComponent <Equipment>(); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { component.GetSlot(slot)?.Unassign(true); } } } assignee = null; if (canBePublic) { Assign(Game.Instance.assignmentManager.assignment_groups["public"]); } assignee_identityRef.Set(null); assignee_groupID = string.Empty; if (this.OnAssign != null) { this.OnAssign(null); } Trigger(684616645, null); } }
public void OnUnequip() { isEquipped = false; if (!destroyed) { GetComponent <KPrefabID>().RemoveTag(GameTags.Equipped); GetComponent <KBatchedAnimController>().enabled = true; GetComponent <KSelectable>().IsSelectable = true; if (assignee != null) { Ownables soleOwner = assignee.GetSoleOwner(); if ((bool)soleOwner) { GameObject targetGameObject = soleOwner.GetComponent <MinionAssignablesProxy>().GetTargetGameObject(); if ((bool)targetGameObject) { Effects component = targetGameObject.GetComponent <Effects>(); if ((Object)component != (Object)null) { foreach (Effect effectImmunite in def.EffectImmunites) { component.RemoveImmunity(effectImmunite); } } } } } if (def.OnUnequipCallBack != null) { def.OnUnequipCallBack(this); } } }
public static void Postfix(EatChore.States __instance) { if (ModSettings.Instance.ShareTables) { __instance.eatatmessstation.Exit(delegate(EatChore.StatesInstance smi) { var minion = smi.sm.eater.Get(smi).GetComponent <MinionIdentity>(); if (minion == null) { return; } Ownables ownables = minion.GetSoleOwner(); if (ownables == null) { return; } AssignableSlotInstance slot = ownables.GetSlot(Db.Get().AssignableSlots.MessStation); if (slot == null) { return; } slot.Unassign(true); }); } }
public static void Postfix(SleepChore.States __instance) { if (ModSettings.Instance.ShareBeds) { __instance.success.Exit(delegate(SleepChore.StatesInstance smi) { var minion = smi.sm.sleeper.Get(smi).GetComponent <MinionIdentity>(); if (minion == null) { return; } Ownables ownables = minion.GetSoleOwner(); if (ownables == null) { return; } AssignableSlotInstance slot = ownables.GetSlot(Db.Get().AssignableSlots.Bed); if (slot == null) { return; } slot.Unassign(false); }); } }
public void AutoAssignClinic() { Ownables soleOwner = base.sm.masterTarget.Get(base.smi).GetComponent <MinionIdentity>().GetSoleOwner(); AssignableSlot clinic = Db.Get().AssignableSlots.Clinic; AssignableSlotInstance slot = soleOwner.GetSlot(clinic); if (slot != null && !((Object)slot.assignable != (Object)null)) { soleOwner.AutoAssignSlot(clinic); } }
protected override void OnCompleteWork(Worker worker) { if (equippable.assignee != null) { Ownables soleOwner = equippable.assignee.GetSoleOwner(); if ((bool)soleOwner) { soleOwner.GetComponent <Equipment>().Equip(equippable); } } }
public static void AutoAssignClinic(WoundMonitor.Instance smi) { Ownables component = smi.sm.masterTarget.Get(smi).GetComponent <Ownables>(); AssignableSlot clinic = Db.Get().AssignableSlots.Clinic; AssignableSlotInstance slot = component.GetSlot(clinic); if (slot == null || (Object)slot.assignable != (Object)null) { return; } component.AutoAssignSlot(clinic); }
public void UpdateMessStation() { Ownables soleOwner = base.sm.eater.Get(base.smi).GetComponent <MinionIdentity>().GetSoleOwner(); List <Assignable> preferredAssignables = Game.Instance.assignmentManager.GetPreferredAssignables(soleOwner, Db.Get().AssignableSlots.MessStation); if (preferredAssignables.Count == 0) { soleOwner.AutoAssignSlot(Db.Get().AssignableSlots.MessStation); preferredAssignables = Game.Instance.assignmentManager.GetPreferredAssignables(soleOwner, Db.Get().AssignableSlots.MessStation); } Assignable value = (preferredAssignables.Count <= 0) ? null : preferredAssignables[0]; base.smi.sm.messstation.Set(value, base.smi); }
public void Refresh(object data = null) { if (!sideScreen.targetAssignable.CanAssignTo(targetIdentity)) { currentState = AssignableState.Disabled; assignmentText.text = UI.UISIDESCREENS.ASSIGNABLESIDESCREEN.DISABLED; } else if (sideScreen.targetAssignable.assignee == targetIdentity) { currentState = AssignableState.Selected; assignmentText.text = UI.UISIDESCREENS.ASSIGNABLESIDESCREEN.ASSIGNED; } else { bool flag = false; KMonoBehaviour kMonoBehaviour = targetIdentity as KMonoBehaviour; if ((UnityEngine.Object)kMonoBehaviour != (UnityEngine.Object)null) { Ownables component = kMonoBehaviour.GetComponent <Ownables>(); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { AssignableSlotInstance slot = component.GetSlot(sideScreen.targetAssignable.slot); if (slot != null && slot.IsAssigned()) { currentState = AssignableState.AssignedToOther; assignmentText.text = slot.assignable.GetProperName(); flag = true; } } Equipment component2 = kMonoBehaviour.GetComponent <Equipment>(); if ((UnityEngine.Object)component2 != (UnityEngine.Object)null) { AssignableSlotInstance slot2 = component2.GetSlot(sideScreen.targetAssignable.slot); if (slot2 != null && slot2.IsAssigned()) { currentState = AssignableState.AssignedToOther; assignmentText.text = slot2.assignable.GetProperName(); flag = true; } } } if (!flag) { currentState = AssignableState.Unassigned; assignmentText.text = UI.UISIDESCREENS.ASSIGNABLESIDESCREEN.UNASSIGNED; } } toggle.ChangeState((int)currentState); }
public static void OnUnequipVest(Equippable eq) { if ((UnityEngine.Object)eq != (UnityEngine.Object)null && eq.assignee != null) { Ownables soleOwner = eq.assignee.GetSoleOwner(); if ((UnityEngine.Object)soleOwner != (UnityEngine.Object)null) { ClothingWearer component = soleOwner.GetComponent <ClothingWearer>(); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { component.ChangeToDefaultClothes(); } } } }
private void RefreshChore(IAssignableIdentity target) { if (chore != null) { chore.Cancel("Equipment Reassigned"); chore = null; } if (target != null) { Ownables soleOwner = target.GetSoleOwner(); Equipment component = soleOwner.GetComponent <Equipment>(); if (!component.IsEquipped(equippable)) { CreateChore(); } } }
/// <summary> /// Checks assigned objects and determines their locations. /// </summary> /// <param name="owner">The owner of the objects.</param> /// <param name="type">The type of object to search.</param> /// <param name="cells">Valid ownables will have their cell locations placed here.</param> private static void CheckAssignedCell(Ownables owner, AssignableSlot type, IList <int> cells) { var items = Game.Instance.assignmentManager.GetPreferredAssignables(owner, type); cells.Clear(); if (items != null) { // All usable items are added foreach (Assignable item in items) { if (item.gameObject.IsUsable()) { cells.Add(Grid.PosToCell(item)); } } } }
public bool IsAssignedTo(IAssignableIdentity identity) { Debug.Assert(identity != null, "IsAssignedTo identity is null"); Ownables soleOwner = identity.GetSoleOwner(); Debug.Assert((UnityEngine.Object)soleOwner != (UnityEngine.Object)null, "IsAssignedTo identity sole owner is null"); if (assignee != null) { foreach (Ownables owner in assignee.GetOwners()) { Debug.Assert(owner, "Assignable owners list contained null"); if ((UnityEngine.Object)owner.gameObject == (UnityEngine.Object)soleOwner.gameObject) { return(true); } } } return(false); }
public static void OnEquipVest(Equippable eq,ClothingWearer.ClothingInfo clothingInfo) { if (!((UnityEngine.Object)eq == (UnityEngine.Object)null) && eq.assignee != null) { Ownables soleOwner = eq.assignee.GetSoleOwner(); if (!((UnityEngine.Object)soleOwner == (UnityEngine.Object)null)) { MinionAssignablesProxy component = soleOwner.GetComponent <MinionAssignablesProxy>(); ClothingWearer component2 = (component.target as KMonoBehaviour).GetComponent <ClothingWearer>(); if ((UnityEngine.Object)component2 != (UnityEngine.Object)null) { component2.ChangeClothes(clothingInfo); } else { Debug.LogWarning("Clothing item cannot be equipped to assignee because they lack ClothingWearer component"); } } } }
public virtual void Assign(IAssignableIdentity new_assignee) { if (new_assignee != assignee) { if (new_assignee is KMonoBehaviour) { if (!CanAssignTo(new_assignee)) { return; } assignee_identityRef.Set((KMonoBehaviour)new_assignee); assignee_groupID = string.Empty; } else if (new_assignee is AssignmentGroup) { assignee_identityRef.Set(null); assignee_groupID = ((AssignmentGroup)new_assignee).id; } GetComponent <KPrefabID>().AddTag(GameTags.Assigned, false); assignee = new_assignee; if (slot != null && (new_assignee is MinionIdentity || new_assignee is StoredMinionIdentity || new_assignee is MinionAssignablesProxy)) { Ownables soleOwner = new_assignee.GetSoleOwner(); if ((UnityEngine.Object)soleOwner != (UnityEngine.Object)null) { soleOwner.GetSlot(slot)?.Assign(this); } Equipment component = soleOwner.GetComponent <Equipment>(); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { component.GetSlot(slot)?.Assign(this); } } if (this.OnAssign != null) { this.OnAssign(new_assignee); } Trigger(684616645, new_assignee); } }
private void RefreshStatusEffects(object data) { Equippable component = GetComponent <Equippable>(); Storage component2 = GetComponent <Storage>(); bool flag = component2.Has(GameTags.AnyWater); if (component.assignee != null && flag) { Ownables soleOwner = component.assignee.GetSoleOwner(); if ((Object)soleOwner != (Object)null) { GameObject targetGameObject = soleOwner.GetComponent <MinionAssignablesProxy>().GetTargetGameObject(); if ((bool)targetGameObject) { Effects component3 = targetGameObject.GetComponent <Effects>(); if (!component3.HasEffect("SoiledSuit")) { component3.Add("SoiledSuit", true); } } } } }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> dictionary = new Dictionary <string, float>(); dictionary.Add((-899253461).ToString(), 200f); dictionary.Add((-486269331).ToString(), 25f); List <AttributeModifier> list = new List <AttributeModifier>(); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.INSULATION, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_INSULATION, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.ATHLETICS, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_ATHLETICS, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.THERMAL_CONDUCTIVITY_BARRIER, TUNING.EQUIPMENT.SUITS.ATMOSUIT_THERMAL_CONDUCTIVITY_BARRIER, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(Db.Get().Attributes.Digging.Id, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_DIGGING, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(Db.Get().Attributes.ScaldingThreshold.Id, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_SCALDING, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); expertAthleticsModifier = new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.ATHLETICS, (float)(-TUNING.EQUIPMENT.SUITS.ATMOSUIT_ATHLETICS), Db.Get().Skills.Suits1.Name, false, false, true); string id = "Jet_Suit"; string sLOT = TUNING.EQUIPMENT.SUITS.SLOT; SimHashes outputElement = SimHashes.Steel; float mass = (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_MASS; List <AttributeModifier> attributeModifiers = list; Tag[] additional_tags = new Tag[1] { GameTags.Suit }; EquipmentDef equipmentDef = EquipmentTemplates.CreateEquipmentDef(id,sLOT,outputElement,mass,"suit_jetpack_kanim",string.Empty,"body_jetpack_kanim",6,attributeModifiers,null,true,EntityTemplates.CollisionShape.CIRCLE,0.325f,0.325f,additional_tags,"JetSuit"); equipmentDef.RecipeDescription = STRINGS.EQUIPMENT.PREFABS.JET_SUIT.RECIPE_DESC; equipmentDef.EffectImmunites.Add(Db.Get().effects.Get("SoakingWet")); equipmentDef.EffectImmunites.Add(Db.Get().effects.Get("WetFeet")); equipmentDef.EffectImmunites.Add(Db.Get().effects.Get("PoppedEarDrums")); equipmentDef.OnEquipCallBack = delegate(Equippable eq) { Ownables soleOwner2 = eq.assignee.GetSoleOwner(); if ((Object)soleOwner2 != (Object)null) { GameObject targetGameObject2 = soleOwner2.GetComponent <MinionAssignablesProxy>().GetTargetGameObject(); Navigator component4 = targetGameObject2.GetComponent <Navigator>(); if ((Object)component4 != (Object)null) { component4.SetFlags(PathFinder.PotentialPath.Flags.HasJetPack); } MinionResume component5 = targetGameObject2.GetComponent <MinionResume>(); if ((Object)component5 != (Object)null && component5.HasPerk(Db.Get().SkillPerks.ExosuitExpertise.Id)) { targetGameObject2.GetAttributes().Get(Db.Get().Attributes.Athletics).Add(expertAthleticsModifier); } KAnimControllerBase component6 = targetGameObject2.GetComponent <KAnimControllerBase>(); if ((bool)component6) { component6.AddAnimOverrides(Assets.GetAnim("anim_loco_hover_kanim"), 0f); } } }; equipmentDef.OnUnequipCallBack = delegate(Equippable eq) { if (eq.assignee != null) { Ownables soleOwner = eq.assignee.GetSoleOwner(); if ((bool)soleOwner) { GameObject targetGameObject = soleOwner.GetComponent <MinionAssignablesProxy>().GetTargetGameObject(); if ((bool)targetGameObject) { targetGameObject.GetAttributes()?.Get(Db.Get().Attributes.Athletics).Remove(expertAthleticsModifier); Navigator component = targetGameObject.GetComponent <Navigator>(); if ((Object)component != (Object)null) { component.ClearFlags(PathFinder.PotentialPath.Flags.HasJetPack); } KAnimControllerBase component2 = targetGameObject.GetComponent <KAnimControllerBase>(); if ((bool)component2) { component2.RemoveAnimOverrides(Assets.GetAnim("anim_loco_hover_kanim")); } Effects component3 = targetGameObject.GetComponent <Effects>(); if (component3.HasEffect("SoiledSuit")) { component3.Remove("SoiledSuit"); } } eq.GetComponent <Storage>().DropAll(eq.transform.GetPosition(), true, true, default(Vector3), false); } } }; GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SuitIDs, "Jet_Suit"); GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SuitIDs, "Helmet"); return(equipmentDef); }
public EquipmentDef CreateEquipmentDef() { List <AttributeModifier> list = new List <AttributeModifier>(); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.INSULATION, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_INSULATION, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.ATHLETICS, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_ATHLETICS, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.THERMAL_CONDUCTIVITY_BARRIER, TUNING.EQUIPMENT.SUITS.ATMOSUIT_THERMAL_CONDUCTIVITY_BARRIER, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(Db.Get().Attributes.Digging.Id, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_DIGGING, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(Db.Get().Attributes.ScaldingThreshold.Id, (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_SCALDING, STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.NAME, false, false, true)); expertAthleticsModifier = new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.ATHLETICS, (float)(-TUNING.EQUIPMENT.SUITS.ATMOSUIT_ATHLETICS), Db.Get().Skills.Suits1.Name, false, false, true); string id = "Atmo_Suit"; string sLOT = TUNING.EQUIPMENT.SUITS.SLOT; SimHashes outputElement = SimHashes.Dirt; float mass = (float)TUNING.EQUIPMENT.SUITS.ATMOSUIT_MASS; string anim = "suit_oxygen_kanim"; string empty = string.Empty; string buildOverride = "body_oxygen_kanim"; int buildOverridePriority = 6; List <AttributeModifier> attributeModifiers = list; Tag[] additional_tags = new Tag[1] { GameTags.Suit }; EquipmentDef equipmentDef = EquipmentTemplates.CreateEquipmentDef(id,sLOT,outputElement,mass,anim,empty,buildOverride,buildOverridePriority,attributeModifiers,null,true,EntityTemplates.CollisionShape.CIRCLE,0.325f,0.325f,additional_tags,null); equipmentDef.RecipeDescription = STRINGS.EQUIPMENT.PREFABS.ATMO_SUIT.RECIPE_DESC; equipmentDef.EffectImmunites.Add(Db.Get().effects.Get("SoakingWet")); equipmentDef.EffectImmunites.Add(Db.Get().effects.Get("WetFeet")); equipmentDef.EffectImmunites.Add(Db.Get().effects.Get("PoppedEarDrums")); equipmentDef.OnEquipCallBack = delegate(Equippable eq) { Ownables soleOwner2 = eq.assignee.GetSoleOwner(); if ((Object)soleOwner2 != (Object)null) { GameObject targetGameObject2 = soleOwner2.GetComponent <MinionAssignablesProxy>().GetTargetGameObject(); Navigator component3 = targetGameObject2.GetComponent <Navigator>(); if ((Object)component3 != (Object)null) { component3.SetFlags(PathFinder.PotentialPath.Flags.HasAtmoSuit); } MinionResume component4 = targetGameObject2.GetComponent <MinionResume>(); if ((Object)component4 != (Object)null && component4.HasPerk(Db.Get().SkillPerks.ExosuitExpertise.Id)) { targetGameObject2.GetAttributes().Get(Db.Get().Attributes.Athletics).Add(expertAthleticsModifier); } } }; equipmentDef.OnUnequipCallBack = delegate(Equippable eq) { if (eq.assignee != null) { Ownables soleOwner = eq.assignee.GetSoleOwner(); if ((Object)soleOwner != (Object)null) { GameObject targetGameObject = soleOwner.GetComponent <MinionAssignablesProxy>().GetTargetGameObject(); if ((bool)targetGameObject) { targetGameObject.GetAttributes()?.Get(Db.Get().Attributes.Athletics).Remove(expertAthleticsModifier); Navigator component = targetGameObject.GetComponent <Navigator>(); if ((Object)component != (Object)null) { component.ClearFlags(PathFinder.PotentialPath.Flags.HasAtmoSuit); } Effects component2 = targetGameObject.GetComponent <Effects>(); if ((Object)component2 != (Object)null && component2.HasEffect("SoiledSuit")) { component2.Remove("SoiledSuit"); } } eq.GetComponent <Storage>().DropAll(eq.transform.GetPosition(), true, true, default(Vector3), false); } } }; GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SuitIDs, "Atmo_Suit"); GeneratedBuildings.RegisterWithOverlay(OverlayScreen.SuitIDs, "Helmet"); return(equipmentDef); }