Exemple #1
0
        protected override void OnFinishedPatch()
        {
            base.OnFinishedPatch();

            KnownTech.CompoundTech compound = new KnownTech.CompoundTech();
            compound.techType     = this.TechType;
            compound.dependencies = new List <TechType>()
            {
                TechType.ReinforcedDiveSuit,
                Main.GetModTechType("SurvivalSuit")
            };
            Reflection.AddCompoundTech(compound);
        }
Exemple #2
0
 public DWUltraGlideSwimChargeFins() : base("DWUltraGlideSwimChargeFins", friendlyName, description)
 {
     OnFinishedPatching += () =>
     {
         Main.AddModTechType(this.TechType);
         EquipmentPatch.AddSubstitution(this.TechType, TechType.SwimChargeFins);
         UnderwaterMotorPatches.AddSpeedModifier(this.TechType, 3f);
         Reflection.AddCompoundTech(this.TechType, new List <TechType>()
         {
             TechType.SwimChargeFins,
             TechType.UltraGlideFins
         });
         CoroutineHost.StartCoroutine(PostPatchSetup());
     };
 }
 public SurvivalSuitBlueprint_FromSurvivalCold() : base("SurvivalSuitBlueprint_FromSurvivalCold")
 {
     OnFinishedPatching += () =>
     {
         KnownTech.CompoundTech compound = new KnownTech.CompoundTech();
         compound.techType     = this.TechType;
         compound.dependencies = new List <TechType>()
         {
             TechType.ReinforcedDiveSuit,
             TechType.Stillsuit,
             TechType.ColdSuit
         };
         Reflection.AddCompoundTech(compound);
     };
 }
Exemple #4
0
 public InsulatedRebreather() : base("InsulatedRebreather", "Insulated Rebreather", "Rebreather equipped with insulation helps slow the onset of hypothermia")
 {
     OnFinishedPatching += () =>
     {
         int coldResist = TechData.GetColdResistance(TechType.ColdSuitHelmet);
         DWEquipmentBonanza.Reflection.AddColdResistance(this.TechType, System.Math.Max(20, coldResist));
         DWEquipmentBonanza.Reflection.SetItemSize(this.TechType, 2, 2);
         Log.LogDebug($"Finished patching {this.TechType.AsString()}, using source cold resist of {coldResist}, cold resistance for techtype {this.TechType.AsString()} = {TechData.GetColdResistance(this.TechType)}");
         Main.AddSubstitution(this.TechType, TechType.ColdSuitHelmet);
         Main.AddSubstitution(this.TechType, TechType.Rebreather);
         Main.AddModTechType(this.TechType);
         Reflection.AddCompoundTech(this.TechType, new List <TechType>()
         {
             TechType.Rebreather,
             TechType.ColdSuit
         });
     };
 }
Exemple #5
0
 public ReinforcedColdSuit() : base("ReinforcedColdSuit", "Reinforced Cold Suit", "Reinforced, insulated diving suit providing physical protection and insulation from extreme temperatures.")
 {
     OnFinishedPatching += () =>
     {
         int coldResist = TechData.GetColdResistance(TechType.ColdSuit);
         Reflection.AddColdResistance(this.TechType, System.Math.Max(50, coldResist));
         Reflection.SetItemSize(this.TechType, 2, 3);
         Log.LogDebug($"Finished patching {this.TechType.AsString()}, found source cold resist of {coldResist}, cold resistance for techtype {this.TechType.AsString()} = {TechData.GetColdResistance(this.TechType)}");
         Main.AddSubstitution(this.TechType, TechType.ColdSuit);
         Main.AddSubstitution(this.TechType, TechType.ReinforcedDiveSuit);
         Main.AddModTechType(this.TechType);
         Reflection.AddCompoundTech(this.TechType, new List <TechType>()
         {
             TechType.ReinforcedDiveSuit,
             TechType.ColdSuit
         });
     };
 }
 public AcidSuit(string classId = "AcidSuit", string friendlyName = "Brine Suit", string description = "Reinforced dive suit with an acid-resistant layer") : base(classId, friendlyName, description)
 {
     OnFinishedPatching += () =>
     {
         TechTypeUtils.AddModTechType(this.TechType);
         EquipmentPatch.AddSubstitutions(this.TechType, new HashSet <TechType>()
         {
             TechType.RadiationSuit, TechType.ReinforcedDiveSuit
         });
         Main.AddDiveSuit(this.TechType, this.maxDepth, this.breathMultiplier, this.minTempBonus);
         Main.AddDamageResist(this.TechType, DamageType.Acid, 0.6f);
         Reflection.AddCompoundTech(this.TechType, new List <TechType>()
         {
             TechType.ReinforcedDiveSuit,
             TechType.RadiationSuit
         });
     };
 }
