Limit number of dwarves assigned when idle dwarves are available.

develop
RossM 2012-04-02 22:47:26 -07:00
parent 18a0c80d5d
commit 3bd499ff93
1 changed files with 3 additions and 0 deletions

@ -853,6 +853,9 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out )
assert(dwarf >= 0);
assert(dwarf < n_dwarfs);
if (labor_infos[labor].active_dwarfs >= min_dwarfs && dwarf_info[dwarf].state != IDLE && dwarf_skill[dwarf] == 0)
continue;
if (!dwarfs[dwarf]->status.labors[labor])
dwarf_info[dwarf].assigned_jobs++;