Anomaly Generator Tweaks (#13856)

This commit is contained in:
Nemanja
2023-02-06 14:53:59 -05:00
committed by GitHub
parent 0685611e18
commit 1b8c48180b
13 changed files with 162 additions and 9 deletions

View File

@@ -1,4 +1,6 @@
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;
@@ -24,6 +26,12 @@ public sealed class AnomalyGeneratorComponent : Component
[DataField("cooldownLength"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan CooldownLength = TimeSpan.FromMinutes(5);
/// <summary>
/// How long it takes to generate an anomaly after pushing the button.
/// </summary>
[DataField("generationLength"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan GenerationLength = TimeSpan.FromSeconds(8);
/// <summary>
/// The material needed to generate an anomaly
/// </summary>
@@ -41,4 +49,22 @@ public sealed class AnomalyGeneratorComponent : Component
/// </summary>
[DataField("spawnerPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
public string SpawnerPrototype = "RandomAnomalySpawner";
/// <summary>
/// The radio channel for science
/// </summary>
[DataField("scienceChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
public string ScienceChannel = "Science";
/// <summary>
/// The sound looped while an anomaly generates
/// </summary>
[DataField("generatingSound")]
public SoundSpecifier? GeneratingSound;
/// <summary>
/// Sound played on generation completion.
/// </summary>
[DataField("generatingFinishedSound")]
public SoundSpecifier? GeneratingFinishedSound;
}