1
0

LogProbeCartridgeComponent.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Content.Shared.CartridgeLoader.Cartridges;
  2. using Content.Shared.Paper;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Prototypes;
  5. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  6. namespace Content.Server.CartridgeLoader.Cartridges;
  7. [RegisterComponent, Access(typeof(LogProbeCartridgeSystem))]
  8. [AutoGenerateComponentPause]
  9. public sealed partial class LogProbeCartridgeComponent : Component
  10. {
  11. /// <summary>
  12. /// The name of the scanned entity, sent to clients when they open the UI.
  13. /// </summary>
  14. [DataField]
  15. public string EntityName = string.Empty;
  16. /// <summary>
  17. /// The list of pulled access logs
  18. /// </summary>
  19. [DataField, ViewVariables]
  20. public List<PulledAccessLog> PulledAccessLogs = new();
  21. /// <summary>
  22. /// The sound to make when we scan something with access
  23. /// </summary>
  24. [DataField, ViewVariables(VVAccess.ReadWrite)]
  25. public SoundSpecifier SoundScan = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
  26. /// <summary>
  27. /// Paper to spawn when printing logs.
  28. /// </summary>
  29. [DataField]
  30. public EntProtoId<PaperComponent> PaperPrototype = "PaperAccessLogs";
  31. [DataField]
  32. public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/diagnoser_printing.ogg");
  33. /// <summary>
  34. /// How long you have to wait before printing logs again.
  35. /// </summary>
  36. [DataField]
  37. public TimeSpan PrintCooldown = TimeSpan.FromSeconds(5);
  38. /// <summary>
  39. /// When anyone is allowed to spawn another printout.
  40. /// </summary>
  41. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
  42. public TimeSpan NextPrintAllowed = TimeSpan.Zero;
  43. }