* Initial commit * Climbing uses its own controller now * Missed a check * Get rid of hands check * Cleanup * Get rid of speciescomponent stuff * Remove unneeded check, add separate case for moving other players. * Add DoAfter * IClientDraggable added to ClimbingComponent * Added some basic integration tests. Renamed ClimbMode to Climbing. * oops * Minor fixes * ffff * Table fix * Revamped system so its more predicted, uses proper logic for de-climbing. Get hype!!! * Flag check fix * Distance check and reset numticksblocked * get rid
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameObjects.Components;
|
|
using Content.Shared.GameObjects.Components.Movement;
|
|
using Content.Client.Interfaces.GameObjects.Components.Interaction;
|
|
using Content.Shared.Physics;
|
|
|
|
namespace Content.Client.GameObjects.Components.Movement
|
|
{
|
|
[RegisterComponent]
|
|
public class ClimbingComponent : SharedClimbingComponent, IClientDraggable
|
|
{
|
|
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
|
{
|
|
if (!(curState is ClimbModeComponentState climbModeState) || Body == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
IsClimbing = climbModeState.Climbing;
|
|
}
|
|
|
|
public override bool IsClimbing { get; set; }
|
|
|
|
bool IClientDraggable.ClientCanDropOn(CanDropEventArgs eventArgs)
|
|
{
|
|
return eventArgs.Target.HasComponent<IClimbable>();
|
|
}
|
|
|
|
bool IClientDraggable.ClientCanDrag(CanDragEventArgs eventArgs)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|