Refactor standing to be ECS (#4142)

* Refactor standing to be ECS

E C S B A B Y

* DONE

* FIX IT FIX IT FIX IT

* IsDown event

* Change to methods

* Fixes

* Address some reviews

* Last of the Mohicans

* Final fixes

* Fix tests
This commit is contained in:
metalgearsloth
2021-06-27 19:02:46 +10:00
committed by GitHub
parent 97f4f0a9bd
commit 50cc526ebd
30 changed files with 328 additions and 268 deletions

View File

@@ -1,5 +1,4 @@
using Content.Server.Alert;
using Content.Server.Standing;
using Content.Server.Stunnable.Components;
using Content.Shared.Alert;
using Content.Shared.MobState;
@@ -15,11 +14,6 @@ namespace Content.Server.MobState.States
{
base.EnterState(entity);
if (entity.TryGetComponent(out AppearanceComponent? appearance))
{
appearance.SetData(DamageStateVisuals.State, DamageState.Dead);
}
if (entity.TryGetComponent(out ServerAlertsComponent? status))
{
status.ShowAlert(AlertType.HumanDead);
@@ -29,8 +23,6 @@ namespace Content.Server.MobState.States
{
stun.CancelAll();
}
EntitySystem.Get<StandingStateSystem>().Down(entity);
}
}
}