]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
HOTFIX: Fix tech anomaly nexttimer (#32805) (#32807)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Mon, 14 Oct 2024 09:41:31 +0000 (11:41 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2024 09:41:31 +0000 (11:41 +0200)
Fix tech anomaly nexttimer (#32805)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Content.Server/Anomaly/Effects/TechAnomalySystem.cs

index 3e4d101f4fdf8fce09ead10538c520d0aa58be53..9f81c64dbc10e26dff3dc3a6988dc3e6fd11ae1a 100644 (file)
@@ -22,11 +22,17 @@ public sealed class TechAnomalySystem : EntitySystem
     {
         base.Initialize();
 
+        SubscribeLocalEvent<TechAnomalyComponent, MapInitEvent>(OnTechMapInit);
         SubscribeLocalEvent<TechAnomalyComponent, AnomalyPulseEvent>(OnPulse);
         SubscribeLocalEvent<TechAnomalyComponent, AnomalySupercriticalEvent>(OnSupercritical);
         SubscribeLocalEvent<TechAnomalyComponent, AnomalyStabilityChangedEvent>(OnStabilityChanged);
     }
 
+    private void OnTechMapInit(Entity<TechAnomalyComponent> ent, ref MapInitEvent args)
+    {
+        ent.Comp.NextTimer = _timing.CurTime;
+    }
+
     public override void Update(float frameTime)
     {
         base.Update(frameTime);