Skip to content

Commit

Permalink
Added drop support so that it drops items that it can't find space for.
Browse files Browse the repository at this point in the history
  • Loading branch information
epsilon-phase authored and kevingranade committed Sep 25, 2015
1 parent f2da8a0 commit 8c3d6b9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3868,18 +3868,27 @@ void vehicle::idle(bool on_map) {
for(int j : adjacent){
if( part_flag(j,"CARGO") ) {
if( seed_data.spawn_seeds ){
tmp=item( seedType, calendar::turn );
tmp = item( seedType, calendar::turn );
while( add_item(j,tmp) && seed_count > 0){
seed_count--;
}
}
tmp=item(seed_data.fruit_id,calendar::turn);
while(add_item(j,tmp) && plant_count > 0){
tmp = item(seed_data.fruit_id, calendar::turn);
while( add_item(j,tmp) && plant_count > 0){
plant_count--;
}
}
}
}
tmp = item( seed_data.fruit_id, calendar_turn );
while(plant_count > 0){
g->m.add_item_or_charges(harvest_pt, tmp);
plant_count--;
}
tmp = item( seedType, calendar::turn );
while( seed_data.spawn_seeds && seed_count > 0)
g->m.add_item_or_charges(harvest_pt, tmp);
seed_count--;
}
}
}
}
Expand Down

0 comments on commit 8c3d6b9

Please sign in to comment.