Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/character_attire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1105,12 +1105,13 @@ ret_val<void> outfit::power_armor_conflicts( const item &clothing ) const
}
}
} else {
// Only headgear can be worn with power armor, except other power armor components.
// You can only wear headgear or non-covering items with power armor, except other power armor components.
// You can't wear headgear if power armor helmet is already sitting on your head.
bool has_helmet = false;
if( !clothing.has_flag( flag_POWERARMOR_COMPATIBLE ) && ( is_wearing_power_armor( &has_helmet ) &&
( has_helmet || !( clothing.covers( body_part_head ) || clothing.covers( body_part_mouth ) ||
clothing.covers( body_part_eyes ) ) ) ) ) {
if( !clothing.get_covered_body_parts().none() && !clothing.has_flag( flag_POWERARMOR_COMPATIBLE ) &&
( is_wearing_power_armor( &has_helmet ) &&
( has_helmet || !( clothing.covers( body_part_head ) || clothing.covers( body_part_mouth ) ||
clothing.covers( body_part_eyes ) ) ) ) ) {
return ret_val<void>::make_failure( _( "Can't wear %s with power armor!" ), clothing.tname() );
}
}
Expand Down