Files
tbd-station-14/Content.Shared/Ninja/Components/DashAbilityComponent.cs
Leon Friedrich 3101e5a18d Fix action-granting items not being predicted (#20778)
* Ensure actions are predicted

* Fix test fail
2023-10-07 15:08:13 -04:00

35 lines
1.1 KiB
C#

using Content.Shared.Actions;
using Content.Shared.Ninja.Systems;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Ninja.Components;
/// <summary>
/// Adds an action to dash, teleport to clicked position, when this item is held.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(DashAbilitySystem)), AutoGenerateComponentState]
public sealed partial class DashAbilityComponent : Component
{
/// <summary>
/// The action id for dashing.
/// </summary>
[DataField]
public EntProtoId DashAction = "ActionEnergyKatanaDash";
[DataField, AutoNetworkedField]
public EntityUid? DashActionEntity;
/// <summary>
/// Sound played when using dash action.
/// </summary>
[DataField("blinkSound"), ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg")
{
Params = AudioParams.Default.WithVolume(5f)
};
}
public sealed partial class DashEvent : WorldTargetActionEvent { }