Fix clown not being clumsy (#5208)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Ephememory
2022-02-16 08:24:38 -06:00
committed by GitHub
parent 6b7919678e
commit 8b1a711843
6 changed files with 36 additions and 17 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.Damage;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Random;
@@ -12,6 +13,9 @@ namespace Content.Server.Interaction.Components
{
[Dependency] private readonly IRobustRandom _random = default!;
[DataField("clumsyDamage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier ClumsyDamage = default!;
public bool RollClumsy(float chance)
{
return Running && _random.Prob(chance);