Files
tbd-station-14/Content.Shared/MobState/State/SharedNormalMobState.cs
metalgearsloth 50cc526ebd 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
2021-06-27 19:02:46 +10:00

87 lines
1.8 KiB
C#

using Content.Shared.Standing;
using Robust.Shared.GameObjects;
#nullable enable
namespace Content.Shared.MobState.State
{
/// <summary>
/// The standard state an entity is in; no negative effects.
/// </summary>
public abstract class SharedNormalMobState : BaseMobState
{
protected override DamageState DamageState => DamageState.Alive;
public override void EnterState(IEntity entity)
{
base.EnterState(entity);
EntitySystem.Get<StandingStateSystem>().Stand(entity);
if (entity.TryGetComponent(out SharedAppearanceComponent? appearance))
{
appearance.SetData(DamageStateVisuals.State, DamageState.Alive);
}
}
public override bool CanInteract()
{
return true;
}
public override bool CanMove()
{
return true;
}
public override bool CanUse()
{
return true;
}
public override bool CanThrow()
{
return true;
}
public override bool CanSpeak()
{
return true;
}
public override bool CanDrop()
{
return true;
}
public override bool CanPickup()
{
return true;
}
public override bool CanEmote()
{
return true;
}
public override bool CanAttack()
{
return true;
}
public override bool CanEquip()
{
return true;
}
public override bool CanUnequip()
{
return true;
}
public override bool CanChangeDirection()
{
return true;
}
}
}