Skip to content

Commit

Permalink
Stop auto sort from visiting empty vehicle tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrox committed Jan 10, 2020
1 parent 397d11e commit 1955024
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,8 @@ void activity_on_turn_move_loot( player_activity &act, player &p )
//nothing to sort?
const cata::optional<vpart_reference> vp = g->m.veh_at( src_loc ).part_with_feature( "CARGO",
false );
if( !vp && g->m.i_at( src_loc ).empty( ) ) {
if( ( !vp || vp->vehicle().get_items( vp->part_index() ).empty() )
&& g->m.i_at( src_loc ).empty() ) {
continue;
}

Expand Down

0 comments on commit 1955024

Please sign in to comment.