Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Plykiya committed Sep 21, 2024
1 parent 00463bd commit c56412f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Content.Server/Kitchen/EntitySystems/SharpSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c56412f

Please sign in to comment.