From d2bfb3e2b9f7e819ea2d8cfae21298a6f9000013 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 24 May 2023 17:08:04 +1000 Subject: [PATCH] Fix double vault do_after (#16743) --- Content.Server/Climbing/ClimbSystem.cs | 2 +- Content.Shared/Climbing/BonkSystem.cs | 3 ++- Resources/Locale/en-US/bonk/components/bonkable-component.ftl | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Server/Climbing/ClimbSystem.cs b/Content.Server/Climbing/ClimbSystem.cs index d0bcd61a35..727c640698 100644 --- a/Content.Server/Climbing/ClimbSystem.cs +++ b/Content.Server/Climbing/ClimbSystem.cs @@ -103,7 +103,7 @@ public sealed class ClimbSystem : SharedClimbSystem { // definitely a better way to check if two entities are equal // but don't have computer access and i have to do this without syntax - if (args.User != args.Dragged && !HasComp(args.User)) + if (args.Handled || args.User != args.Dragged && !HasComp(args.User)) return; TryClimb(args.User, args.Dragged, uid, component); } diff --git a/Content.Shared/Climbing/BonkSystem.cs b/Content.Shared/Climbing/BonkSystem.cs index 1a68f9cf08..09bee2d7f8 100644 --- a/Content.Shared/Climbing/BonkSystem.cs +++ b/Content.Shared/Climbing/BonkSystem.cs @@ -7,6 +7,7 @@ using Content.Shared.DragDrop; using Robust.Shared.Configuration; using Content.Shared.Popups; using Content.Shared.IdentityManagement; +using Content.Shared.Interaction.Components; using Robust.Shared.Player; using Robust.Shared.Serialization; @@ -72,7 +73,7 @@ public sealed class BonkSystem : EntitySystem private void OnDragDrop(EntityUid uid, BonkableComponent component, ref DragDropTargetEvent args) { - if (args.Handled) + if (args.Handled || !HasComp(args.Dragged)) return; var doAfterArgs = new DoAfterArgs(args.Dragged, component.BonkDelay, new BonkDoAfterEvent(), uid, target: uid) diff --git a/Resources/Locale/en-US/bonk/components/bonkable-component.ftl b/Resources/Locale/en-US/bonk/components/bonkable-component.ftl index fce10284ca..e66eb91dd9 100644 --- a/Resources/Locale/en-US/bonk/components/bonkable-component.ftl +++ b/Resources/Locale/en-US/bonk/components/bonkable-component.ftl @@ -1,2 +1,2 @@ bonkable-success-message-others = { CAPITALIZE(THE($user)) } bonks { POSS-ADJ($user) } head against { $bonkable } -bonkable-success-message-user = You bonk your head against { $bonkable } \ No newline at end of file +bonkable-success-message-user = You bonk your head against { THE($bonkable) }