2023-02-01 00:33:00 +03:00
|
|
|
using Content.Shared.Damage;
|
|
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
2023-10-11 10:41:11 +11:00
|
|
|
namespace Content.Shared.Climbing.Components;
|
2023-02-01 00:33:00 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Makes entity do damage and stun entities with ClumsyComponent
|
|
|
|
|
/// upon DragDrop or Climb interactions.
|
|
|
|
|
/// </summary>
|
2023-10-11 10:41:11 +11:00
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(Systems.BonkSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class BonkableComponent : Component
|
2023-02-01 00:33:00 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Chance of bonk triggering if the user is clumsy.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("bonkClumsyChance")]
|
2024-03-23 15:29:43 -04:00
|
|
|
public float BonkClumsyChance = 0.5f;
|
2023-02-01 00:33:00 +03:00
|
|
|
|
|
|
|
|
/// <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;
|
2023-04-05 18:44:26 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long it takes to bonk.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("bonkDelay")]
|
2024-03-23 15:29:43 -04:00
|
|
|
public float BonkDelay = 1.5f;
|
2023-02-01 00:33:00 +03:00
|
|
|
}
|