]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
T shaped pickaxe and grid UI fix (#22197)
authorTemporalOroboros <TemporalOroboros@gmail.com>
Thu, 7 Dec 2023 00:52:57 +0000 (16:52 -0800)
committerGitHub <noreply@github.com>
Thu, 7 Dec 2023 00:52:57 +0000 (19:52 -0500)
Content.Client/UserInterface/Systems/Storage/Controls/StorageContainer.cs
Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml

index ba19d2aa90f06a307bd40de182de16f43536ee83..d79edb2e79853544b575c8fb560f783c6932ee8d 100644 (file)
@@ -251,23 +251,23 @@ public sealed class StorageContainer : BaseWindow
         {
             for (var x = boundingGrid.Left; x <= boundingGrid.Right; x++)
             {
-                var currentPosition = new Vector2i(x, y);
-                var item = storageComp.StoredItems
-                    .Where(pair => pair.Value.Position == currentPosition)
-                    .FirstOrNull();
-
                 var control = new Control
                 {
                     MinSize = size
                 };
 
-                if (item != null)
+                var currentPosition = new Vector2i(x, y);
+
+                foreach (var item in storageComp.StoredItems)
                 {
-                    var itemEnt = _entity.GetEntity(item.Value.Key);
+                    if (item.Value.Position != currentPosition)
+                        continue;
+
+                    var itemEnt = _entity.GetEntity(item.Key);
 
                     if (_entity.TryGetComponent<ItemComponent>(itemEnt, out var itemEntComponent))
                     {
-                        var gridPiece = new ItemGridPiece((itemEnt, itemEntComponent), item.Value.Value, _entity)
+                        var gridPiece = new ItemGridPiece((itemEnt, itemEntComponent), item.Value, _entity)
                         {
                             MinSize = size,
                         };
index 85f1e4a4c79da4d4369b7db5fca889abaad4ac93..b4b13accf0642940b2449e2e8154ae1d8cba2f3f 100644 (file)
@@ -27,6 +27,9 @@
         Structural: 10
   - type: Item
     size: Normal
+    shape:
+    - 0,0,2,0
+    - 1,1,1,2
     sprite: Objects/Weapons/Melee/pickaxe.rsi
   - type: UseDelay
     delay: 1