]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make items' default rotation orient them correctly (#22258)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Sun, 10 Dec 2023 23:11:45 +0000 (18:11 -0500)
committerGitHub <noreply@github.com>
Sun, 10 Dec 2023 23:11:45 +0000 (15:11 -0800)
Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

index 0b93b9b76291fc4cfe034886be8d0b36756d3f54..3a92de1e73a8cce9ec7c40bb5af1e89e845660df 100644 (file)
@@ -819,7 +819,7 @@ public abstract class SharedStorageSystem : EntitySystem
         {
             for (var x = storageBounding.Left; x <= storageBounding.Right; x++)
             {
-                for (var angle = Angle.Zero; angle <= Angle.FromDegrees(360); angle += Math.PI / 2f)
+                for (var angle = Angle.FromDegrees(-itemEnt.Comp.StoredRotation); angle <= Angle.FromDegrees(360 - itemEnt.Comp.StoredRotation); angle += Math.PI / 2f)
                 {
                     var location = new ItemStorageLocation(angle, (x, y));
                     if (ItemFitsInGridLocation(itemEnt, storageEnt, location))