예제 #1
0
 public void DisableAllConfigurableModules(IEquipmentOwner equipmentOwner, float durability)
 {
     foreach (var module in _configurableModules)
     {
         module.Disable(equipmentOwner, durability);
     }
 }
예제 #2
0
 public void DisableConfigurableModule(ConfigurableModule module, IEquipmentOwner equipmentOwner, float durability)
 {
     if (_configurableModules.Exists(x => x == module))
     {
         _configurableModules.Find(x => x == module).Disable(equipmentOwner, durability);
     }
 }
예제 #3
0
 public override void Unequip(IEquipmentOwner playerStats, float durability)
 {
     playerStats.MaxHull                  -= (int)(MaxHull * durability);
     playerStats.ResistanceToHit          -= (int)(ResistanceToHit * durability);
     playerStats.ThermalInsulation        -= ThermalInsulation;
     playerStats.HullPermaDamageThreshold -= _permaDamageThreshold;
     playerStats.RadiationTolerance       -= _radiationTolerance;
 }
예제 #4
0
 public void DisableAllConfigurableLoads(IEquipmentOwner equipmentOwner, float durability)
 {
     foreach (var module in _configurableModules)
     {
         if (module.PowerFlowOnEnable < 0f)
         {
             module.Disable(equipmentOwner, durability);
         }
     }
 }
예제 #5
0
 public override void Equip(IEquipmentOwner playerStats, float durability)
 {
     playerStats.MaxHull += (int)(MaxHull * durability);
     if (durability == 1f)   //brand new
     {
         playerStats.Hull = playerStats.MaxHull;
     }
     playerStats.ResistanceToHit          += (int)(ResistanceToHit * durability);
     playerStats.ThermalInsulation        += ThermalInsulation;
     playerStats.HullPermaDamageThreshold += _permaDamageThreshold;
     playerStats.RadiationTolerance       += _radiationTolerance;
 }
예제 #6
0
 public override void Equip(IEquipmentOwner equipmentOwner, float durability)
 {
     equipmentOwner.MaxPower += (int)(MaxPower * durability);
     if (durability == 1f)   //brand new
     {
         equipmentOwner.Power = equipmentOwner.MaxPower;
     }
     else
     {
         equipmentOwner.Power = Mathf.Clamp(equipmentOwner.Power, 0, equipmentOwner.MaxPower);
     }
 }
예제 #7
0
 public override void Unequip(IEquipmentOwner playerStats, float durability)
 {
     playerStats.DrillSharpness -= (Sharpness * durability);
 }
예제 #8
0
 public virtual void Disable(IEquipmentOwner equipmentOwner, float durability)
 {
     _enabled = false;
 }
예제 #9
0
 public virtual void Enable(IEquipmentOwner equipmentOwner, float durability)
 {
     _enabled = true;
 }
예제 #10
0
 public override void Unequip(IEquipmentOwner playerStats, float durability)
 {
     playerStats.EnginePower -= (int)(Power * durability * 1000);
     playerStats.FuelUsage   -= FuelUsage;
 }
예제 #11
0
 public override void Enable(IEquipmentOwner equipmentOwner, float durability)
 {
     base.Enable(equipmentOwner, durability);
     equipmentOwner.EffectiveCooling += (_effectiveCooling * durability);
     equipmentOwner.PowerUsage       += _powerFlowOnEnable;
 }
예제 #12
0
 public override void Unequip(IEquipmentOwner equipmentOwner, float durability)
 {
     equipmentOwner.MaxFuel   -= Volume;
     equipmentOwner.FuelUsage -= _maxLeaksDueToDamage * (1f - durability);
 }
예제 #13
0
 public override void Equip(IEquipmentOwner equipmentOwner, float durability)
 {
     equipmentOwner.MaxFuel   += Volume;
     equipmentOwner.Fuel       = Mathf.Clamp(equipmentOwner.Fuel, 0, equipmentOwner.MaxFuel);
     equipmentOwner.FuelUsage += _maxLeaksDueToDamage * (1f - durability);
 }
예제 #14
0
 public abstract void Unequip(IEquipmentOwner playerStats, float durability);
예제 #15
0
 public override void Unequip(IEquipmentOwner playerStats, float durability)
 {
     playerStats.CargoMaxMass          -= MaxMass;
     playerStats.ChanceForLoseResource -= ChanceForLoseResource(durability);
 }
예제 #16
0
 public override void Unequip(IEquipmentOwner playerStats, float durability)
 {
     playerStats.MaxPower -= MaxPower * durability;
 }
예제 #17
0
 public override void Unequip(IEquipmentOwner playerStats, float durability)
 {
 }
 public override void Enable(IEquipmentOwner equipmentOwner, float durability)
 {
     base.Enable(equipmentOwner, durability);
     equipmentOwner.FuelUsage  += _fuelUsage;
     equipmentOwner.PowerUsage -= (_powerFlowOnEnable * durability);
 }