v2.0.0: fixed wndbag showing 18 slots instead of 19 with a second wep
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user