Skip to content

Commit

Permalink
Merge pull request #73860 from irwiss/retain-non-solids
Browse files Browse the repository at this point in the history
Retain non-solid contents when installing vehicle parts
  • Loading branch information
Maleclypse authored May 17, 2024
2 parents 8ef41bc + 574f8e4 commit 03d8ffb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/crafting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,10 @@ std::list<item> Character::consume_items( map &m, const comp_selection<item_comp
}
}
for( item &it : ret ) {
it.spill_contents( *this );
// leave battery/liquids/gases in their containers, spill out solids
if( !it.contains_no_solids() ) {
it.spill_contents( *this );
}
// todo: make a proper solution that overflows with the proper item_location
it.overflow( pos() );
}
Expand Down

0 comments on commit 03d8ffb

Please sign in to comment.