Fix action-granting items not being predicted (#20778)
* Ensure actions are predicted * Fix test fail
This commit is contained in:
@@ -3,21 +3,22 @@ using Content.Shared.Ninja.Systems;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
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))]
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(DashAbilitySystem)), AutoGenerateComponentState]
|
||||
public sealed partial class DashAbilityComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The action id for dashing.
|
||||
/// </summary>
|
||||
[DataField("dashAction", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string DashAction = string.Empty;
|
||||
[DataField]
|
||||
public EntProtoId DashAction = "ActionEnergyKatanaDash";
|
||||
|
||||
[DataField("dashActionEntity")]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? DashActionEntity;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed partial class NinjaGlovesComponent : Component
|
||||
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ToggleAction = "ActionToggleNinjaGloves";
|
||||
|
||||
[DataField("toggleActionEntity")]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? ToggleActionEntity;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -47,7 +47,7 @@ public sealed partial class NinjaSuitComponent : Component
|
||||
[DataField("createThrowingStarAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string CreateThrowingStarAction = "ActionCreateThrowingStar";
|
||||
|
||||
[DataField("createThrowingStarActionEntity")]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? CreateThrowingStarActionEntity;
|
||||
|
||||
/// <summary>
|
||||
@@ -68,7 +68,7 @@ public sealed partial class NinjaSuitComponent : Component
|
||||
[DataField("recallKatanaAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string RecallKatanaAction = "ActionRecallKatana";
|
||||
|
||||
[DataField("recallKatanaActionEntity")]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? RecallKatanaActionEntity;
|
||||
|
||||
/// <summary>
|
||||
@@ -84,7 +84,7 @@ public sealed partial class NinjaSuitComponent : Component
|
||||
[DataField("empAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string EmpAction = "ActionNinjaEmp";
|
||||
|
||||
[DataField("empActionEntity")]
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? EmpActionEntity;
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user