]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix: no longer accidentally rotate held items (#38331)
authorlittle-meow-meow <204685920+little-meow-meow@users.noreply.github.com>
Tue, 17 Jun 2025 02:39:04 +0000 (19:39 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Jun 2025 02:39:04 +0000 (19:39 -0700)
Signed-off-by: little-meow-meow <204685920+little-meow-meow@users.noreply.github.com>
Content.Client/UserInterface/Systems/Storage/StorageUIController.cs

index 5e6779193b131bb4262f9e2d2de68f6634ec5b7f..a7e130ccd6d4af625aa57a37952f6fc02d0f2948 100644 (file)
@@ -225,6 +225,10 @@ public sealed class StorageUIController : UIController, IOnSystemChanged<Storage
         if (!IsDragging && EntityManager.System<HandsSystem>().GetActiveHandEntity() == null)
             return;
 
+        // Do not rotate items unless we are either dragging them or hovering over a storage window.
+        if (DraggingGhost is null && UIManager.CurrentlyHovered is not StorageWindow)
+            return;
+
         //clamp it to a cardinal.
         DraggingRotation = (DraggingRotation + Math.PI / 2f).GetCardinalDir().ToAngle();
         if (DraggingGhost != null)