Skip to content

Commit

Permalink
Items salvaged from cutting will now be placed in vehicle, if you're …
Browse files Browse the repository at this point in the history
…cutting them in vehicle (#77910)

* Items salvaged from cutting will now be placed in vehicle, if there's any

* Remove unused variable
  • Loading branch information
Anton Burmistrov authored Nov 21, 2024
1 parent 419df31 commit f0d2f50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/iuse_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,6 @@ void salvage_actor::cut_up( Character &p, item_location &cut ) const
// Force an encumbrance update in case they were wearing that item.
p.calc_encumbrance();

map &here = get_map();
for( const auto &salvaged_mat : salvage ) {
item result( salvaged_mat.first, calendar::turn );
int amount = salvaged_mat.second;
Expand All @@ -1826,7 +1825,7 @@ void salvage_actor::cut_up( Character &p, item_location &cut ) const
p.i_add_or_drop( result, amount );
} else {
for( int i = 0; i < amount; i++ ) {
here.add_item_or_charges( pos, result );
put_into_vehicle_or_drop( p, item_drop_reason::deliberate, { result }, pos );
}
}
} else {
Expand Down

0 comments on commit f0d2f50

Please sign in to comment.