2022-01-30 13:49:56 +13:00
|
|
|
using Content.Shared.Doors.Components;
|
2020-08-19 12:23:42 +02:00
|
|
|
|
2023-05-06 17:54:36 +12:00
|
|
|
namespace Content.Shared.Doors.Components
|
2020-08-19 12:23:42 +02:00
|
|
|
{
|
2021-02-12 07:02:14 -08:00
|
|
|
/// <summary>
|
2022-09-06 17:55:33 +12:00
|
|
|
/// Companion component to <see cref="DoorComponent"/> that handles firelock-specific behavior, including
|
|
|
|
|
/// auto-closing on depressurization, air/fire alarm interactions, and preventing normal door functions when
|
|
|
|
|
/// retaining pressure..
|
2021-02-12 07:02:14 -08:00
|
|
|
/// </summary>
|
2020-08-19 12:23:42 +02:00
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class FirelockComponent : Component
|
2020-08-19 12:23:42 +02:00
|
|
|
{
|
2021-08-02 04:57:06 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// Pry time modifier to be used when the firelock is currently closed due to fire or pressure.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2022-09-06 17:55:33 +12:00
|
|
|
[DataField("lockedPryTimeModifier"), ViewVariables(VVAccess.ReadWrite)]
|
2021-08-02 04:57:06 -07:00
|
|
|
public float LockedPryTimeModifier = 1.5f;
|
2020-08-19 12:23:42 +02:00
|
|
|
|
2022-08-22 16:33:13 -07:00
|
|
|
[DataField("autocloseDelay")] public TimeSpan AutocloseDelay = TimeSpan.FromSeconds(3f);
|
|
|
|
|
|
2022-09-06 17:55:33 +12:00
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum pressure difference before the firelock will refuse to open, in kPa.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("pressureThreshold"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float PressureThreshold = 20;
|
2020-11-20 16:58:06 +02:00
|
|
|
|
2022-11-09 08:55:45 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum temperature difference before the firelock will refuse to open, in k.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("temperatureThreshold"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float TemperatureThreshold = 330;
|
|
|
|
|
// this used to check for hot-spots, but because accessing that data is a a mess this now just checks
|
|
|
|
|
// temperature. This does mean a cold room will trigger hot-air pop-ups
|
|
|
|
|
|
2022-09-06 17:55:33 +12:00
|
|
|
/// <summary>
|
|
|
|
|
/// If true, and if this door has an <see cref="AtmosAlarmableComponent"/>, then it will only auto-close if the
|
|
|
|
|
/// alarm is set to danger.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("alarmAutoClose"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool AlarmAutoClose = true;
|
2020-08-19 12:23:42 +02:00
|
|
|
}
|
|
|
|
|
}
|