diff --git a/src/item.cpp b/src/item.cpp index 6e5abdcf67994..95f8b73bd209c 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -669,6 +669,7 @@ item &item::convert( const itype_id &new_type, Character *carrier ) } item_counter = 0; + update_link_traits(); update_prefix_suffix_flags(); return *this; } diff --git a/src/item_contents.cpp b/src/item_contents.cpp index 696ec839c7972..3fb84416bfc94 100644 --- a/src/item_contents.cpp +++ b/src/item_contents.cpp @@ -722,7 +722,8 @@ void item_contents::combine( const item_contents &read_input, const bool convert auto current_pocket_iter = contents.begin(); std::advance( current_pocket_iter, pocket_index ); - if( !current_pocket_iter->is_type( pocket.saved_type() ) ) { + if( !current_pocket_iter->is_type( convert ? pocket.get_pocket_data()->type : + pocket.saved_type() ) ) { mismatched_pockets.push_back( pocket ); continue; } @@ -750,8 +751,9 @@ void item_contents::combine( const item_contents &read_input, const bool convert } for( const item_pocket &pocket : mismatched_pockets ) { + const pocket_type mismatched_type = convert ? pocket.get_pocket_data()->type : pocket.saved_type(); for( const item *it : pocket.all_items_top() ) { - const ret_val inserted = insert_item( *it, pocket.saved_type(), ignore_contents ); + const ret_val inserted = insert_item( *it, mismatched_type, ignore_contents ); if( !inserted.success() ) { uninserted_items.push_back( *it ); debugmsg( "error: item %s cannot fit into any pocket while loading: %s",