From 6b265b400aaf562d64cbbd29e4a348f1d0af1bbc Mon Sep 17 00:00:00 2001 From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Tue, 18 Feb 2025 16:02:25 +0300 Subject: [PATCH] Remove inaccessible code from SharedDoAfterSystem (#35089) --- Content.Shared/DoAfter/SharedDoAfterSystem.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Content.Shared/DoAfter/SharedDoAfterSystem.cs b/Content.Shared/DoAfter/SharedDoAfterSystem.cs index 86f29fd49c..c246c2844a 100644 --- a/Content.Shared/DoAfter/SharedDoAfterSystem.cs +++ b/Content.Shared/DoAfter/SharedDoAfterSystem.cs @@ -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(OnDamage); SubscribeLocalEvent(OnUnpaused); - SubscribeLocalEvent(OnStateChanged); SubscribeLocalEvent(OnDoAfterGetState); SubscribeLocalEvent(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); - } - /// /// Cancels DoAfter if it breaks on damage and it meets the threshold ///