Files
tbd-station-14/Content.Server/MobState/States/DeadMobState.cs
2022-02-16 18:23:23 +11:00

29 lines
878 B
C#

using System;
using Content.Server.Stunnable;
using Content.Server.Stunnable.Components;
using Content.Shared.Alert;
using Content.Shared.MobState;
using Content.Shared.MobState.State;
using Content.Shared.StatusEffect;
using Content.Shared.Stunnable;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Server.MobState.States
{
public sealed class DeadMobState : SharedDeadMobState
{
public override void EnterState(EntityUid uid, IEntityManager entityManager)
{
base.EnterState(uid, entityManager);
EntitySystem.Get<AlertsSystem>().ShowAlert(uid, AlertType.HumanDead);
if (entityManager.TryGetComponent(uid, out StatusEffectsComponent? stun))
{
EntitySystem.Get<StatusEffectsSystem>().TryRemoveStatusEffect(uid, "Stun");
}
}
}
}