From: adamsong Date: Sat, 11 Feb 2023 02:06:09 +0000 (-0500) Subject: Makes ActivateItemInWorld open the stripping menu (#13786) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=e96159b67299466573ee735df3b2869a458cfcc7;p=space-station-14.git Makes ActivateItemInWorld open the stripping menu (#13786) --- 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. ///