From e96159b67299466573ee735df3b2869a458cfcc7 Mon Sep 17 00:00:00 2001 From: adamsong Date: Fri, 10 Feb 2023 21:06:09 -0500 Subject: [PATCH] Makes ActivateItemInWorld open the stripping menu (#13786) --- Content.Server/Strip/StrippableSystem.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Content.Server/Strip/StrippableSystem.cs b/Content.Server/Strip/StrippableSystem.cs index 08c71c8fe7..4acc65fba2 100644 --- a/Content.Server/Strip/StrippableSystem.cs +++ b/Content.Server/Strip/StrippableSystem.cs @@ -16,6 +16,7 @@ using System.Threading; using Content.Server.Administration.Logs; using Content.Shared.Database; using Content.Shared.Ensnaring.Components; +using Content.Shared.Interaction; namespace Content.Server.Strip { @@ -37,6 +38,7 @@ namespace Content.Server.Strip SubscribeLocalEvent>(AddStripVerb); SubscribeLocalEvent>(AddStripExamineVerb); + SubscribeLocalEvent(OnActivateInWorld); // BUI SubscribeLocalEvent(OnStripButtonPressed); @@ -151,6 +153,17 @@ namespace Content.Server.Strip args.Verbs.Add(verb); } + private void OnActivateInWorld(EntityUid uid, StrippableComponent component, ActivateInWorldEvent args) + { + if (args.Target == args.User) + return; + + if (!TryComp(args.User, out var actor)) + return; + + StartOpeningStripper(args.User, component); + } + /// /// Places item in user's active hand to an inventory slot. /// -- 2.52.0