From 9bd47c0492396ea8ba7264a049b0d3718fb391bf Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 13 Aug 2023 17:07:33 +1000 Subject: [PATCH] Add whitelist check to hand gathering (#19053) --- Content.Server/Gatherable/GatherableSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Server/Gatherable/GatherableSystem.cs b/Content.Server/Gatherable/GatherableSystem.cs index 3de5670380..84976bb4bc 100644 --- a/Content.Server/Gatherable/GatherableSystem.cs +++ b/Content.Server/Gatherable/GatherableSystem.cs @@ -37,6 +37,9 @@ public sealed partial class GatherableSystem : EntitySystem private void OnActivate(EntityUid uid, GatherableComponent component, ActivateInWorldEvent args) { + if (component.ToolWhitelist?.IsValid(args.User, EntityManager) != true) + return; + Gather(uid, args.User, component); }