From c56412faa21ea39daa9230028f108fa92c907d53 Mon Sep 17 00:00:00 2001 From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Sat, 21 Sep 2024 15:46:54 -0700 Subject: [PATCH] fix --- Content.Server/Kitchen/EntitySystems/SharpSystem.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs index e1448ce00a1fe8..bdac2f07ab072c 100644 --- a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs @@ -11,6 +11,7 @@ using Content.Shared.Verbs; using Content.Shared.Destructible; using Content.Shared.DoAfter; +using Content.Shared.Hands.Components; using Content.Shared.Kitchen; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; @@ -72,12 +73,17 @@ private bool TryStartButcherDoafter(EntityUid knife, EntityUid target, EntityUid if (!sharp.Butchering.Add(target)) return false; + // if the user isn't the entity with the sharp component, + // they will need to be holding something with their hands, so we set needHand to true + // so that the doafter can be interrupted if they drop the item in their hands + var needHand = user != knife; + var doAfter = new DoAfterArgs(EntityManager, user, sharp.ButcherDelayModifier * butcher.ButcherDelay, new SharpDoAfterEvent(), knife, target: target, used: knife) { BreakOnDamage = true, BreakOnMove = true, - // NeedHand = false, only mobs with hands and mobs with the sharpcomp will see the verb + NeedHand = needHand }; _doAfterSystem.TryStartDoAfter(doAfter); return true;