Files
OldThink/Content.Server/MobState/States/CriticalMobState.cs
Vera Aguilera Puerto 6eee256b11 Refactors stunnable to be ECS. (#4819)
Also cleans up StandingStatesystem.
2021-10-10 12:47:26 +02:00

22 lines
581 B
C#

using Content.Server.Stunnable;
using Content.Server.Stunnable.Components;
using Content.Shared.MobState.State;
using Content.Shared.Stunnable;
using Robust.Shared.GameObjects;
namespace Content.Server.MobState.States
{
public class CriticalMobState : SharedCriticalMobState
{
public override void EnterState(IEntity entity)
{
base.EnterState(entity);
if (entity.TryGetComponent(out StunnableComponent? stun))
{
EntitySystem.Get<StunSystem>().Reset(entity.Uid, stun);
}
}
}
}