From 6164b9f62c6301ba3573323232caa048baaeb29b Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Sun, 20 Dec 2020 19:39:42 -0800 Subject: [PATCH] Only enumerate the contents of containers in advanced inventory Not magazines or magazine wells or anything else, just what you think of as ordinary pockets --- src/advanced_inv.cpp | 2 +- src/advanced_inv_pane.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/advanced_inv.cpp b/src/advanced_inv.cpp index 3c2d12916da1c..1e466034567d4 100644 --- a/src/advanced_inv.cpp +++ b/src/advanced_inv.cpp @@ -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; } diff --git a/src/advanced_inv_pane.cpp b/src/advanced_inv_pane.cpp index 77aee8fbd8486..731408a56c7e4 100644 --- a/src/advanced_inv_pane.cpp +++ b/src/advanced_inv_pane.cpp @@ -115,7 +115,7 @@ std::vector avatar::get_AIM_inventory( const advanced_inv continue; } for( const std::vector &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;