예제 #1
0
 public static void AddValues(this ModBinding pThis, Mod p)
 {
     pThis.AugmentBonusDamage.Value += p.AugmentBonus;
     pThis.Cold.Value         += p.Cold;
     pThis.CritChance.Value   += p.CritChance;
     pThis.CritDamage.Value   += p.CritDamage;
     pThis.Damage.Value       += p.Damage;
     pThis.Electric.Value     += p.Electric;
     pThis.FireRate.Value     += p.FireRate;
     pThis.Heat.Value         += p.Heat;
     pThis.Impact.Value       += p.Impact;
     pThis.MagazineSize.Value += p.MagazineSize;
     pThis.Multishot.Value    += p.Multishot;
     pThis.Puncture.Value     += p.Puncture;
     pThis.Reload.Value       += p.Reload;
     pThis.Slash.Value        += p.Slash;
     pThis.Toxin.Value        += p.Toxin;
 }
예제 #2
0
 public static Mod ToMod(this ModBinding pThis, string pName)
 {
     return(new Mod(pName,
                    WeaponClass.All,
                    pThis.CritChance.Value,
                    pThis.CritDamage.Value,
                    pThis.MagazineSize.Value,
                    pThis.Multishot.Value,
                    pThis.Damage.Value,
                    pThis.Impact.Value,
                    pThis.Puncture.Value,
                    pThis.Slash.Value,
                    pThis.FireRate.Value,
                    pThis.Reload.Value,
                    pThis.Cold.Value,
                    pThis.Heat.Value,
                    pThis.Electric.Value,
                    pThis.Toxin.Value,
                    pThis.AugmentBonusDamage == null ? null : pThis.AugmentBonusDamage.Value));
 }
예제 #3
0
 public static void Clear(this ModBinding pThis)
 {
     pThis.CritChance.Clear();
     pThis.CritDamage.Clear();
     pThis.Multishot.Clear();
     pThis.Damage.Clear();
     pThis.Impact.Clear();
     pThis.Puncture.Clear();
     pThis.Slash.Clear();
     pThis.FireRate.Clear();
     pThis.Reload.Clear();
     pThis.MagazineSize.Clear();
     pThis.Cold.Clear();
     pThis.Heat.Clear();
     pThis.Electric.Clear();
     pThis.Toxin.Clear();
     if (pThis.AugmentBonusDamage != null)
     {
         pThis.AugmentBonusDamage.Clear();
     }
 }
예제 #4
0
 public static bool HasValue(this ModBinding pThis)
 {
     if (pThis.CritChance.Value.HasValue())
     {
         return(true);
     }
     if (pThis.CritDamage.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Multishot.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Damage.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Impact.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Puncture.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Slash.Value.HasValue())
     {
         return(true);
     }
     if (pThis.FireRate.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Reload.Value.HasValue())
     {
         return(true);
     }
     if (pThis.MagazineSize.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Cold.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Heat.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Electric.Value.HasValue())
     {
         return(true);
     }
     if (pThis.Toxin.Value.HasValue())
     {
         return(true);
     }
     if (pThis.AugmentBonusDamage != null && pThis.AugmentBonusDamage.Value.HasValue())
     {
         return(true);
     }
     return(false);
 }