Skip to content

Commit

Permalink
Squelch debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Mar 12, 2024
1 parent bd80f3c commit 3a27036
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/character.h
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ class Character : public Creature, public visitable
* @param interactive Alert player and drain moves if true.
*/
std::optional<std::list<item>::iterator>
wear( item_location item_wear, bool interactive = true );
wear( item_location item_wear, bool interactive = true, bool no_remove = false );

/** Used for eating object at a location. Removes item if all of it was consumed.
* @returns trinary enum NONE, SOME or ALL amount consumed.
Expand Down
4 changes: 3 additions & 1 deletion src/character_attire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Character::wear( int pos, bool interactive )
}

std::optional<std::list<item>::iterator>
Character::wear( item_location item_wear, bool interactive )
Character::wear( item_location item_wear, bool interactive, bool no_remove )
{
item to_wear = *item_wear;
if( is_worn( to_wear ) ) {
Expand All @@ -254,6 +254,8 @@ Character::wear( item_location item_wear, bool interactive )
if( &to_wear == &weapon ) {
weapon = item();
was_weapon = true;
} else if( no_remove ) {
was_weapon = false;
} else if( has_item( to_wear ) ) {
remove_item( to_wear );
was_weapon = false;
Expand Down
2 changes: 1 addition & 1 deletion src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8625,7 +8625,7 @@ std::optional<int> iuse::change_outfit( Character *p, item *it, const tripoint &
auto ret = p->can_wear( component );
if( ret.success() ) {
item_location new_clothes( *p, &component );
p->wear( new_clothes );
p->wear( new_clothes, true, true );
} else {
// For some reason we couldn't wear this item. Maybe the player mutated in the meanwhile, but
// drop the item instead of deleting it.
Expand Down

0 comments on commit 3a27036

Please sign in to comment.