]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove inaccessible code from SharedDoAfterSystem (#35089)
authorWinkarst <74284083+Winkarst-cpu@users.noreply.github.com>
Tue, 18 Feb 2025 13:02:25 +0000 (16:02 +0300)
committerGitHub <noreply@github.com>
Tue, 18 Feb 2025 13:02:25 +0000 (00:02 +1100)
Content.Shared/DoAfter/SharedDoAfterSystem.cs

index 86f29fd49c8ab98607ee7ae254e78c9126aacc87..c246c2844a4beba96d8a38b69cfd631fd11b220b 100644 (file)
@@ -3,7 +3,6 @@ using System.Threading.Tasks;
 using Content.Shared.ActionBlocker;
 using Content.Shared.Damage;
 using Content.Shared.Hands.Components;
-using Content.Shared.Mobs;
 using Content.Shared.Tag;
 using Robust.Shared.GameStates;
 using Robust.Shared.Serialization;
@@ -29,7 +28,6 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
         base.Initialize();
         SubscribeLocalEvent<DoAfterComponent, DamageChangedEvent>(OnDamage);
         SubscribeLocalEvent<DoAfterComponent, EntityUnpausedEvent>(OnUnpaused);
-        SubscribeLocalEvent<DoAfterComponent, MobStateChangedEvent>(OnStateChanged);
         SubscribeLocalEvent<DoAfterComponent, ComponentGetState>(OnDoAfterGetState);
         SubscribeLocalEvent<DoAfterComponent, ComponentHandleState>(OnDoAfterHandleState);
     }
@@ -46,18 +44,6 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
         Dirty(uid, component);
     }
 
-    private void OnStateChanged(EntityUid uid, DoAfterComponent component, MobStateChangedEvent args)
-    {
-        if (args.NewMobState != MobState.Dead || args.NewMobState != MobState.Critical)
-            return;
-
-        foreach (var doAfter in component.DoAfters.Values)
-        {
-            InternalCancel(doAfter, component);
-        }
-        Dirty(uid, component);
-    }
-
     /// <summary>
     /// Cancels DoAfter if it breaks on damage and it meets the threshold
     /// </summary>