Skip to content

Commit

Permalink
Merge pull request #76941 from Night-Pryanik/no-modding-for-integrate…
Browse files Browse the repository at this point in the history
…d-tools

Forbid modding integrated tools
  • Loading branch information
Maleclypse authored Oct 10, 2024
2 parents 9c56a94 + 529523d commit 11886ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5346,6 +5346,11 @@ std::optional<int> iuse::toolmod_attach( Character *p, item *it, const tripoint
return false;
}

// can't mod integrated tools
if( e.has_flag( flag_INTEGRATED ) ) {
return false;
}

// can only attach to unmodified tools that use compatible ammo
return std::any_of( it->type->mod->acceptable_ammo.begin(),
it->type->mod->acceptable_ammo.end(), [&]( const ammotype & at ) {
Expand Down

0 comments on commit 11886ea

Please sign in to comment.