diff --git a/Content.Server/Anomaly/AnomalySystem.Vessel.cs b/Content.Server/Anomaly/AnomalySystem.Vessel.cs index a87555a737..01fbccad21 100644 --- a/Content.Server/Anomaly/AnomalySystem.Vessel.cs +++ b/Content.Server/Anomaly/AnomalySystem.Vessel.cs @@ -145,9 +145,7 @@ public sealed partial class AnomalySystem Appearance.SetData(uid, AnomalyVesselVisuals.HasAnomaly, on, appearanceComponent); if (TryComp(uid, out var pointLightComponent)) - { - pointLightComponent.Enabled = on; - } + _pointLight.SetEnabled(uid, on, pointLightComponent); // arbitrary value for the generic visualizer to use. // i didn't feel like making an enum for this. diff --git a/Content.Server/Anomaly/AnomalySystem.cs b/Content.Server/Anomaly/AnomalySystem.cs index 224a2ddab7..5f50d43907 100644 --- a/Content.Server/Anomaly/AnomalySystem.cs +++ b/Content.Server/Anomaly/AnomalySystem.cs @@ -27,6 +27,7 @@ public sealed partial class AnomalySystem : SharedAnomalySystem [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly ExplosionSystem _explosion = default!; [Dependency] private readonly MaterialStorageSystem _material = default!; + [Dependency] private readonly SharedPointLightSystem _pointLight = default!; [Dependency] private readonly RadioSystem _radio = default!; [Dependency] private readonly UserInterfaceSystem _ui = default!; diff --git a/Content.Shared/Anomaly/Components/AnomalyComponent.cs b/Content.Shared/Anomaly/Components/AnomalyComponent.cs index b5ac8e7714..ca3127e8ba 100644 --- a/Content.Shared/Anomaly/Components/AnomalyComponent.cs +++ b/Content.Shared/Anomaly/Components/AnomalyComponent.cs @@ -103,14 +103,16 @@ public sealed class AnomalyComponent : Component /// A percentage by which the length of a pulse might vary. /// [DataField("pulseVariation")] - public float PulseVariation = .1f; + public float PulseVariation = 0.1f; /// - /// The largest value by which the anomaly will vary in stability for each pulse. - /// In simple terms, every pulse, stability changes from a range of -this_value to this_value + /// The range that an anomaly's stability can vary each pulse. Scales with severity. /// + /// + /// This is more likely to trend upwards than donwards, because that's funny + /// [DataField("pulseStabilityVariation")] - public float PulseStabilityVariation = 0.05f; + public Vector2 PulseStabilityVariation = (-0.125f, 0.20f); /// /// The sound played when an anomaly pulses @@ -180,7 +182,7 @@ public sealed class AnomalyComponent : Component /// This doesn't include the point bonus for being unstable. /// [DataField("maxPointsPerSecond")] - public int MaxPointsPerSecond = 100; + public int MaxPointsPerSecond = 75; /// /// The multiplier applied to the point value for the diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index 60ec92dd92..12a97fda42 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -139,7 +139,9 @@ public abstract class SharedAnomalySystem : EntitySystem ChangeAnomalySeverity(uid, GetSeverityIncreaseFromGrowth(component), component); } - var stability = Random.NextFloat(-component.PulseStabilityVariation, component.PulseStabilityVariation); + var minStability = component.PulseStabilityVariation.X * component.Severity; + var maxStability = component.PulseStabilityVariation.Y * component.Severity; + var stability = Random.NextFloat(minStability, maxStability); ChangeAnomalyStability(uid, stability, component); Log.Add(LogType.Anomaly, LogImpact.Medium, $"Anomaly {ToPrettyString(uid)} pulsed with severity {component.Severity}.");