Skip to content

Commit

Permalink
Add collar items to body status for mouth parts
Browse files Browse the repository at this point in the history
  • Loading branch information
sparr committed Mar 11, 2023
1 parent b08e953 commit a7b1cd9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/ARMOR_BALANCE_AND_DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions src/character_attire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,10 @@ 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;
}
Expand Down

0 comments on commit a7b1cd9

Please sign in to comment.