DoorBoltComponent.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Content.Shared.Doors.Systems;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.GameStates;
  4. namespace Content.Shared.Doors.Components;
  5. /// <summary>
  6. /// Companion component to DoorComponent that handles bolt-specific behavior.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent]
  9. [Access(typeof(SharedDoorSystem))]
  10. [AutoGenerateComponentState]
  11. public sealed partial class DoorBoltComponent : Component
  12. {
  13. /// <summary>
  14. /// Sound to play when the bolts on the airlock go up.
  15. /// </summary>
  16. [DataField, ViewVariables(VVAccess.ReadWrite)]
  17. public SoundSpecifier BoltUpSound = new SoundPathSpecifier("/Audio/Machines/boltsup.ogg");
  18. /// <summary>
  19. /// Sound to play when the bolts on the airlock go down.
  20. /// </summary>
  21. [DataField, ViewVariables(VVAccess.ReadWrite)]
  22. public SoundSpecifier BoltDownSound = new SoundPathSpecifier("/Audio/Machines/boltsdown.ogg");
  23. /// <summary>
  24. /// Whether the door bolts are currently deployed.
  25. /// </summary>
  26. [DataField, AutoNetworkedField]
  27. public bool BoltsDown;
  28. /// <summary>
  29. /// Whether the bolt lights are currently enabled.
  30. /// </summary>
  31. [DataField, AutoNetworkedField]
  32. public bool BoltLightsEnabled = true;
  33. /// <summary>
  34. /// True if the bolt wire is cut, which will force the airlock to always be bolted as long as it has power.
  35. /// </summary>
  36. [DataField, AutoNetworkedField]
  37. public bool BoltWireCut;
  38. /// <summary>
  39. /// Used for prediction. true if the door has power.
  40. /// </summary>
  41. [DataField, AutoNetworkedField]
  42. public bool Powered;
  43. }