2023-06-01 02:23:35 +12:00
|
|
|
using Content.Shared.Doors.Systems;
|
|
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Doors.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Companion component to DoorComponent that handles bolt-specific behavior.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent, NetworkedComponent]
|
2024-02-22 18:01:31 -05:00
|
|
|
[Access(typeof(SharedDoorSystem))]
|
|
|
|
|
[AutoGenerateComponentState]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class DoorBoltComponent : Component
|
2023-06-01 02:23:35 +12:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound to play when the bolts on the airlock go up.
|
|
|
|
|
/// </summary>
|
2024-02-22 18:01:31 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-06-01 02:23:35 +12:00
|
|
|
public SoundSpecifier BoltUpSound = new SoundPathSpecifier("/Audio/Machines/boltsup.ogg");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound to play when the bolts on the airlock go down.
|
|
|
|
|
/// </summary>
|
2024-02-22 18:01:31 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-06-01 02:23:35 +12:00
|
|
|
public SoundSpecifier BoltDownSound = new SoundPathSpecifier("/Audio/Machines/boltsdown.ogg");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the door bolts are currently deployed.
|
|
|
|
|
/// </summary>
|
2024-02-22 18:01:31 -05:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-06-01 02:23:35 +12:00
|
|
|
public bool BoltsDown;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the bolt lights are currently enabled.
|
|
|
|
|
/// </summary>
|
2024-02-22 18:01:31 -05:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-06-01 02:23:35 +12:00
|
|
|
public bool BoltLightsEnabled = true;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// True if the bolt wire is cut, which will force the airlock to always be bolted as long as it has power.
|
|
|
|
|
/// </summary>
|
2024-02-22 18:01:31 -05:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-06-01 02:23:35 +12:00
|
|
|
public bool BoltWireCut;
|
2024-02-22 18:01:31 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Used for prediction. true if the door has power.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public bool Powered;
|
2023-06-01 02:23:35 +12:00
|
|
|
}
|