Remove inaccessible code from SharedDoAfterSystem (#35089)
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Threading.Tasks;
|
|||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.Hands.Components;
|
using Content.Shared.Hands.Components;
|
||||||
using Content.Shared.Mobs;
|
|
||||||
using Content.Shared.Tag;
|
using Content.Shared.Tag;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -29,7 +28,6 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
|
|||||||
base.Initialize();
|
base.Initialize();
|
||||||
SubscribeLocalEvent<DoAfterComponent, DamageChangedEvent>(OnDamage);
|
SubscribeLocalEvent<DoAfterComponent, DamageChangedEvent>(OnDamage);
|
||||||
SubscribeLocalEvent<DoAfterComponent, EntityUnpausedEvent>(OnUnpaused);
|
SubscribeLocalEvent<DoAfterComponent, EntityUnpausedEvent>(OnUnpaused);
|
||||||
SubscribeLocalEvent<DoAfterComponent, MobStateChangedEvent>(OnStateChanged);
|
|
||||||
SubscribeLocalEvent<DoAfterComponent, ComponentGetState>(OnDoAfterGetState);
|
SubscribeLocalEvent<DoAfterComponent, ComponentGetState>(OnDoAfterGetState);
|
||||||
SubscribeLocalEvent<DoAfterComponent, ComponentHandleState>(OnDoAfterHandleState);
|
SubscribeLocalEvent<DoAfterComponent, ComponentHandleState>(OnDoAfterHandleState);
|
||||||
}
|
}
|
||||||
@@ -46,18 +44,6 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
|
|||||||
Dirty(uid, component);
|
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>
|
/// <summary>
|
||||||
/// Cancels DoAfter if it breaks on damage and it meets the threshold
|
/// Cancels DoAfter if it breaks on damage and it meets the threshold
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user