CriminalRecordsConsoleComponent.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using Content.Shared.CriminalRecords.Systems;
  2. using Content.Shared.CriminalRecords.Components;
  3. using Content.Shared.CriminalRecords;
  4. using Content.Shared.Radio;
  5. using Content.Shared.StationRecords;
  6. using Robust.Shared.Prototypes;
  7. using Content.Shared.Security;
  8. namespace Content.Shared.CriminalRecords.Components;
  9. /// <summary>
  10. /// A component for Criminal Record Console storing an active station record key and a currently applied filter
  11. /// </summary>
  12. [RegisterComponent]
  13. [Access(typeof(SharedCriminalRecordsConsoleSystem))]
  14. public sealed partial class CriminalRecordsConsoleComponent : Component
  15. {
  16. /// <summary>
  17. /// Currently active station record key.
  18. /// There is no station parameter as the console uses the current station.
  19. /// </summary>
  20. /// <remarks>
  21. /// TODO: in the future this should be clientside instead of something players can fight over.
  22. /// Client selects a record and tells the server the key it wants records for.
  23. /// Server then sends a state with just the records, not the listing or filter, and the client updates just that.
  24. /// I don't know if it's possible to have multiple bui states right now.
  25. /// </remarks>
  26. [DataField]
  27. public uint? ActiveKey;
  28. /// <summary>
  29. /// Currently applied filter.
  30. /// </summary>
  31. [DataField]
  32. public StationRecordsFilter? Filter;
  33. /// <summary>
  34. /// Current seleced security status for the filter by criminal status dropdown.
  35. /// </summary>
  36. [DataField]
  37. public SecurityStatus FilterStatus;
  38. /// <summary>
  39. /// Channel to send messages to when someone's status gets changed.
  40. /// </summary>
  41. [DataField]
  42. public ProtoId<RadioChannelPrototype> SecurityChannel = "Common";
  43. /// <summary>
  44. /// Max length of arrest and crime history strings.
  45. /// </summary>
  46. [DataField]
  47. public uint MaxStringLength = 256;
  48. }