farm-plot-select: Actually check for crop validity

develop
lethosor 2014-11-02 12:21:51 -05:00
parent 14b947837c
commit 5232bffb53
1 changed files with 4 additions and 1 deletions

@ -60,7 +60,10 @@ struct farm_select_hook : df::viewscreen_dwarfmodest {
int32_t crop_id = getSelectedCropId(); int32_t crop_id = getSelectedCropId();
for (int season = 0; season < 4; season++) for (int season = 0; season < 4; season++)
{ {
farm_plot->plant_id[season] = crop_id; if (isValidCrop(crop_id, season, farm_plot))
{
farm_plot->plant_id[season] = crop_id;
}
} }
} }
else if (input->count(interface_key::DESELECT_ALL)) else if (input->count(interface_key::DESELECT_ALL))