]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Prevent mice etc from unwrapping parcels (#40838)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Sat, 11 Oct 2025 21:22:12 +0000 (23:22 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Oct 2025 21:22:12 +0000 (21:22 +0000)
* init

* no wrapping yourself

* Revert "no wrapping yourself"

This reverts commit d66cb17e4c306ff95f33bcedf7fd464aa7b4ff90.

Content.Shared/ParcelWrap/Systems/ParcelWrappingSystem.WrappedParcel.cs

index bb0c9437fff5835288a2f394cf026a1ccc89a761..3f1aa2fa80dbc05f904c7fa26d9b8fd496fd7a6b 100644 (file)
@@ -38,7 +38,10 @@ public sealed partial class ParcelWrappingSystem
     private void OnGetVerbsForWrappedParcel(Entity<WrappedParcelComponent> entity,
         ref GetVerbsEvent<InteractionVerb> args)
     {
-        if (!args.CanAccess)
+        if (!args.CanAccess || !args.CanComplexInteract)
+            return;
+
+        if (entity.Comp.Contents.Contains(args.User))
             return;
 
         // "Capture" the values from `args` because C# doesn't like doing the capturing for `ref` values.