Skip to content

Commit

Permalink
Deduplicate src assigning code
Browse files Browse the repository at this point in the history
This is copy/pasted from the function, so just call the function.
  • Loading branch information
anothersimulacrum committed Jun 16, 2024
1 parent eb7b37e commit 179e09b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4471,10 +4471,7 @@ void Item_factory::load_basic_info( const JsonObject &jo, itype &def, const std:
check_and_create_magazine_pockets( def );
add_special_pockets( def );

if( !def.src.empty() && def.src.back().first != def.id ) {
def.src.clear();
}
def.src.emplace_back( def.id, mod_id( src ) );
mod_tracker::assign_src( def, src );

if( def.magazines.empty() ) {
migrate_mag_from_pockets( def );
Expand Down

0 comments on commit 179e09b

Please sign in to comment.