using Content.Shared.Anomaly.Effects.Components; using Content.Shared.Atmos; using Content.Shared.Damage; using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Content.Shared.Explosion; using Robust.Shared.Prototypes; namespace Content.Shared.Actions.Events; public sealed partial class AnomalyPowerActionEvent : InstantActionEvent { /// /// Contains settings common to all "Anomalist" Powers. /// [DataField] public AnomalyPowerSettings Settings; /// /// Contains settings specific to "Bluespace Anomaly" powers. /// [DataField] public BluespaceAnomalySettings? Bluespace; /// /// Contains settings specific to "Electrical Anomaly" powers. /// [DataField] public ElectricalAnomalySettings? Electricity; /// /// What entities will be spawned by this action, using the same arguments as an EntitySpawnAnomalyComponent. /// [DataField] public List? EntitySpawnEntries; /// /// Contains settings specific to "Explosion Anomaly" powers. /// [DataField] public ExplosionAnomalySettings? Explosion; /// /// Contains settings specific to "Gas Producer Anomaly" powers. /// [DataField] public GasProducerAnomalySettings? Gas; /// /// Contains settings specific to "Gravity Anomaly" powers. /// [DataField] public GravityAnomalySettings? Gravity; /// /// Contains settings specific to "Injection Anomaly" powers. /// [DataField] public InjectionAnomalySettings? Injection; /// /// Contains settings specific to "Puddle Create Anomaly" powers. /// [DataField] public PuddleAnomalySettings? Puddle; /// /// Contains settings specific to "Pyroclastic Anomaly" powers. /// [DataField] public PyroclasticAnomalySettings? Pyroclastic; } [DataRecord] public partial record struct AnomalyPowerSettings() { public string PowerName = string.Empty; public bool CheckInsulation; /// /// When casting above the Supercritical Threshold, if not 0, this will cause all powers to enter cooldown for the given duration. /// public float OverchargeCooldown; /// /// When casting above the Supercritical Threshold, if not 0, this will deal recoil damage to the caster of the specified amounts. /// public DamageSpecifier? OverchargeRecoil; /// /// When casting above the Supercritical Threshold, play a popup above the caster's head. /// public string? OverchargeFeedback; /// /// The minimum amount of glimmer generated by this power. /// public int MinGlimmer; /// /// The maximum amount of glimmer generated by this power. /// public int MaxGlimmer; /// /// The amount to multiply glimmer generation by when above the Supercritical Threshold /// public int SupercriticalGlimmerMultiplier = 1; /// /// The threshold of glimmer at which this power will play a sound. /// public float GlimmerSoundThreshold; /// /// The glimmer threshold(divided by amplification and multiplied by dampening) at which this power will act as a Supercritical Anomaly. /// public float SupercriticalThreshold = 500f; /// /// The maximum amount Dampening can increase the Supercritical threshold to. /// public float MaxSupercriticalThreshold = 800f; /// /// The sound to be played upon activating this power(and not Supercritically) /// public SoundSpecifier? PulseSound = new SoundCollectionSpecifier("RadiationPulse"); /// /// The sound plays when this power is activated above a Supercritical glimmer threshold /// public SoundSpecifier? SupercriticalSound = new SoundCollectionSpecifier("Explosion"); public bool DoSupercritical = true; } [DataRecord] public partial record struct BluespaceAnomalySettings() { /// /// The maximum radius that the shuffle effect will extend for /// scales with stability /// public float MaxShuffleRadius = 10; /// /// Whether or not a standard pulse teleports the caster. /// public bool PulseTeleportsCaster; /// /// Whether or not a supercrit teleports the caster. /// public bool SupercritTeleportsCaster; /// /// How far the supercritical event can teleport you /// public float SupercriticalTeleportRadius = 50f; /// /// The sound played after players are shuffled/teleported around /// public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Effects/teleport_arrival.ogg"); } [DataRecord] public partial record struct ElectricalAnomalySettings() { /// /// the minimum number of lightning strikes /// public int MinBoltCount = 2; /// /// The number of lightning strikes, at the maximum severity of the anomaly /// public int MaxBoltCount = 5; /// /// The maximum radius of the passive electrocution effect /// scales with stability /// public float MaxElectrocuteRange = 7f; /// /// Energy consumed from devices by the emp pulse upon going supercritical. /// public float EmpEnergyConsumption = 100000f; /// /// Duration of devices being disabled by the emp pulse upon going supercritical. /// public float EmpDisabledDuration = 60f; } [DataRecord] public partial record struct ExplosionAnomalySettings() { /// /// The explosion prototype to spawn /// [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string? ExplosionPrototype = default!; /// /// The total amount of intensity an explosion can achieve /// public float TotalIntensity = 100f; /// /// How quickly does the explosion's power slope? Higher = smaller area and more concentrated damage, lower = larger area and more spread out damage /// public float Dropoff = 10f; /// /// How much intensity can be applied per tile? /// public float MaxTileIntensity = 10f; /// /// The explosion prototype to spawn on Supercrit /// [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string? SupercritExplosionPrototype = default!; /// /// The total amount of intensity an explosion can achieve /// public float SupercritTotalIntensity = 100f; /// /// How quickly does the explosion's power slope? Higher = smaller area and more concentrated damage, lower = larger area and more spread out damage /// public float SupercritDropoff = 10f; /// /// How much intensity can be applied per tile? /// public float SupercritMaxTileIntensity = 10f; } [DataRecord] public partial record struct GasProducerAnomalySettings() { /// /// The gas to release /// public Gas ReleasedGas = Gas.WaterVapor; /// /// The gas to release /// public Gas SupercritReleasedGas = Gas.WaterVapor; /// /// The amount of gas released passively /// public float MoleAmount = 1f; /// /// The radius of random gas spawns. /// public float SpawnRadius = 3; /// /// The number of tiles which will be modified. /// public int TileCount = 1; /// /// The the amount the temperature should be modified by (negative for decreasing temp) /// public float TempChange = 0; /// /// The amount of gas released when the anomaly reaches max severity /// public float SupercritMoleAmount = 150f; /// /// The radius of random gas spawns. /// public float SupercritSpawnRadius = 10; /// /// The number of tiles which will be modified. /// public int SupercritTileCount = 10; /// /// The the amount the temperature should be modified by (negative for decreasing temp) /// public float SupercritTempChange = 0; } [DataRecord] public partial record struct GravityAnomalySettings() { /// /// The maximum distance from which the anomaly /// can throw you via a pulse. /// public float MaxThrowRange = 5f; /// /// The maximum strength the anomaly /// can throw you via a pulse /// public float MaxThrowStrength = 10; /// /// The range around the anomaly that will be spaced on supercritical. /// public float SpaceRange = 3f; } [DataRecord] public partial record struct InjectionAnomalySettings() { /// /// the maximum amount of injection of a substance into an entity per pulsation /// scales with Severity /// public float MaxSolutionInjection = 15; /// /// The maximum amount of injection of a substance into an entity in the supercritical phase /// public float SuperCriticalSolutionInjection = 50; /// /// The maximum radius in which the anomaly injects reagents into the surrounding containers. /// public float InjectRadius = 3; /// /// The maximum radius in which the anomaly injects reagents into the surrounding containers. /// public float SuperCriticalInjectRadius = 15; /// /// The name of the prototype of the special effect that appears above the entities into which the injection was carried out /// public EntProtoId VisualEffectPrototype = "PuddleSparkle"; /// /// Solution name that can be drained. /// public string Solution { get; set; } = "default"; } [DataRecord] public partial record struct PuddleAnomalySettings() { /// /// The maximum amount of solution that an anomaly can splash out of the storage on the floor during pulsation. /// Scales with Amplification. /// public float MaxPuddleSize = 100; /// /// Solution name that can be drained. /// public string Solution { get; set; } = "default"; } [DataRecord] public partial record struct PyroclasticAnomalySettings() { /// /// The maximum distance from which entities will be ignited. /// public float MaximumIgnitionRadius = 5f; /// /// The maximum distance from which entities will be ignited on a Supercrit cast. /// public float SupercritMaximumIgnitionRadius = 20f; }