Add events for TemperatureProtection and PressureProtection (#25165)

This commit is contained in:
Nemanja
2024-02-14 02:44:47 -05:00
committed by GitHub
parent a2ac6e4177
commit 8ed32a1e42
4 changed files with 92 additions and 26 deletions

View File

@@ -1,11 +1,20 @@
namespace Content.Server.Atmos.Components;
using Content.Server.Temperature.Systems;
namespace Content.Server.Atmos.Components;
[RegisterComponent]
[Access(typeof(TemperatureSystem))]
public sealed partial class TemperatureProtectionComponent : Component
{
/// <summary>
/// How much to multiply temperature deltas by.
/// </summary>
[DataField("coefficient")]
[DataField]
public float Coefficient = 1.0f;
}
/// <summary>
/// Event raised on an entity with <see cref="TemperatureProtectionComponent"/> to determine the actual value of the coefficient.
/// </summary>
[ByRefEvent]
public record struct GetTemperatureProtectionEvent(float Coefficient);