Skip to content

Commit

Permalink
Improve error message re armor portions (CleverRaven#49760)
Browse files Browse the repository at this point in the history
When duplicate bodyparts appear in the armor portion data, it's helpful
to know which bodyparts they are.
  • Loading branch information
jbytheway authored Jul 9, 2021
1 parent 98b6dfb commit 0cb3978
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/item_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,9 @@ void Item_factory::check_definitions() const
for( const bodypart_str_id &bp : *portion.covers ) {
if( portion.covers->test( bp ) ) {
if( observed_bps.count( bp ) ) {
msg += "multiple portions with same body_part defined\n";
msg += string_format(
"multiple portions with same body_part %s defined\n",
bp.str() );
}
observed_bps.insert( bp );
}
Expand Down

0 comments on commit 0cb3978

Please sign in to comment.