diff --git a/src/game.cpp b/src/game.cpp index 2c9cfd9cf5de5..13eefe854013e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1709,23 +1709,17 @@ static hint_rating rate_action_eat( const avatar &you, const item &it ) static hint_rating rate_action_collapse( const item &it ) { - if( it.is_container() ) { - for( const item_pocket *pocket : it.get_all_contained_pockets().value() ) { - if( !pocket->settings.is_collapsed() ) { - return hint_rating::good; - } + for( const item_pocket *pocket : it.get_all_standard_pockets().value() ) { + if( !pocket->settings.is_collapsed() ) { + return hint_rating::good; } - return hint_rating::cant; } return hint_rating::cant; } static hint_rating rate_action_expand( const item &it ) { - if( !it.is_container() ) { - return hint_rating::cant; - } - for( const item_pocket *pocket : it.get_all_contained_pockets().value() ) { + for( const item_pocket *pocket : it.get_all_standard_pockets().value() ) { if( pocket->settings.is_collapsed() ) { return hint_rating::good; } @@ -2131,10 +2125,8 @@ int game::inventory_item_menu( item_location locThisItem, break; case '<': case '>': - if( oThisItem.is_container() ) { - for( item_pocket *pocket : oThisItem.get_all_contained_pockets().value() ) { - pocket->settings.set_collapse( cMenu == '>' ); - } + for( item_pocket *pocket : oThisItem.get_all_standard_pockets().value() ) { + pocket->settings.set_collapse( cMenu == '>' ); } break; default: