Files
crystall-punk-14/Content.Shared/MobState/State/SharedNormalMobState.cs

26 lines
784 B
C#
Raw Normal View History

using Content.Shared.Standing;
using Robust.Shared.GameObjects;
2021-06-09 22:19:39 +02:00
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;
2021-11-09 12:15:12 +01:00
public override void EnterState(EntityUid uid, IEntityManager entityManager)
{
2021-11-09 12:15:12 +01:00
base.EnterState(uid, entityManager);
EntitySystem.Get<StandingStateSystem>().Stand(uid);
if (entityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
{
appearance.SetData(DamageStateVisuals.State, DamageState.Alive);
}
}
}
}