ForensicScannerComponent.cs 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. using System.Threading;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Prototypes;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  5. namespace Content.Server.Forensics
  6. {
  7. [RegisterComponent]
  8. public sealed partial class ForensicScannerComponent : Component
  9. {
  10. public CancellationTokenSource? CancelToken;
  11. /// <summary>
  12. /// A list of fingerprint GUIDs that the forensic scanner found from the <see cref="ForensicsComponent"/> on an entity.
  13. /// </summary>
  14. [ViewVariables(VVAccess.ReadOnly), DataField("fingerprints")]
  15. public List<string> Fingerprints = new();
  16. /// <summary>
  17. /// A list of glove fibers that the forensic scanner found from the <see cref="ForensicsComponent"/> on an entity.
  18. /// </summary>
  19. [ViewVariables(VVAccess.ReadOnly), DataField("fibers")]
  20. public List<string> Fibers = new();
  21. /// <summary>
  22. /// DNA that the forensic scanner found from the <see cref="DNAComponent"/> on an entity.
  23. /// </summary>
  24. [ViewVariables(VVAccess.ReadOnly), DataField("dnas")]
  25. public List<string> TouchDNAs = new();
  26. /// <summary>
  27. /// DNA that the forensic scanner found from the solution containers in an entity.
  28. /// </summary>
  29. [ViewVariables(VVAccess.ReadOnly), DataField]
  30. public List<string> SolutionDNAs = new();
  31. /// <summary>
  32. /// Residue that the forensic scanner found from the <see cref="ForensicsComponent"/> on an entity.
  33. /// </summary>
  34. [ViewVariables(VVAccess.ReadOnly), DataField("residues")]
  35. public List<string> Residues = new();
  36. /// <summary>
  37. /// What is the name of the entity that was scanned last?
  38. /// </summary>
  39. /// <remarks>
  40. /// This will be used for the title of the printout and displayed to players.
  41. /// </remarks>
  42. [ViewVariables(VVAccess.ReadOnly)]
  43. public string LastScannedName = string.Empty;
  44. /// <summary>
  45. /// When will the scanner be ready to print again?
  46. /// </summary>
  47. [ViewVariables(VVAccess.ReadOnly)]
  48. public TimeSpan PrintReadyAt = TimeSpan.Zero;
  49. /// <summary>
  50. /// The time (in seconds) that it takes to scan an entity.
  51. /// </summary>
  52. [DataField("scanDelay")]
  53. public float ScanDelay = 3.0f;
  54. /// <summary>
  55. /// How often can the scanner print out reports?
  56. /// </summary>
  57. [DataField("printCooldown")]
  58. public TimeSpan PrintCooldown = TimeSpan.FromSeconds(5);
  59. /// <summary>
  60. /// The sound that's played when there's a match between a scan and an
  61. /// inserted forensic pad.
  62. /// </summary>
  63. [DataField("soundMatch")]
  64. public SoundSpecifier SoundMatch = new SoundPathSpecifier("/Audio/Machines/Nuke/angry_beep.ogg");
  65. /// <summary>
  66. /// The sound that's played when there's no match between a scan and an
  67. /// inserted forensic pad.
  68. /// </summary>
  69. [DataField("soundNoMatch")]
  70. public SoundSpecifier SoundNoMatch = new SoundPathSpecifier("/Audio/Machines/airlock_deny.ogg");
  71. /// <summary>
  72. /// The sound that's played when the scanner prints off a report.
  73. /// </summary>
  74. [DataField("soundPrint")]
  75. public SoundSpecifier SoundPrint = new SoundPathSpecifier("/Audio/Machines/short_print_and_rip.ogg");
  76. /// <summary>
  77. /// What the machine will print
  78. /// </summary>
  79. [DataField("machineOutput", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
  80. public string MachineOutput = "ForensicReportPaper";
  81. }
  82. }