Skip to content

Commit

Permalink
Merge pull request #73547 from KittyTac/fixed-fangs
Browse files Browse the repository at this point in the history
Fix integrated armor being incompatible with some mutations
  • Loading branch information
I-am-Erk committed May 10, 2024
2 parents 5f72fbe + 3ebbd80 commit 4edb9dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/JSON_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Some armor flags, such as `WATCH` and `ALARMCLOCK` are compatible with other ite
- ```HELMET_NAPE_PROTECTOR``` Item can be worn with different hard helmets, as attachment; specifically can be put in pocket for armor with this flag restriction.
- ```HOOD``` Allow this clothing to conditionally cover the head, for additional warmth or water protection, if the player's head isn't encumbered.
- ```HYGROMETER``` This gear is equipped with an accurate hygrometer (which is used to measure humidity).
- ```INTEGRATED``` This item represents a part of you granted by mutations or bionics. It will always fit, cannot be unequipped (aside from losing the source), and won't drop on death, but otherwise behaves like normal armor with regards to function, encumbrance, layer conflicts and so on.
- ```INTEGRATED``` This item represents a part of you granted by mutations or bionics. It will always fit, will not conflict with armor-blocking mutations, cannot be unequipped (aside from losing the source), and won't drop on death, but otherwise behaves like normal armor with regards to function, encumbrance, layer conflicts and so on.
- ```IR_EFFECT``` Being worn, this item will give an infrared vision.
- ```MUTE``` Makes the player mute.
- ```NORMAL``` Items worn like normal clothing. This is assumed as default.
Expand Down
3 changes: 2 additions & 1 deletion src/character_attire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ ret_val<void> Character::can_wear( const item &it, bool with_equip_change ) cons
return ret_val<void>::make_failure( _( "Can't wear that, it's filthy!" ) );
}

if( !it.has_flag( flag_OVERSIZE ) && !it.has_flag( flag_SEMITANGIBLE ) &&
if( !it.has_flag( flag_OVERSIZE ) && !it.has_flag( flag_INTEGRATED ) &&
!it.has_flag( flag_SEMITANGIBLE ) &&
!it.has_flag( flag_UNRESTRICTED ) ) {
for( const trait_id &mut : get_mutations() ) {
const mutation_branch &branch = mut.obj();
Expand Down
3 changes: 2 additions & 1 deletion src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ ret_val<void> iuse_transform::can_use( const Character &p, const item &it,

if( p.is_worn( it ) ) {
item tmp = item( target );
if( !tmp.has_flag( flag_OVERSIZE ) && !tmp.has_flag( flag_SEMITANGIBLE ) ) {
if( !tmp.has_flag( flag_OVERSIZE ) && !tmp.has_flag( flag_INTEGRATED ) &&
!tmp.has_flag( flag_SEMITANGIBLE ) ) {
for( const trait_id &mut : p.get_mutations() ) {
const mutation_branch &branch = mut.obj();
if( branch.conflicts_with_item( tmp ) ) {
Expand Down

0 comments on commit 4edb9dd

Please sign in to comment.