Exemple #7
0
 public HighCapacityBooster() : base("HighCapacityBooster", "High Capacity Booster Tank", "Booster tank with increased oxygen capacity.")
 {
     OnFinishedPatching += () =>
     {
         Main.AddSubstitution(this.TechType, TechType.SuitBoosterTank);
         Main.AddSubstitution(this.TechType, TechType.HighCapacityTank);
         Main.AddModTechType(this.TechType);
         KnownTech.CompoundTech compound = new KnownTech.CompoundTech();
         compound.techType     = this.TechType;
         compound.dependencies = new List <TechType>()
         {
             TechType.SuitBoosterTank,
             TechType.HighCapacityTank
         };
         Reflection.AddCompoundTech(compound);
         CoroutineHost.StartCoroutine(PostPatchSetup());
     };
 }
Exemple #8
0
        public PlasteelHighCapTank() : base("PlasteelHighCapTank", "Plasteel Ultra Capacity Tank", "Lightweight tank with high oxygen capacity")
        {
            OnFinishedPatching += () =>
            {
                Main.AddSubstitution(this.TechType, TechType.PlasteelTank);
                Main.AddSubstitution(this.TechType, TechType.HighCapacityTank);
                Main.AddModTechType(this.TechType);
                Reflection.AddCompoundTech(this.TechType, new List <TechType>()
                {
                    TechType.PlasteelTank,
                    TechType.HighCapacityTank
                });
                CoroutineHost.StartCoroutine(PostPatchSetup());

                UnderwaterMotorPatches.AddSpeedModifier(this.TechType, -0.10625f);
                Main.AddCustomOxyExclusion(this.TechType, true, true);
                Main.AddCustomOxyTank(this.TechType, -1f, icon);
            };
        }
Exemple #9
0
        protected virtual void OnFinishedPatch()
        {
            //Main.AddSubstitution(this.TechType, TechType.Stillsuit);
            foreach (TechType tt in substitutions)
            {
                Main.AddSubstitution(this.TechType, tt);
            }
            Main.AddModTechType(this.TechType);
            PlayerPatch.AddSurvivalSuit(this.TechType);

            if (CompoundDependencies.Count > 0)
            {
                KnownTech.CompoundTech compound = new KnownTech.CompoundTech();
                compound.techType     = this.TechType;
                compound.dependencies = CompoundDependencies;
                Reflection.AddCompoundTech(compound);
            }
            //SurvivalPatches.AddNeedsCapOverride(this.TechType, SurvivalCapOverride);
        }
Exemple #10
0
 public InsulatedRebreather() : base("InsulatedRebreather", "Insulated Rebreather", "Rebreather equipped with insulation helps slow the onset of hypothermia")
 {
     OnFinishedPatching += () =>
     {
         int coldResist = TechData.GetColdResistance(TechType.ColdSuitHelmet);
         CombinedItems.Reflection.AddColdResistance(this.TechType, System.Math.Max(20, coldResist));
         CombinedItems.Reflection.SetItemSize(this.TechType, 2, 2);
         Log.LogDebug($"Finished patching {this.TechType.AsString()}, found source cold resist of {coldResist}, cold resistance for techtype {this.TechType.AsString()} = {TechData.GetColdResistance(this.TechType)}");
         Main.AddSubstitution(this.TechType, TechType.ColdSuitHelmet);
         Main.AddSubstitution(this.TechType, TechType.Rebreather);
         Main.AddModTechType(this.TechType);
         KnownTech.CompoundTech compound = new KnownTech.CompoundTech();
         compound.techType     = this.TechType;
         compound.dependencies = new List <TechType>()
         {
             TechType.Rebreather,
             TechType.ColdSuit
         };
         Reflection.AddCompoundTech(compound);
     };
 }
        public HighCapacityBooster(string classId = "HighCapacityBooster",
            string friendlyName = "High Capacity Booster Tank",
            string description = "Booster tank with increased oxygen capacity.") : base(classId, friendlyName, description)
        {
            //CoroutineHost.StartCoroutine(PostPatchSetup());
            OnFinishedPatching += () =>
            {
                Main.AddModTechType(this.TechType);
                if (Substitutions != null && Substitutions.Count > 0)
                {
                    foreach (var tt in Substitutions)
                        Main.AddSubstitution(this.TechType, tt);
                }
                if (CompoundUnlocks != null && CompoundUnlocks.Count > 0)
                {
                    Reflection.AddCompoundTech(this.TechType, CompoundUnlocks);
                }

                Main.AddCustomOxyExclusion(this.TechType, true, true);
                Main.AddCustomOxyTank(this.TechType, -1f, icon);
            };
        }