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