Make items' default rotation orient them correctly (#22258)

This commit is contained in:
Nemanja
2023-12-10 18:11:45 -05:00
committed by GitHub
parent b4f0a77ff1
commit 09dbb24e7e

View File

@@ -819,7 +819,7 @@ public abstract class SharedStorageSystem : EntitySystem
{ {
for (var x = storageBounding.Left; x <= storageBounding.Right; x++) 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)); var location = new ItemStorageLocation(angle, (x, y));
if (ItemFitsInGridLocation(itemEnt, storageEnt, location)) if (ItemFitsInGridLocation(itemEnt, storageEnt, location))