From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Sat, 17 May 2025 15:27:20 +0000 (+0200) Subject: Make SharpComponent work with Hands (#37543) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=28e3c3d8a7f6f4b21fa7d61b7e27d25e61d3fb99;p=space-station-14.git Make SharpComponent work with Hands (#37543) * init * review --- diff --git a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs index 67a04d9601..ab7961ba18 100644 --- a/Content.Server/Kitchen/EntitySystems/SharpSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/SharpSystem.cs @@ -12,6 +12,7 @@ using Content.Shared.Verbs; using Content.Shared.Destructible; using Content.Shared.DoAfter; using Content.Shared.Hands.Components; +using Content.Shared.IdentityManagement; using Content.Shared.Kitchen; using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; @@ -124,7 +125,7 @@ public sealed class SharpSystem : EntitySystem if (hasBody) popupType = PopupType.LargeCaution; - _popupSystem.PopupEntity(Loc.GetString("butcherable-knife-butchered-success", ("target", args.Args.Target.Value), ("knife", uid)), + _popupSystem.PopupEntity(Loc.GetString("butcherable-knife-butchered-success", ("target", args.Args.Target.Value), ("knife", Identity.Entity(uid, EntityManager))), popupEnt, args.Args.User, popupType); if (hasBody) @@ -152,10 +153,10 @@ public sealed class SharpSystem : EntitySystem var disabled = false; string? message = null; - // if the user has hands - // and the item they're holding doesn't have the SharpComponent + // if the held item doesn't have SharpComponent + // and the user doesn't have SharpComponent // disable the verb - if (!TryComp(args.Using, out var usingSharpComp) && args.Hands != null) + if (!TryComp(args.Using, out var usingSharpComp) && userSharpComp == null) { disabled = true; message = Loc.GetString("butcherable-need-knife",