public EquipmentDef CreateEquipmentDef() { var attributeModifiers = new List <AttributeModifier>(); #region Def Show Effect var temperature = $"{DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME}: {GameUtil.GetFormattedDistance(clothingInfo.conductivityMod)}"; var temperatureTooltip = temperature; var decor = $"{DUPLICANTS.ATTRIBUTES.DECOR.NAME}: {clothingInfo.decorMod}"; var decorTooltip = decor; #endregion Descriptor temperatureDesc = new Descriptor(temperature,temperatureTooltip,Descriptor.DescriptorType.Effect,false); Descriptor decorDesc = new Descriptor(decor,decorTooltip,Descriptor.DescriptorType.Effect,false); var def = EquipmentTemplates.CreateEquipmentDef(ID,SLOT,SimHashes.Carbon,MASS,ANIM,SNAP_ON,BUILD_OVERRIDE,4,attributeModifiers,SNAP_ON1,true,EntityTemplates.CollisionShape.RECTANGLE,0.75f,0.4f,null,null); def.additionalDescriptors.Add(temperatureDesc); def.additionalDescriptors.Add(decorDesc); def.OnEquipCallBack = delegate(Equippable eq) { OnEquip(eq,clothingInfo); }; def.OnUnequipCallBack = ActionEq ?? (ActionEq = new Action <Equippable>(OnUnequip)); def.RecipeDescription = RECIPE_DESC; return(def); }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> InputElementMassMap = new Dictionary <string, float>(); InputElementMassMap.Add(LightPackConfig.ID, 1); InputElementMassMap.Add(BackPackConfig.ID, 1); InputElementMassMap.Add(ReBreatherConfig.ID, 1); InputElementMassMap.Add(SlicksterShoesConfig.ID, 1); InputElementMassMap.Add(StressPackConfig.ID, 1); InputElementMassMap.Add("BasicFabric", 1); ClothingWearer.ClothingInfo clothingInfo = new ClothingWearer.ClothingInfo((string)ID, decorMod, 0f, 0f); List <AttributeModifier> AttributeModifiers = new List <AttributeModifier>() { new AttributeModifier(Db.Get().Attributes.QualityOfLife.Id, (float)CarryAmount, (string)ID, false, false, true), new AttributeModifier(Db.Get().Attributes.CarryAmount.Id, (float)CarryAmount, (string)ID, true, false, true), new AttributeModifier(Db.Get().Attributes.Athletics.Id, (float)CarryAmount, (string)ID, false, false, true), new AttributeModifier(Db.Get().Amounts.Breath.maxAttribute.Id, (float)CarryAmount, (string)ID, false, false, true), }; EquipmentDef equipmentDef1 = EquipmentTemplates.CreateEquipmentDef("OnePack", TUNING.EQUIPMENT.TOOLS.TOOLSLOT, TUNING.EQUIPMENT.VESTS.FABRICATOR, TUNING.EQUIPMENT.VESTS.FUNKY_VEST_FABTIME, SimHashes.Carbon, InputElementMassMap, (float)TUNING.EQUIPMENT.VESTS.FUNKY_VEST_MASS, "vacillator_charge_kanim", (string)null, "body_water_slow_kanim", 4, AttributeModifiers, (string)null, true, EntityTemplates.CollisionShape.RECTANGLE, 0.75f, 0.4f, (Tag[])null); equipmentDef1.OnEquipCallBack = (System.Action <Equippable>)(eq => CoolVestConfig.OnEquipVest(eq, clothingInfo)); equipmentDef1.RecipeDescription = Recipe_Desc; return(equipmentDef1); }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> dictionary = new Dictionary <string, float>(); dictionary.Add(1832607973.ToString(), 300f); List <AttributeModifier> list = new List <AttributeModifier>(); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.INSULATION, (float)TUNING.EQUIPMENT.SUITS.AQUASUIT_INSULATION, STRINGS.EQUIPMENT.PREFABS.AQUA_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.ATHLETICS, (float)TUNING.EQUIPMENT.SUITS.AQUASUIT_ATHLETICS, STRINGS.EQUIPMENT.PREFABS.AQUA_SUIT.NAME, false, false, true)); list.Add(new AttributeModifier(TUNING.EQUIPMENT.ATTRIBUTE_MOD_IDS.MAX_UNDERWATER_TRAVELCOST, (float)TUNING.EQUIPMENT.SUITS.AQUASUIT_UNDERWATER_TRAVELCOST, STRINGS.EQUIPMENT.PREFABS.AQUA_SUIT.NAME, false, false, true)); string id = "Aqua_Suit"; string sLOT = TUNING.EQUIPMENT.SUITS.SLOT; SimHashes outputElement = SimHashes.Water; float mass = (float)TUNING.EQUIPMENT.SUITS.AQUASUIT_MASS; string anim = "suit_water_slow_kanim"; string sNAPON = TUNING.EQUIPMENT.SUITS.SNAPON; string buildOverride = "body_water_slow_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,sNAPON,buildOverride,buildOverridePriority,attributeModifiers,null,false,EntityTemplates.CollisionShape.CIRCLE,0.325f,0.325f,additional_tags,null); equipmentDef.RecipeDescription = STRINGS.EQUIPMENT.PREFABS.AQUA_SUIT.RECIPE_DESC; return(equipmentDef); }
public ActionResult ETTemplate(int id, EquipmentTemplates et) { int uid; string utoken; HttpCookie cookie = Request.Cookies["User"]; if (cookie != null) { uid = int.Parse(cookie["id"]); utoken = cookie["token"]; } else { uid = 0; utoken = null; } if (auth.CheckAuthStatus(uid, utoken) && auth.GetCurrentUser(cookie)["Role"] == "1") { ViewBag.RoleNum = auth.GetCurrentUser(cookie)["Role"]; ViewBag.User = auth.GetCurrentUser(cookie)["User"]; ViewBag.Role = db.Roles.Find(int.Parse(auth.GetCurrentUser(cookie)["Role"])).Name; if (id == 0) { List <EqField> listFields = new List <EqField>(); foreach (var item in et.Fields.Split(';')) { listFields.Add(new EqField { Name = item }); } et.Fields = JsonConvert.SerializeObject(listFields); db.EquipmentTemplates.Add(et); } else { List <EqField> listFields = new List <EqField>(); foreach (var item in et.Fields.Split(';')) { listFields.Add(new EqField { Name = item }); } db.EquipmentTemplates.Find(id).Name = et.Name; db.EquipmentTemplates.Find(id).Fields = JsonConvert.SerializeObject(listFields); } db.SaveChanges(); return(Redirect("~/Users")); } else { return(Redirect("~/Login")); } }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> InputElementMassMap = new Dictionary <string, float>(); InputElementMassMap.Add("GLASS", 2); InputElementMassMap.Add("LIGHTBUG", 1); ClothingWearer.ClothingInfo clothingInfo = new ClothingWearer.ClothingInfo((string)ID, decorMod, 0f, 0f); List <AttributeModifier> AttributeModifiers = new List <AttributeModifier>(); EquipmentDef equipmentDef1 = EquipmentTemplates.CreateEquipmentDef("LightPack", TUNING.EQUIPMENT.TOOLS.TOOLSLOT, TUNING.EQUIPMENT.VESTS.FABRICATOR, TUNING.EQUIPMENT.VESTS.FUNKY_VEST_FABTIME, SimHashes.Carbon, InputElementMassMap, (float)TUNING.EQUIPMENT.VESTS.FUNKY_VEST_MASS, "vacillator_charge_kanim", (string)null, "vacillator_charge_kanim", 4, AttributeModifiers, (string)null, true, EntityTemplates.CollisionShape.RECTANGLE, 0.75f, 0.4f, (Tag[])null); equipmentDef1.OnEquipCallBack = (System.Action <Equippable>)(eq => CoolVestConfig.OnEquipVest(eq, clothingInfo)); equipmentDef1.RecipeDescription = Recipe_Desc; return(equipmentDef1); }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> InputElementMassMap = new Dictionary <string, float>(); InputElementMassMap.Add("Puft", 1); List <AttributeModifier> AttributeModifiers = new List <AttributeModifier>() { new AttributeModifier(Db.Get().Amounts.Breath.maxAttribute.Id, (float)CarryAmount, (string)BackPackConfig.ID, false, false, true), }; ClothingWearer.ClothingInfo clothingInfo = new ClothingWearer.ClothingInfo((string)ID, decorMod, 0f, 0f); EquipmentDef equipmentDef1 = EquipmentTemplates.CreateEquipmentDef("ReBreather", TUNING.EQUIPMENT.TOOLS.TOOLSLOT, TUNING.EQUIPMENT.VESTS.FABRICATOR, TUNING.EQUIPMENT.VESTS.FUNKY_VEST_FABTIME, SimHashes.Carbon, InputElementMassMap, (float)TUNING.EQUIPMENT.VESTS.FUNKY_VEST_MASS, "rotfood_kanim", (string)null, "rotfood_kanim", 4, AttributeModifiers, (string)null, true, EntityTemplates.CollisionShape.RECTANGLE, 0.75f, 0.4f, (Tag[])null); equipmentDef1.OnEquipCallBack = (System.Action <Equippable>)(eq => CoolVestConfig.OnEquipVest(eq, clothingInfo)); equipmentDef1.RecipeDescription = Recipe_Desc; return(equipmentDef1); }
public EquipmentDef CreateEquipmentDef() { ClothingWearer.ClothingInfo clothingInfo = NEW_CLOTHING; List <AttributeModifier> attributeModifiers = new List <AttributeModifier>(); attributeModifiers.Add(new AttributeModifier(Db.Get().Attributes.Caring.Id, AttributeIncrease, DisplayName, false, false, true)); EquipmentDef equipment = EquipmentTemplates.CreateEquipmentDef( Id: Id, Slot: TUNING.EQUIPMENT.CLOTHING.SLOT, OutputElement: SimHashes.Carbon, Mass: TUNING.EQUIPMENT.VESTS.FUNKY_VEST_MASS, Anim: "doctorshirt", SnapOn: TUNING.EQUIPMENT.VESTS.SNAPON0, BuildOverride: "doctorbodyshirt", BuildOverridePriority: 4, AttributeModifiers: attributeModifiers, SnapOn1: TUNING.EQUIPMENT.VESTS.SNAPON1, IsBody: true, CollisionShape: EntityTemplates.CollisionShape.RECTANGLE, width: 0.75f, height: 0.4f, additional_tags: null, RecipeTechUnlock: null); string thermalConductivityDescriptor = string.Format("{0}: {1}", DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME, GameUtil.GetFormattedDistance(clothingInfo.conductivityMod)); equipment.additionalDescriptors.Add(new Descriptor( thermalConductivityDescriptor,thermalConductivityDescriptor, Descriptor.DescriptorType.Effect,false)); string decorDescriptor = string.Format("{0}: {1}", DUPLICANTS.ATTRIBUTES.DECOR.NAME, clothingInfo.decorMod); equipment.additionalDescriptors.Add( new Descriptor(decorDescriptor,decorDescriptor, Descriptor.DescriptorType.Effect,false)); equipment.OnEquipCallBack = eq => CoolVestConfig.OnEquipVest(eq,clothingInfo); equipment.OnUnequipCallBack = eq => CoolVestConfig.OnUnequipVest(eq); equipment.RecipeDescription = RecipeDescription; return(equipment); }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> InputElementMassMap = new Dictionary <string, float>(); InputElementMassMap.Add("BasicFabric", 1); InputElementMassMap.Add("POLYPROPYLENE", 2); ClothingWearer.ClothingInfo clothingInfo = new ClothingWearer.ClothingInfo((string)RubberBootsConfig.ID, decorMod, 1f / 400f, -1.25f); List <AttributeModifier> AttributeModifiers = new List <AttributeModifier>(); EquipmentDef equipmentDef1 = EquipmentTemplates.CreateEquipmentDef("RUBBERBOOTS", TUNING.EQUIPMENT.CLOTHING.SLOT,TUNING.EQUIPMENT.VESTS.FABRICATOR,TUNING.EQUIPMENT.VESTS.FUNKY_VEST_FABTIME,SimHashes.Carbon,InputElementMassMap,(float)TUNING.EQUIPMENT.VESTS.FUNKY_VEST_MASS,TUNING.EQUIPMENT.VESTS.FUNKY_VEST_ICON0,TUNING.EQUIPMENT.VESTS.SNAPON0,TUNING.EQUIPMENT.VESTS.FUNKY_VEST_ANIM0,4,AttributeModifiers,TUNING.EQUIPMENT.VESTS.SNAPON1,true,EntityTemplates.CollisionShape.RECTANGLE,0.75f,0.4f,(Tag[])null); Descriptor descriptor1 = new Descriptor(string.Format("{0}: {1}", (object)DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME, (object)GameUtil.GetFormattedDistance(ClothingWearer.ClothingInfo.FANCY_CLOTHING.conductivityMod)), string.Format("{0}: {1}", (object)DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME, (object)GameUtil.GetFormattedDistance(ClothingWearer.ClothingInfo.FANCY_CLOTHING.conductivityMod)), Descriptor.DescriptorType.Effect, false); Descriptor descriptor2 = new Descriptor(string.Format("{0}: {1}", (object)DUPLICANTS.ATTRIBUTES.DECOR.NAME, (object)RubberBootsConfig.decorMod), string.Format("{0}: {1}", (object)DUPLICANTS.ATTRIBUTES.DECOR.NAME, (object)RubberBootsConfig.decorMod), Descriptor.DescriptorType.Effect, false); equipmentDef1.additionalDescriptors.Add(descriptor1); equipmentDef1.additionalDescriptors.Add(descriptor2); equipmentDef1.EffectImmunites.Add(Db.Get().effects.Get("SoakingWet")); equipmentDef1.EffectImmunites.Add(Db.Get().effects.Get("WetFeet")); equipmentDef1.OnEquipCallBack = (System.Action <Equippable>)(eq => CoolVestConfig.OnEquipVest(eq, clothingInfo)); equipmentDef1.RecipeDescription = (string)STRINGS.EQUIPMENT.PREFABS.FUNKY_VEST.RECIPE_DESC; return(equipmentDef1); }
public EquipmentDef CreateEquipmentDef() { Dictionary <string, float> dictionary = new Dictionary <string, float>(); dictionary.Add("BasicFabric", (float)TUNING.EQUIPMENT.VESTS.COOL_VEST_MASS); ClothingWearer.ClothingInfo clothingInfo = ClothingWearer.ClothingInfo.COOL_CLOTHING; List <AttributeModifier> attributeModifiers = new List <AttributeModifier>(); EquipmentDef equipmentDef = EquipmentTemplates.CreateEquipmentDef("Cool_Vest", TUNING.EQUIPMENT.CLOTHING.SLOT,SimHashes.Carbon,(float)TUNING.EQUIPMENT.VESTS.COOL_VEST_MASS,TUNING.EQUIPMENT.VESTS.COOL_VEST_ICON0,TUNING.EQUIPMENT.VESTS.SNAPON0,TUNING.EQUIPMENT.VESTS.COOL_VEST_ANIM0,4,attributeModifiers,TUNING.EQUIPMENT.VESTS.SNAPON1,true,EntityTemplates.CollisionShape.RECTANGLE,0.75f,0.4f,null,null); Descriptor item = new Descriptor($"{DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME}: {GameUtil.GetFormattedDistance(ClothingWearer.ClothingInfo.COOL_CLOTHING.conductivityMod)}",$"{DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME}: {GameUtil.GetFormattedDistance(ClothingWearer.ClothingInfo.COOL_CLOTHING.conductivityMod)}",Descriptor.DescriptorType.Effect,false); Descriptor item2 = new Descriptor($"{DUPLICANTS.ATTRIBUTES.DECOR.NAME}: {ClothingWearer.ClothingInfo.COOL_CLOTHING.decorMod}",$"{DUPLICANTS.ATTRIBUTES.DECOR.NAME}: {ClothingWearer.ClothingInfo.COOL_CLOTHING.decorMod}",Descriptor.DescriptorType.Effect,false); equipmentDef.additionalDescriptors.Add(item); equipmentDef.additionalDescriptors.Add(item2); equipmentDef.OnEquipCallBack = delegate(Equippable eq) { OnEquipVest(eq,clothingInfo); }; equipmentDef.OnUnequipCallBack = OnUnequipVest; equipmentDef.RecipeDescription = STRINGS.EQUIPMENT.PREFABS.COOL_VEST.RECIPE_DESC; return(equipmentDef); }
public ActionResult ETTemplate(int id) { int uid; string utoken; HttpCookie cookie = Request.Cookies["User"]; if (cookie != null) { uid = int.Parse(cookie["id"]); utoken = cookie["token"]; } else { uid = 0; utoken = null; } if (auth.CheckAuthStatus(uid, utoken) && auth.GetCurrentUser(cookie)["Role"] == "1") { ViewBag.RoleNum = auth.GetCurrentUser(cookie)["Role"]; ViewBag.User = auth.GetCurrentUser(cookie)["User"]; ViewBag.Role = db.Roles.Find(int.Parse(auth.GetCurrentUser(cookie)["Role"])).Name; ViewBag.ETID = id; ViewBag.Part = "Equipment"; if (id == 0) { return(View(new EquipmentTemplates { })); } else { EquipmentTemplates et = db.EquipmentTemplates.Find(id); return(View(et)); } } else { return(Redirect("~/Login")); } }
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); }