CatStation/Content.Shared/Climbing/Systems/ClimbSystem.Bonk.cs
āda 9fd1abcff6
Clumsy status effect + tests (#45262)
* component outline

* System port

* super bonk detour

* working good!

* relay changes

* the death of clumsy

* why it stop working??

* now to test it

* tested it

* Actual genuine tests

* final checks

* buff up catch test

* annoying test fail

* refactor: minor whitespace and var rename changes

* refactor: changed comments on top of methods to xml-doc for ClumsyStatusEffectSystem

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Co-authored-by: Fildrance <fildrance@gmail.com>
2026-08-11 10:19:19 +00:00

22 lines
717 B
C#

using Content.Shared.Climbing.Components;
namespace Content.Shared.Climbing.Systems;
// This partial handles BonkableComponent.
public sealed partial class ClimbSystem
{
/// <summary>
/// A foolish creature has bonked their head upon this bonkable.
/// </summary>
public void Bonk(Entity<BonkableComponent?> table, EntityUid victim)
{
if (!_bonkQuery.Resolve(table, ref table.Comp, false))
return;
if (table.Comp.BonkDamage != null)
_damageableSystem.ChangeDamage(victim, table.Comp.BonkDamage, true);
_stunSystem.TryUpdateParalyzeDuration(victim, table.Comp.BonkTime);
_audio.PlayPredicted(table.Comp.BonkSound, table, victim);
}
}