Delta-v/Content.Server/Xenoarchaeology/Equipment/Components/ArtifactAnalyzerComponent.cs

53 lines
1.7 KiB
C#

using Content.Server.Xenoarchaeology.XenoArtifacts;
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"/>
/// in order to analyze artifacts and extract points.
/// </summary>
[RegisterComponent]
public sealed partial class ArtifactAnalyzerComponent : Component
{
/// <summary>
/// How long it takes to analyze an artifact
/// </summary>
[DataField("analysisDuration", customTypeSerializer: typeof(TimespanSerializer))]
public TimeSpan AnalysisDuration = TimeSpan.FromSeconds(30);
// Nyano - Summary - Begin modified code block: tie artifacts to glimmer.
/// <summary>
/// The ratio of research points per one glimmer.
/// </summary>
public int ExtractRatio = 750;
// Nyano - End modified code block.
/// <summary>
/// The corresponding console entity.
/// Can be null if not linked.
/// </summary>
[ViewVariables]
public EntityUid? Console;
[ViewVariables(VVAccess.ReadWrite)]
public bool ReadyToPrint = false;
[DataField("scanFinishedSound")]
public SoundSpecifier ScanFinishedSound = new SoundPathSpecifier("/Audio/Machines/scan_finish.ogg");
#region Analysis Data
[DataField]
public EntityUid? LastAnalyzedArtifact;
[ViewVariables]
public ArtifactNode? LastAnalyzedNode;
[ViewVariables(VVAccess.ReadWrite)]
public int? LastAnalyzerPointValue;
#endregion
}