Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integrated armor being incompatible with some mutations #73547

Merged
merged 7 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ 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 ) ) {
KittyTac marked this conversation as resolved.
Show resolved Hide resolved
KittyTac marked this conversation as resolved.
Show resolved Hide resolved
for( const trait_id &mut : p.get_mutations() ) {
const mutation_branch &branch = mut.obj();
if( branch.conflicts_with_item( tmp ) ) {
Expand Down