mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* wow much fire * drop children (in code) * fix * oops * fix * TemperatureProtection * Update Resources/Prototypes/_White/Body/Parts/resomi.yml Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com> --------- Co-authored-by: vanx <discord@vanxxxx> Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com>
34 lines
847 B
C#
34 lines
847 B
C#
using Content.Shared.Inventory;
|
|
|
|
namespace Content.Shared.Atmos;
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
[ByRefEvent]
|
|
public sealed class GetFireProtectionEvent : EntityEventArgs, IInventoryRelayEvent
|
|
{
|
|
public SlotFlags TargetSlots { get; } = ~SlotFlags.POCKET;
|
|
|
|
/// <summary>
|
|
/// What to multiply the fire damage by.
|
|
/// If this is 0 then it's ignored
|
|
/// </summary>
|
|
public float Multiplier;
|
|
|
|
public GetFireProtectionEvent()
|
|
{
|
|
Multiplier = 1f;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Reduce fire damage taken by a percentage.
|
|
/// </summary>
|
|
public void Reduce(float by)
|
|
{
|
|
Multiplier *= Math.Max(0, 1 - by); // WWDP
|
|
}
|
|
}
|