using Content.Shared.Inventory;
namespace Content.Shared.Atmos;
///
/// Raised on a burning entity to check its fire protection.
/// Damage taken is multiplied by the final amount, but not temperature.
/// TemperatureProtection is needed for that.
///
[ByRefEvent]
public sealed class GetFireProtectionEvent : EntityEventArgs, IInventoryRelayEvent
{
public SlotFlags TargetSlots { get; } = ~SlotFlags.POCKET;
///
/// What to multiply the fire damage by.
/// If this is 0 then it's ignored
///
public float Multiplier;
public GetFireProtectionEvent()
{
Multiplier = 1f;
}
///
/// Reduce fire damage taken by a percentage.
///
public void Reduce(float by)
{
Multiplier -= by;
Multiplier = MathF.Max(Multiplier, 0f);
}
}