Make anomalies harder (#16760)
This commit is contained in:
@@ -145,9 +145,7 @@ public sealed partial class AnomalySystem
|
||||
|
||||
Appearance.SetData(uid, AnomalyVesselVisuals.HasAnomaly, on, appearanceComponent);
|
||||
if (TryComp<SharedPointLightComponent>(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.
|
||||
|
||||
@@ -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!;
|
||||
|
||||
|
||||
@@ -103,14 +103,16 @@ public sealed class AnomalyComponent : Component
|
||||
/// A percentage by which the length of a pulse might vary.
|
||||
/// </summary>
|
||||
[DataField("pulseVariation")]
|
||||
public float PulseVariation = .1f;
|
||||
public float PulseVariation = 0.1f;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is more likely to trend upwards than donwards, because that's funny
|
||||
/// </remarks>
|
||||
[DataField("pulseStabilityVariation")]
|
||||
public float PulseStabilityVariation = 0.05f;
|
||||
public Vector2 PulseStabilityVariation = (-0.125f, 0.20f);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[DataField("maxPointsPerSecond")]
|
||||
public int MaxPointsPerSecond = 100;
|
||||
public int MaxPointsPerSecond = 75;
|
||||
|
||||
/// <summary>
|
||||
/// The multiplier applied to the point value for the
|
||||
|
||||
@@ -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}.");
|
||||
|
||||
Reference in New Issue
Block a user