Skip to content

Commit

Permalink
Merge pull request CleverRaven#72608 from RenechCDDA/unsealed_evil_in…
Browse files Browse the repository at this point in the history
…_a_can (CleverRaven#74047)

Co-authored-by: RenechCDDA <[email protected]>
  • Loading branch information
Procyonae and RenechCDDA authored May 26, 2024
1 parent ed84c16 commit b9912ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12017,6 +12017,13 @@ bool item::use_amount( const itype_id &it, int &quantity, std::list<item> &used,
}

for( item *removed : removed_items ) {
// Handle cases where items are removed but the pocket isn't emptied
item *parent = this->find_parent( *removed );
for( item_pocket *pocket : parent->get_all_standard_pockets() ) {
if( pocket->has_item( *removed ) ) {
pocket->unseal();
}
}
this->remove_item( *removed );
}

Expand Down

0 comments on commit b9912ab

Please sign in to comment.