2020-10-14 15:24:07 +02:00
|
|
|
|
using Content.Shared.GameObjects.Components.Movement;
|
2020-09-13 14:23:52 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-08-19 18:13:22 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.GameObjects.Components.Movement
|
|
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
2021-01-11 22:14:01 +11:00
|
|
|
|
[ComponentReference(typeof(SharedClimbingComponent))]
|
2020-10-14 15:24:07 +02:00
|
|
|
|
public class ClimbingComponent : SharedClimbingComponent
|
2020-08-19 18:13:22 -04:00
|
|
|
|
{
|
|
|
|
|
|
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
|
|
|
|
|
{
|
2020-11-26 14:33:31 +01:00
|
|
|
|
base.HandleComponentState(curState, nextState);
|
|
|
|
|
|
|
|
|
|
|
|
if (curState is not ClimbModeComponentState climbModeState || Body == null)
|
2020-08-19 18:13:22 -04:00
|
|
|
|
{
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-10-14 15:24:07 +02:00
|
|
|
|
IsClimbing = climbModeState.Climbing;
|
2020-08-19 18:13:22 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool IsClimbing { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|