Fix action-granting items not being predicted (#20778)

* Ensure actions are predicted

* Fix test fail
This commit is contained in:
Leon Friedrich
2023-10-08 06:08:13 +11:00
committed by GitHub
parent 29a77bc54e
commit 3101e5a18d
17 changed files with 91 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -9,19 +10,19 @@ namespace Content.Shared.Blocking;
/// <summary>
/// This component goes on an item that you want to use to block
/// </summary>
[RegisterComponent]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class BlockingComponent : Component
{
/// <summary>
/// The entity that's blocking
/// </summary>
[ViewVariables]
[ViewVariables, AutoNetworkedField]
public EntityUid? User;
/// <summary>
/// Is it currently blocking?
/// </summary>
[ViewVariables]
[ViewVariables, AutoNetworkedField]
public bool IsBlocking;
/// <summary>
@@ -50,7 +51,7 @@ public sealed partial class BlockingComponent : Component
[DataField("blockingToggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string BlockingToggleAction = "ActionToggleBlock";
[DataField("blockingToggleActionEntity")]
[DataField, AutoNetworkedField]
public EntityUid? BlockingToggleActionEntity;
/// <summary>