using Content.Shared.Actions;
using Content.Shared.Movement.Systems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Movement.Components;
///
/// A component for configuring the settings for the jump action.
/// To give the jump action to an entity use and .
/// The basic action prototype is "ActionGravityJump".
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedJumpAbilitySystem))]
public sealed partial class JumpAbilityComponent : Component
{
///
/// The action prototype that allows you to jump.
///
[DataField]
public EntProtoId Action = "ActionGravityJump";
///
/// Entity to hold the action prototype.
///
[DataField, AutoNetworkedField]
public EntityUid? ActionEntity;
///
/// How far you will jump (in tiles).
///
[DataField, AutoNetworkedField]
public float JumpDistance = 5f;
///
/// Basic “throwing” speed for TryThrow method.
///
[DataField, AutoNetworkedField]
public float JumpThrowSpeed = 10f;
///
/// Whether this entity can collide with another entity, leading to it getting knocked down.
///
[DataField, AutoNetworkedField]
public bool CanCollide = false;
///
/// The duration of the knockdown in case of a collision from CanCollide.
///
[DataField, AutoNetworkedField]
public TimeSpan CollideKnockdown = TimeSpan.FromSeconds(2);
///
/// This gets played whenever the jump action is used.
///
[DataField, AutoNetworkedField]
public SoundSpecifier? JumpSound;
///
/// The popup to show if the entity is unable to perform a jump.
///
[DataField, AutoNetworkedField]
public LocId? JumpFailedPopup = "jump-ability-failure";
}
public sealed partial class GravityJumpEvent : InstantActionEvent;