2022-01-05 00:19:23 -08:00
|
|
|
using System;
|
2021-10-10 12:47:26 +02:00
|
|
|
using Content.Server.Stunnable;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Stunnable.Components;
|
2020-11-09 20:22:19 -08:00
|
|
|
using Content.Shared.Alert;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.MobState;
|
|
|
|
|
using Content.Shared.MobState.State;
|
2021-10-15 14:45:04 -07:00
|
|
|
using Content.Shared.StatusEffect;
|
2021-10-10 12:47:26 +02:00
|
|
|
using Content.Shared.Stunnable;
|
2020-08-29 13:20:37 +02:00
|
|
|
using Robust.Server.GameObjects;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Shared.GameObjects;
|
2020-08-29 13:20:37 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.MobState.States
|
2020-08-29 13:20:37 +02:00
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class DeadMobState : SharedDeadMobState
|
2020-08-29 13:20:37 +02:00
|
|
|
{
|
2021-11-09 12:15:12 +01:00
|
|
|
public override void EnterState(EntityUid uid, IEntityManager entityManager)
|
2020-08-29 13:20:37 +02:00
|
|
|
{
|
2021-11-09 12:15:12 +01:00
|
|
|
base.EnterState(uid, entityManager);
|
2020-12-07 14:52:55 +01:00
|
|
|
|
2022-01-05 00:19:23 -08:00
|
|
|
EntitySystem.Get<AlertsSystem>().ShowAlert(uid, AlertType.HumanDead);
|
2020-08-29 13:20:37 +02:00
|
|
|
|
2021-11-09 12:15:12 +01:00
|
|
|
if (entityManager.TryGetComponent(uid, out StatusEffectsComponent? stun))
|
2020-08-29 13:20:37 +02:00
|
|
|
{
|
2021-11-09 12:15:12 +01:00
|
|
|
EntitySystem.Get<StatusEffectsSystem>().TryRemoveStatusEffect(uid, "Stun");
|
2020-08-29 13:20:37 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|