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; 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(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan CooldownEndTime = TimeSpan.Zero; /// /// The cooldown between generating anomalies. /// [DataField] public TimeSpan CooldownLength = TimeSpan.FromMinutes(5); /// /// How long it takes to generate an anomaly after pushing the button. /// [DataField] public TimeSpan GenerationLength = TimeSpan.FromSeconds(8); /// /// The material needed to generate an anomaly /// [DataField] public ProtoId RequiredMaterial = "Plasma"; /// /// The amount of material needed to generate a single anomaly /// [DataField] public int MaterialPerAnomaly = 1500; // half a stack of plasma /// /// The random anomaly spawner entity /// [DataField] public EntProtoId SpawnerPrototype = "RandomAnomalySpawner"; /// /// The radio channel for science /// [DataField] public ProtoId ScienceChannel = "Science"; /// /// The sound looped while an anomaly generates /// [DataField] public SoundSpecifier? GeneratingSound; /// /// Sound played on generation completion. /// [DataField] public SoundSpecifier? GeneratingFinishedSound; }