Anomaly fixes (#13558)
Closes https://github.com/space-wizards/space-station-14/issues/13545 Closes https://github.com/space-wizards/space-station-14/issues/13544 Closes https://github.com/space-wizards/space-station-14/issues/13543 Closes https://github.com/space-wizards/space-station-14/issues/13536
This commit is contained in:
@@ -179,7 +179,7 @@ public sealed class AnomalyComponent : Component
|
||||
/// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
|
||||
/// </summary>
|
||||
[DataField("stabilityPerWeakeningeHit")]
|
||||
public float StabilityPerWeakeningeHit = -0.02f;
|
||||
public float StabilityPerWeakeningeHit = -0.1f;
|
||||
|
||||
#region Points and Vessels
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.Anomaly.Components;
|
||||
using Content.Shared.Anomaly.Effects.Components;
|
||||
using Content.Shared.Construction.Components;
|
||||
using Content.Shared.Construction.EntitySystems;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
@@ -12,7 +10,6 @@ public abstract class SharedGravityAnomalySystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _map = default!;
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly SharedAnchorableSystem _anchorable = default!;
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _xform = default!;
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ public abstract class SharedAnomalySystem : EntitySystem
|
||||
if (!Resolve(uid, ref component))
|
||||
return;
|
||||
|
||||
DebugTools.Assert(component.MinPulseLength > TimeSpan.FromSeconds(3)); // this is just to prevent lagspikes mispredicting pulses
|
||||
var variation = Random.NextFloat(-component.PulseVariation, component.PulseVariation) + 1;
|
||||
component.NextPulseTime = Timing.CurTime + GetPulseLength(component) * variation;
|
||||
|
||||
@@ -107,7 +108,8 @@ public abstract class SharedAnomalySystem : EntitySystem
|
||||
}
|
||||
|
||||
Log.Add(LogType.Anomaly, LogImpact.Medium, $"Anomaly {ToPrettyString(uid)} pulsed with severity {component.Severity}.");
|
||||
Audio.PlayPvs(component.PulseSound, uid);
|
||||
if (_net.IsServer)
|
||||
Audio.PlayPvs(component.PulseSound, uid);
|
||||
|
||||
var pulse = EnsureComp<AnomalyPulsingComponent>(uid);
|
||||
pulse.EndTime = Timing.CurTime + pulse.PulseDuration;
|
||||
|
||||
@@ -1135,6 +1135,16 @@ namespace Content.Shared.CCVar
|
||||
public static readonly CVarDef<bool> BiomassEasyMode =
|
||||
CVarDef.Create("biomass.easy_mode", true, CVar.SERVERONLY);
|
||||
|
||||
/*
|
||||
* Anomaly
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// A scale factor applied to a grid's bounds when trying to find a spot to randomly generate an anomaly.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> AnomalyGenerationGridBoundsScale =
|
||||
CVarDef.Create("anomaly.generation_grid_bounds_scale", 0.6f, CVar.SERVERONLY);
|
||||
|
||||
/*
|
||||
* VIEWPORT
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user