Files
OldThink/Content.Server/MobState/States/DeadMobState.cs

29 lines
878 B
C#
Raw Normal View History

2022-01-05 00:19:23 -08:00
using System;
using Content.Server.Stunnable;
2021-06-09 22:19:39 +02:00
using Content.Server.Stunnable.Components;
using Content.Shared.Alert;
2021-06-09 22:19:39 +02:00
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;
2021-06-09 22:19:39 +02:00
namespace Content.Server.MobState.States
{
public sealed class DeadMobState : SharedDeadMobState
{
2021-11-09 12:15:12 +01:00
public override void EnterState(EntityUid uid, IEntityManager entityManager)
{
2021-11-09 12:15:12 +01:00
base.EnterState(uid, entityManager);
2022-01-05 00:19:23 -08:00
EntitySystem.Get<AlertsSystem>().ShowAlert(uid, AlertType.HumanDead);
2021-11-09 12:15:12 +01:00
if (entityManager.TryGetComponent(uid, out StatusEffectsComponent? stun))
{
2021-11-09 12:15:12 +01:00
EntitySystem.Get<StatusEffectsSystem>().TryRemoveStatusEffect(uid, "Stun");
}
}
}
}