Remove inaccessible code from SharedDoAfterSystem (#35089)

This commit is contained in:
Winkarst 2025-02-18 16:02:25 +03:00 committed by GitHub
parent bfd824b8ff
commit 6b265b400a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 14 deletions

View 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>