Predict blocking examine + fix blocking breaking persistence (#36619)

* Predict blocking examine

No idea why this was blocked.

* Fix blocking

* remove nullcheck that made no sense

* predict popups

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2025-04-18 22:57:23 +10:00
committed by GitHub
parent f2232e2ffb
commit e838667d87
2 changed files with 45 additions and 65 deletions

View File

@@ -16,13 +16,13 @@ public sealed partial class BlockingComponent : Component
/// <summary>
/// The entity that's blocking
/// </summary>
[ViewVariables, AutoNetworkedField]
[DataField, AutoNetworkedField]
public EntityUid? User;
/// <summary>
/// Is it currently blocking?
/// </summary>
[ViewVariables, AutoNetworkedField]
[DataField, AutoNetworkedField]
public bool IsBlocking;
/// <summary>
@@ -33,7 +33,7 @@ public sealed partial class BlockingComponent : Component
/// <summary>
/// The shape of the blocking fixture that will be dynamically spawned
/// </summary>
[DataField("shape"), ViewVariables(VVAccess.ReadWrite)]
[DataField]
public IPhysShape Shape = new PhysShapeCircle(0.5f);
/// <summary>
@@ -48,8 +48,8 @@ public sealed partial class BlockingComponent : Component
[DataField("activeBlockModifier", required: true)]
public DamageModifierSet ActiveBlockDamageModifier = default!;
[DataField("blockingToggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string BlockingToggleAction = "ActionToggleBlock";
[DataField]
public EntProtoId BlockingToggleAction = "ActionToggleBlock";
[DataField, AutoNetworkedField]
public EntityUid? BlockingToggleActionEntity;
@@ -57,7 +57,7 @@ public sealed partial class BlockingComponent : Component
/// <summary>
/// The sound to be played when you get hit while actively blocking
/// </summary>
[DataField("blockSound")] public SoundSpecifier BlockSound =
[DataField] public SoundSpecifier BlockSound =
new SoundPathSpecifier("/Audio/Weapons/block_metal1.ogg")
{
Params = AudioParams.Default.WithVariation(0.25f)
@@ -67,13 +67,13 @@ public sealed partial class BlockingComponent : Component
/// Fraction of original damage shield will take instead of user
/// when not blocking
/// </summary>
[DataField("passiveBlockFraction"), ViewVariables(VVAccess.ReadWrite)]
[DataField]
public float PassiveBlockFraction = 0.5f;
/// <summary>
/// Fraction of original damage shield will take instead of user
/// when blocking
/// </summary>
[DataField("activeBlockFraction"), ViewVariables(VVAccess.ReadWrite)]
[DataField]
public float ActiveBlockFraction = 1.0f;
}