diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java index 25f0b0a66..24bc84572 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java @@ -252,6 +252,8 @@ public class WndBag extends WndTabbed { placeItem( stuff.misc != null ? stuff.misc : new Placeholder( ItemSpriteSheet.SOMETHING ) ); placeItem( stuff.ring != null ? stuff.ring : new Placeholder( ItemSpriteSheet.RING_HOLDER ) ); + int equipped = 5; + //the container itself if it's not the root backpack if (container != Dungeon.hero.belongings.backpack){ placeItem(container); @@ -259,6 +261,7 @@ public class WndBag extends WndTabbed { } else if (stuff.secondWep != null) { //second weapon always goes to the front of view on main bag placeItem(stuff.secondWep); + equipped++; } // Items in the bag, except other containers (they have tags at the bottom) @@ -271,7 +274,7 @@ public class WndBag extends WndTabbed { } // Free Space - while ((count - 5) < container.capacity()) { + while ((count - equipped) < container.capacity()) { placeItem( null ); } }