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,6 +1,6 @@
|
||||
using Content.Client.Standing;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.MobState.State;
|
||||
using Content.Shared.Standing;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
@@ -16,25 +16,6 @@ namespace Content.Client.MobState.States
|
||||
{
|
||||
appearance.SetData(DamageStateVisuals.State, DamageState.Dead);
|
||||
}
|
||||
|
||||
EntitySystem.Get<StandingStateSystem>().Down(entity);
|
||||
|
||||
if (entity.TryGetComponent(out PhysicsComponent? physics))
|
||||
{
|
||||
physics.CanCollide = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ExitState(IEntity entity)
|
||||
{
|
||||
base.ExitState(entity);
|
||||
|
||||
EntitySystem.Get<StandingStateSystem>().Standing(entity);
|
||||
|
||||
if (entity.TryGetComponent(out PhysicsComponent? physics))
|
||||
{
|
||||
physics.CanCollide = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user