Fix climbing and bonking simultaneously (#27268)

* Properly network ClumsyComponent

* Fix being able to climb and bonk at the same time.
Also properly subscribe to AttemptClimbEvent by-ref.

* Update Content.Shared/Interaction/Components/ClumsyComponent.cs
This commit is contained in:
Tayrtahn
2024-04-24 09:02:43 -04:00
committed by GitHub
parent 91aa16f08a
commit 480d26aba6
3 changed files with 23 additions and 21 deletions

View File

@@ -1,22 +1,24 @@
using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Interaction.Components
namespace Content.Shared.Interaction.Components;
/// <summary>
/// A simple clumsy tag-component.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ClumsyComponent : Component
{
/// <summary>
/// A simple clumsy tag-component.
/// Damage dealt to a clumsy character when they try to fire a gun.
/// </summary>
[RegisterComponent]
public sealed partial class ClumsyComponent : Component
{
[DataField("clumsyDamage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier ClumsyDamage = default!;
[DataField(required: true), AutoNetworkedField]
public DamageSpecifier ClumsyDamage = default!;
/// <summary>
/// Sound to play when clumsy interactions fail
/// </summary>
[DataField("clumsySound")]
public SoundSpecifier ClumsySound = new SoundPathSpecifier("/Audio/Items/bikehorn.ogg");
}
/// <summary>
/// Sound to play when clumsy interactions fail.
/// </summary>
[DataField]
public SoundSpecifier ClumsySound = new SoundPathSpecifier("/Audio/Items/bikehorn.ogg");
}