* Rename usages of collidable to physics * high tier PANIQUE * aaaaaaaaAAAAAa * cursed commit dont research * Fix urist and items being anchored * Fix the rest
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using Content.Client.GameObjects.EntitySystems;
|
|
using Content.Shared.GameObjects.Components.Damage;
|
|
using Content.Shared.GameObjects.Components.Mobs;
|
|
using Content.Shared.GameObjects.Components.Mobs.State;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Shared.GameObjects.Components;
|
|
using Robust.Shared.GameObjects.Systems;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
|
|
namespace Content.Client.GameObjects.Components.Mobs.State
|
|
{
|
|
public class DeadState : SharedDeadState
|
|
{
|
|
public override void EnterState(IEntity entity)
|
|
{
|
|
if (entity.TryGetComponent(out AppearanceComponent appearance))
|
|
{
|
|
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)
|
|
{
|
|
EntitySystem.Get<StandingStateSystem>().Standing(entity);
|
|
|
|
if (entity.TryGetComponent(out PhysicsComponent physics))
|
|
{
|
|
physics.CanCollide = true;
|
|
}
|
|
}
|
|
|
|
public override void UpdateState(IEntity entity) { }
|
|
}
|
|
}
|