Important fix for table climbing (#10803)

This commit is contained in:
Pieter-Jan Briers
2022-08-25 15:41:37 +02:00
committed by GitHub
parent 0e5e3b46c4
commit 84e20049b8
9 changed files with 110 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
using Content.Shared.CCVar;
using Content.Shared.Climbing;
using Content.Shared.Damage;
using Robust.Shared.Audio;
namespace Content.Server.Climbing.Components;
@@ -12,4 +15,36 @@ public sealed class ClimbableComponent : SharedClimbableComponent
[ViewVariables]
[DataField("delay")]
public float ClimbDelay = 0.8f;
/// <summary>
/// If set, people can bonk on this if <see cref="CCVars.GameTableBonk"/> is set or if they are clumsy.
/// </summary>
[ViewVariables] [DataField("bonk")] public bool Bonk = false;
/// <summary>
/// Chance of bonk triggering if the user is clumsy.
/// </summary>
[ViewVariables] [DataField("bonkClumsyChance")]
public float BonkClumsyChance = 0.75f;
/// <summary>
/// Sound to play when bonking.
/// </summary>
/// <seealso cref="Bonk"/>
[ViewVariables] [DataField("bonkSound")]
public SoundSpecifier? BonkSound;
/// <summary>
/// How long to stun players on bonk, in seconds.
/// </summary>
/// <seealso cref="Bonk"/>
[ViewVariables] [DataField("bonkTime")]
public float BonkTime = 2;
/// <summary>
/// How much damage to apply on bonk.
/// </summary>
/// <seealso cref="Bonk"/>
[ViewVariables] [DataField("bonkDamage")]
public DamageSpecifier? BonkDamage;
}