JumpBoots Attempt №2 (#36862)

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: unknown <wainzor1337@gmail.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
Голубь
2025-07-08 02:19:28 +07:00
committed by GitHub
parent bb02be1dc7
commit 114ec579f5
19 changed files with 187 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
using Content.Shared.Actions;
using Content.Shared.Movement.Systems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Movement.Components;
/// <summary>
/// A component for configuring the settings for the jump action.
/// To give the jump action to an entity use <see cref="ActionGrantComponent"/> and <see cref="ItemActionGrantComponent"/>.
/// The basic action prototype is "ActionGravityJump".
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedJumpAbilitySystem))]
public sealed partial class JumpAbilityComponent : Component
{
/// <summary>
/// How far you will jump (in tiles).
/// </summary>
[DataField, AutoNetworkedField]
public float JumpDistance = 5f;
/// <summary>
/// Basic “throwing” speed for TryThrow method.
/// </summary>
[DataField, AutoNetworkedField]
public float JumpThrowSpeed = 10f;
/// <summary>
/// This gets played whenever the jump action is used.
/// </summary>
[DataField, AutoNetworkedField]
public SoundSpecifier? JumpSound;
}
public sealed partial class GravityJumpEvent : InstantActionEvent;