using Content.Shared.DoAfter;
using System.Numerics;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Climbing.Components;
///
/// Indicates that this entity is able to be placed on top of surfaces like tables.
/// Does not by itself allow the entity to carry out the action of climbing, unless
/// is true. Use to control whether
/// the entity can force other entities onto surfaces.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class ClimbingComponent : Component
{
///
/// Whether the owner is able to climb onto things by their own action.
///
[DataField, AutoNetworkedField]
public bool CanClimb = true;
///
/// Whether the owner is climbing on a climbable entity.
///
[AutoNetworkedField, DataField]
public bool IsClimbing;
///
/// The Climbing DoAfter.
///
[DataField]
public DoAfterId? DoAfter;
///
/// Whether the owner is being moved onto the climbed entity.
///
[AutoNetworkedField, DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan? NextTransition;
///
/// Direction to move when transition.
///
[AutoNetworkedField, DataField]
public Vector2 Direction;
///
/// How fast the entity is moved when climbing.
///
[DataField]
public float TransitionRate = 5f;
[AutoNetworkedField, DataField]
public Dictionary DisabledFixtureMasks = new();
}