fix: no longer accidentally rotate held items (#38331)

Signed-off-by: little-meow-meow <204685920+little-meow-meow@users.noreply.github.com>
This commit is contained in:
little-meow-meow
2025-06-16 19:39:04 -07:00
committed by GitHub
parent 52cc834a0e
commit c049852486

View 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)