Skip to content

Commit

Permalink
Merge pull request #77922 from ShnitzelX2/temp-fix-add-profession-items
Browse files Browse the repository at this point in the history
Remove debug message in add_profession_items() causing basic build failure
  • Loading branch information
Night-Pryanik authored Nov 17, 2024
2 parents e5cdaca + e527d81 commit d8d1242
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,22 +668,21 @@ void Character::add_profession_items()

//storage items may not be added first, so a second attempt is needed
attempt_add_items( prof_items, try_adding_again );
prof_items.clear();
attempt_add_items( try_adding_again, prof_items );
//if there's one item left that still can't be added, attempt to wield it
if( prof_items.size() == 1 ) {
item last_item = prof_items.front();
if( !has_wield_conflicts( last_item ) ) {
bool success_wield = wield( last_item );
if( success_wield ) {
prof_items.pop_front();
if( !try_adding_again.empty() ) {
prof_items.clear();
attempt_add_items( try_adding_again, prof_items );
//if there's one item left that still can't be added, attempt to wield it
if( prof_items.size() == 1 ) {
item last_item = prof_items.front();
if( !has_wield_conflicts( last_item ) ) {
bool success_wield = wield( last_item );
if( success_wield ) {
prof_items.pop_front();
}
}
}
}
if( !prof_items.empty() ) {
debugmsg( "Failed to place %d items in inventory for profession %s", prof_items.size(),
prof->gender_appropriate_name( male ) );
}

recalc_sight_limits();
calc_encumbrance();
}
Expand Down

0 comments on commit d8d1242

Please sign in to comment.