Skip to content

Commit

Permalink
Merge pull request #46203 from kevingranade/fix-adv-inv-mag-rem
Browse files Browse the repository at this point in the history
Only enumerate the contents of containers in advanced inventory
  • Loading branch information
ZhilkinSerg authored Dec 21, 2020
2 parents 89fb73a + 6164b9f commit b4f02d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/advanced_inv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ bool advanced_inventory::move_all_items( bool nested_call )
if( spane.get_area() == AIM_INVENTORY ) {
//add all solid top level items
for( item &cloth : player_character.worn ) {
for( item *it : cloth.contents.all_items_top() ) {
for( item *it : cloth.contents.all_items_top( item_pocket::pocket_type::CONTAINER ) ) {
if( !it->made_of_from_type( phase_id::SOLID ) ) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/advanced_inv_pane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ std::vector<advanced_inv_listitem> avatar::get_AIM_inventory( const advanced_inv
continue;
}
for( const std::vector<item *> &it_stack : item_list_to_stack(
worn_item.contents.all_items_top() ) ) {
worn_item.contents.all_items_top( item_pocket::pocket_type::CONTAINER ) ) ) {
advanced_inv_listitem adv_it( it_stack, item_index++, square.id, false );
if( !pane.is_filtered( *adv_it.items.front() ) ) {
square.volume += adv_it.volume;
Expand Down

0 comments on commit b4f02d9

Please sign in to comment.