ArtifactAnalyzerComponent.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Content.Server.Xenoarchaeology.XenoArtifacts;
  2. using Content.Shared.Construction.Prototypes;
  3. using Robust.Shared.Audio;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations;
  5. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  6. namespace Content.Server.Xenoarchaeology.Equipment.Components;
  7. /// <summary>
  8. /// A machine that is combined and linked to the <see cref="AnalysisConsoleComponent"/>
  9. /// in order to analyze artifacts and extract points.
  10. /// </summary>
  11. [RegisterComponent]
  12. public sealed partial class ArtifactAnalyzerComponent : Component
  13. {
  14. /// <summary>
  15. /// How long it takes to analyze an artifact
  16. /// </summary>
  17. [DataField("analysisDuration", customTypeSerializer: typeof(TimespanSerializer))]
  18. public TimeSpan AnalysisDuration = TimeSpan.FromSeconds(30);
  19. /// <summary>
  20. /// The corresponding console entity.
  21. /// Can be null if not linked.
  22. /// </summary>
  23. [ViewVariables]
  24. public EntityUid? Console;
  25. [ViewVariables(VVAccess.ReadWrite)]
  26. public bool ReadyToPrint = false;
  27. [DataField("scanFinishedSound")]
  28. public SoundSpecifier ScanFinishedSound = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
  29. #region Analysis Data
  30. [DataField]
  31. public EntityUid? LastAnalyzedArtifact;
  32. [ViewVariables]
  33. public ArtifactNode? LastAnalyzedNode;
  34. [ViewVariables(VVAccess.ReadWrite)]
  35. public int? LastAnalyzerPointValue;
  36. #endregion
  37. }