public void DisableAllConfigurableModules(IEquipmentOwner equipmentOwner, float durability) { foreach (var module in _configurableModules) { module.Disable(equipmentOwner, durability); } }
public void DisableConfigurableModule(ConfigurableModule module, IEquipmentOwner equipmentOwner, float durability) { if (_configurableModules.Exists(x => x == module)) { _configurableModules.Find(x => x == module).Disable(equipmentOwner, durability); } }
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; }
public void DisableAllConfigurableLoads(IEquipmentOwner equipmentOwner, float durability) { foreach (var module in _configurableModules) { if (module.PowerFlowOnEnable < 0f) { module.Disable(equipmentOwner, durability); } } }
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; }
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); } }
public override void Unequip(IEquipmentOwner playerStats, float durability) { playerStats.DrillSharpness -= (Sharpness * durability); }
public virtual void Disable(IEquipmentOwner equipmentOwner, float durability) { _enabled = false; }
public virtual void Enable(IEquipmentOwner equipmentOwner, float durability) { _enabled = true; }
public override void Unequip(IEquipmentOwner playerStats, float durability) { playerStats.EnginePower -= (int)(Power * durability * 1000); playerStats.FuelUsage -= FuelUsage; }
public override void Enable(IEquipmentOwner equipmentOwner, float durability) { base.Enable(equipmentOwner, durability); equipmentOwner.EffectiveCooling += (_effectiveCooling * durability); equipmentOwner.PowerUsage += _powerFlowOnEnable; }
public override void Unequip(IEquipmentOwner equipmentOwner, float durability) { equipmentOwner.MaxFuel -= Volume; equipmentOwner.FuelUsage -= _maxLeaksDueToDamage * (1f - durability); }
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); }
public abstract void Unequip(IEquipmentOwner playerStats, float durability);
public override void Unequip(IEquipmentOwner playerStats, float durability) { playerStats.CargoMaxMass -= MaxMass; playerStats.ChanceForLoseResource -= ChanceForLoseResource(durability); }
public override void Unequip(IEquipmentOwner playerStats, float durability) { playerStats.MaxPower -= MaxPower * durability; }
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); }