Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
    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);
        }
Esempio n. 5
0
    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.FUNKY_VEST_MASS);
        ClothingWearer.ClothingInfo clothingInfo       = ClothingWearer.ClothingInfo.FANCY_CLOTHING;
        List <AttributeModifier>    attributeModifiers = new List <AttributeModifier>();
        EquipmentDef equipmentDef = EquipmentTemplates.CreateEquipmentDef("Funky_Vest", TUNING.EQUIPMENT.CLOTHING.SLOT,SimHashes.Carbon,(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,null,null);
        Descriptor   item         = new Descriptor($"{DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME}: {GameUtil.GetFormattedDistance(ClothingWearer.ClothingInfo.FANCY_CLOTHING.conductivityMod)}",$"{DUPLICANTS.ATTRIBUTES.THERMALCONDUCTIVITYBARRIER.NAME}: {GameUtil.GetFormattedDistance(ClothingWearer.ClothingInfo.FANCY_CLOTHING.conductivityMod)}",Descriptor.DescriptorType.Effect,false);
        Descriptor   item2        = new Descriptor($"{DUPLICANTS.ATTRIBUTES.DECOR.NAME}: {ClothingWearer.ClothingInfo.FANCY_CLOTHING.decorMod}",$"{DUPLICANTS.ATTRIBUTES.DECOR.NAME}: {ClothingWearer.ClothingInfo.FANCY_CLOTHING.decorMod}",Descriptor.DescriptorType.Effect,false);

        equipmentDef.additionalDescriptors.Add(item);
        equipmentDef.additionalDescriptors.Add(item2);
        equipmentDef.OnEquipCallBack = delegate(Equippable eq)
        {
            CoolVestConfig.OnEquipVest(eq,clothingInfo);
        };
        equipmentDef.OnUnequipCallBack = CoolVestConfig.OnUnequipVest;
        equipmentDef.RecipeDescription = STRINGS.EQUIPMENT.PREFABS.FUNKY_VEST.RECIPE_DESC;
        return(equipmentDef);
    }
Esempio n. 7
0
 public static void OnEquip(Equippable eq,ClothingWearer.ClothingInfo clothingInfo)
 {
     CoolVestConfig.OnEquipVest(eq,clothingInfo);
 }