DefusableComponent.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using Content.Server.Defusable.Systems;
  2. using Content.Server.Explosion.Components;
  3. using Robust.Shared.Audio;
  4. namespace Content.Server.Defusable.Components;
  5. /// <summary>
  6. /// This is used for bombs that should be defused. The explosion configuration should be handled by <see cref="ExplosiveComponent"/>.
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(DefusableSystem))]
  9. public sealed partial class DefusableComponent : Component
  10. {
  11. /// <summary>
  12. /// The bomb will play this sound on defusal.
  13. /// </summary>
  14. [ViewVariables(VVAccess.ReadOnly), DataField("defusalSound")]
  15. public SoundSpecifier DefusalSound = new SoundPathSpecifier("/Audio/Misc/notice2.ogg");
  16. /// <summary>
  17. /// The bomb will play this sound on bolt.
  18. /// </summary>
  19. [ViewVariables(VVAccess.ReadOnly), DataField("boltSound")]
  20. public SoundSpecifier BoltSound = new SoundPathSpecifier("/Audio/Machines/boltsdown.ogg");
  21. /// <summary>
  22. /// Is this bomb one use?
  23. /// </summary>
  24. [ViewVariables(VVAccess.ReadWrite), DataField("disposable")]
  25. public bool Disposable = true;
  26. /// <summary>
  27. /// Is the bomb live? This is different from BombUsable because this tracks whether the bomb is ticking down or not.
  28. /// </summary>
  29. [ViewVariables(VVAccess.ReadWrite), DataField("activated")]
  30. public bool Activated;
  31. /// <summary>
  32. /// Is the bomb actually usable? This is different from Activated because this tracks whether the bomb can even start in the first place.
  33. /// </summary>
  34. [ViewVariables(VVAccess.ReadWrite)]
  35. public bool Usable = true;
  36. /// <summary>
  37. /// Does the bomb show how much time remains?
  38. /// </summary>
  39. [ViewVariables(VVAccess.ReadWrite)]
  40. public bool DisplayTime = true;
  41. /// <summary>
  42. /// Is this bomb supposed to be stuck to the ground?
  43. /// </summary>
  44. [ViewVariables(VVAccess.ReadWrite)]
  45. public bool Bolted;
  46. /// <summary>
  47. /// How much time is added when the Activate wire is pulsed?
  48. /// </summary>
  49. [DataField("delayTime")]
  50. public int DelayTime = 30;
  51. #region Wires
  52. // wires, this is so that they're one use
  53. [ViewVariables(VVAccess.ReadWrite), Access(Other=AccessPermissions.ReadWrite)]
  54. public bool DelayWireUsed;
  55. [ViewVariables(VVAccess.ReadWrite), Access(Other=AccessPermissions.ReadWrite)]
  56. public bool ProceedWireCut;
  57. [ViewVariables(VVAccess.ReadWrite), Access(Other=AccessPermissions.ReadWrite)]
  58. public bool ProceedWireUsed;
  59. [ViewVariables(VVAccess.ReadWrite), Access(Other=AccessPermissions.ReadWrite)]
  60. public bool ActivatedWireUsed;
  61. #endregion
  62. }