using Content.Shared.Anomaly;
using Content.Shared.Materials;
using Content.Shared.Radio;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Anomaly.Components;
///
/// This is used for a machine that is able to generate
/// anomalies randomly on the station.
///
[RegisterComponent, Access(typeof(SharedAnomalySystem)), AutoGenerateComponentPause]
public sealed partial class AnomalyGeneratorComponent : Component
{
///
/// The time at which the cooldown for generating another anomaly will be over
///
[DataField("cooldownEndTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
[AutoPausedField]
public TimeSpan CooldownEndTime = TimeSpan.Zero;
///
/// The cooldown between generating anomalies.
///
[DataField("cooldownLength"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan CooldownLength = TimeSpan.FromMinutes(5);
///
/// How long it takes to generate an anomaly after pushing the button.
///
[DataField("generationLength"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan GenerationLength = TimeSpan.FromSeconds(8);
///
/// The material needed to generate an anomaly
///
[DataField("requiredMaterial", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string RequiredMaterial = "Plasma";
///
/// The amount of material needed to generate a single anomaly
///
[DataField("materialPerAnomaly"), ViewVariables(VVAccess.ReadWrite)]
public int MaterialPerAnomaly = 1500; // a bit less than a stack of plasma
///
/// The random anomaly spawner entity
///
[DataField("spawnerPrototype", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string SpawnerPrototype = "RandomAnomalySpawner";
///
/// The radio channel for science
///
[DataField("scienceChannel", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string ScienceChannel = "Common";
///
/// The sound looped while an anomaly generates
///
[DataField("generatingSound")]
public SoundSpecifier? GeneratingSound;
///
/// Sound played on generation completion.
///
[DataField("generatingFinishedSound")]
public SoundSpecifier? GeneratingFinishedSound;
}