diff --git a/doc/ARMOR_BALANCE_AND_DESIGN.md b/doc/ARMOR_BALANCE_AND_DESIGN.md index 276848ffe2339..81153aa947dad 100644 --- a/doc/ARMOR_BALANCE_AND_DESIGN.md +++ b/doc/ARMOR_BALANCE_AND_DESIGN.md @@ -563,7 +563,7 @@ RAIN_PROOF | Wont get wet in rain HOOD | Keeps head warm if nothing on it POCKETS | Keeps hands warm if they are free BLOCK_WHILE_WORN | Can be used to block with while worn -COLLAR | Keeps mouth warm if not covered +COLLAR | Keeps mouth warm if not heavily encumbered ONLY_ONE | Only one of this item can be worn ONE_PER_LAYER | Only one item can be worn on this clothing layer FANCY | Clothing is impractically fancy, (like a top hat) diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md index d2600447f5942..b809bed932647 100644 --- a/doc/JSON_FLAGS.md +++ b/doc/JSON_FLAGS.md @@ -339,7 +339,7 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite - ```BLOCK_WHILE_WORN``` Allows worn armor or shields to be used for blocking attacks. - ```BULLET_IMMUNE``` Wearing an item with this flag makes you immune to bullet damage - ```CANT_WEAR``` This item can't be worn directly. -- ```COLLAR``` This piece of clothing has a wide collar that can keep your mouth warm. +- ```COLLAR``` This piece of clothing has a wide collar that can keep your mouth warm when it is mostly unencumbered. - ```COMBAT_TOGGLEABLE``` This item is meant to be toggled during combat. Used by NPCs to determine if they will toggle it on during combat. This only supports simple "transform" actions. - ```DECAY_EXPOSED_ATMOSPHERE``` Consumable will go bad once exposed to the atmosphere (such as MREs). - ```DEAF``` Makes the player deaf. diff --git a/src/character_attire.cpp b/src/character_attire.cpp index 32ac406bec4e8..99127e07dcc3d 100644 --- a/src/character_attire.cpp +++ b/src/character_attire.cpp @@ -2114,7 +2114,7 @@ void outfit::prepare_bodymap_info( bodygraph_info &info, const bodypart_id &bp, } } - // go through every item and see how it handles every part of the character + // go through every item and see how it handles these part(s) of the character for( const item &armor : worn ) { // check if it covers the part // FIXME: item::covers( const sub_bodypart_id & ) always @@ -2130,6 +2130,11 @@ void outfit::prepare_bodymap_info( bodygraph_info &info, const bodypart_id &bp, covered = true; } } + if( !covered && bp == body_part_mouth && armor.has_flag( flag_COLLAR ) && + person.encumb( body_part_mouth ) < 10 ) { + // collars don't cover or encumber, but do conditionally provide warmth + info.worn_names.push_back( string_format( "%s (collar)", armor.tname() ) ); + } if( !covered ) { continue; }