ECSatize AlertsSystem (#5559)

This commit is contained in:
Acruid
2022-01-05 00:19:23 -08:00
committed by GitHub
parent 36d4de5e61
commit 5b1cd2dd96
59 changed files with 1069 additions and 1038 deletions

View File

@@ -10,7 +10,6 @@ using Content.Shared.MobState.State;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.IoC;
using Robust.Shared.Players;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -69,10 +68,7 @@ namespace Content.Shared.MobState.Components
protected override void OnRemove()
{
if (_entMan.TryGetComponent(Owner, out SharedAlertsComponent? status))
{
status.ClearAlert(AlertType.HumanHealth);
}
EntitySystem.Get<AlertsSystem>().ClearAlert(Owner, AlertType.HumanHealth);
base.OnRemove();
}

View File

@@ -1,4 +1,4 @@
using Content.Shared.Alert;
using Content.Shared.Alert;
using Content.Shared.Standing;
using Robust.Shared.GameObjects;
@@ -15,10 +15,7 @@ namespace Content.Shared.MobState.State
{
base.EnterState(uid, entityManager);
if (entityManager.TryGetComponent(uid, out SharedAlertsComponent? status))
{
status.ShowAlert(AlertType.HumanCrit); // TODO: combine humancrit-0 and humancrit-1 into a gif and display it
}
EntitySystem.Get<AlertsSystem>().ShowAlert(uid, AlertType.HumanCrit); // TODO: combine humancrit-0 and humancrit-1 into a gif and display it
EntitySystem.Get<StandingStateSystem>().Down(uid);