mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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>
22 lines
717 B
C#
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);
|
|
}
|
|
}
|