2024-01-17 17:45:18 +01:00
|
|
|
using Content.Server.Xenoarchaeology.XenoArtifacts;
|
2022-11-06 18:05:44 -05:00
|
|
|
using Content.Shared.Construction.Prototypes;
|
|
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Xenoarchaeology.Equipment.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A machine that is combined and linked to the <see cref="AnalysisConsoleComponent"/>
|
2023-06-09 10:44:25 +00:00
|
|
|
/// in order to analyze artifacts and extract points.
|
2022-11-06 18:05:44 -05:00
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ArtifactAnalyzerComponent : Component
|
2022-11-06 18:05:44 -05:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long it takes to analyze an artifact
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("analysisDuration", customTypeSerializer: typeof(TimespanSerializer))]
|
2024-01-17 17:45:18 +01:00
|
|
|
public TimeSpan AnalysisDuration = TimeSpan.FromSeconds(30);
|
2022-11-06 18:05:44 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The corresponding console entity.
|
|
|
|
|
/// Can be null if not linked.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public EntityUid? Console;
|
|
|
|
|
|
2022-11-07 16:57:29 -05:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool ReadyToPrint = false;
|
|
|
|
|
|
2022-11-06 18:05:44 -05:00
|
|
|
[DataField("scanFinishedSound")]
|
2023-08-22 18:14:33 -07:00
|
|
|
public SoundSpecifier ScanFinishedSound = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
|
2022-11-06 18:05:44 -05:00
|
|
|
|
|
|
|
|
#region Analysis Data
|
2023-12-22 02:26:08 -05:00
|
|
|
[DataField]
|
2022-11-06 18:05:44 -05:00
|
|
|
public EntityUid? LastAnalyzedArtifact;
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public ArtifactNode? LastAnalyzedNode;
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2022-11-10 23:18:51 -05:00
|
|
|
public int? LastAnalyzerPointValue;
|
2022-11-06 18:05:44 -05:00
|
|
|
#endregion
|
|
|
|
|
}
|