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:
@@ -1,29 +1,15 @@
|
||||
#nullable enable
|
||||
using Content.Server.Alert;
|
||||
using Content.Server.Standing;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.State;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.MobState.States
|
||||
{
|
||||
public class NormalMobState : SharedNormalMobState
|
||||
{
|
||||
public override void EnterState(IEntity entity)
|
||||
{
|
||||
base.EnterState(entity);
|
||||
|
||||
EntitySystem.Get<StandingStateSystem>().Standing(entity);
|
||||
|
||||
if (entity.TryGetComponent(out AppearanceComponent? appearance))
|
||||
{
|
||||
appearance.SetData(DamageStateVisuals.State, DamageState.Alive);
|
||||
}
|
||||
}
|
||||
|
||||
public override void UpdateState(IEntity entity, int threshold)
|
||||
{
|
||||
base.UpdateState(entity, threshold);
|
||||
|
||||
Reference in New Issue
Block a user