Rework climbing (#7706)

This commit is contained in:
Jacob Tong
2022-05-10 01:08:52 -07:00
committed by GitHub
parent 7198173ff4
commit 0e945b42b2
11 changed files with 516 additions and 634 deletions

View File

@@ -1,23 +1,8 @@
using Content.Shared.Climbing;
using Robust.Shared.GameObjects;
namespace Content.Client.Movement.Components
{
[RegisterComponent]
[ComponentReference(typeof(SharedClimbingComponent))]
public sealed class ClimbingComponent : SharedClimbingComponent
{
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
base.HandleComponentState(curState, nextState);
namespace Content.Client.Movement.Components;
if (curState is not ClimbModeComponentState climbModeState)
{
return;
}
IsClimbing = climbModeState.Climbing;
OwnerIsTransitioning = climbModeState.IsTransitioning;
}
}
}
[RegisterComponent]
[Friend(typeof(ClimbSystem))]
[ComponentReference(typeof(SharedClimbingComponent))]
public sealed class ClimbingComponent : SharedClimbingComponent { }