Files
tbd-station-14/Content.Shared/Climbing/Components/BonkableComponent.cs
Tayrtahn 225bc3c5ae Fix bypassing vaulting clumsy check with verb action. (#24977)
* Fix bypassing bonking with verb

* Revert "Fix bypassing bonking with verb"

This reverts commit efa0f0f5777b893bcee5a852994cfa1e3fda3e71.

* Properly refactored BonkSystem.

* Oh hey, this is redundant now

* Better solution

* Reduced default bonk chance from 75% to 50%

* Also do a little grammar fix

* Moved BonkChance from BonkableComponent to ClumsyComponent.

* Revert "Moved BonkChance from BonkableComponent to ClumsyComponent."

This reverts commit 0acbd9273f20ec478692603781adf15e06e5ed41.

* Another little grammar fix

* Matched default bonk doAfter length to default climb doAfter length

* Fixed duplicate popups

* Check CanVault with verb use too. Add granularity to ClimbingComponent and remove Leg/Foot requirement.

* Don't show verb if you can't climb

* Removed CanForceClimb

* byref record struct
2024-03-23 20:29:43 +01:00

47 lines
1.2 KiB
C#

using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Climbing.Components;
/// <summary>
/// Makes entity do damage and stun entities with ClumsyComponent
/// upon DragDrop or Climb interactions.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(Systems.BonkSystem))]
public sealed partial class BonkableComponent : Component
{
/// <summary>
/// Chance of bonk triggering if the user is clumsy.
/// </summary>
[DataField("bonkClumsyChance")]
public float BonkClumsyChance = 0.5f;
/// <summary>
/// Sound to play when bonking.
/// </summary>
/// <seealso cref="Bonk"/>
[DataField("bonkSound")]
public SoundSpecifier? BonkSound;
/// <summary>
/// How long to stun players on bonk, in seconds.
/// </summary>
/// <seealso cref="Bonk"/>
[DataField("bonkTime")]
public float BonkTime = 2;
/// <summary>
/// How much damage to apply on bonk.
/// </summary>
/// <seealso cref="Bonk"/>
[DataField("bonkDamage")]
public DamageSpecifier? BonkDamage;
/// <summary>
/// How long it takes to bonk.
/// </summary>
[DataField("bonkDelay")]
public float BonkDelay = 1.5f;
}