diff options
| author | RossM | 2012-04-02 22:47:26 -0700 |
|---|---|---|
| committer | RossM | 2012-04-02 22:47:26 -0700 |
| commit | 3bd499ff93b87bd74b1ec0f5cb351dc1bddafa73 (patch) | |
| tree | ec65f60e7b41631fa0a4c523896b19b370b354f6 /plugins/autolabor.cpp | |
| parent | 18a0c80d5dbe71e18ec0566cbd56c6a6371c600d (diff) | |
| download | dfhack-3bd499ff93b87bd74b1ec0f5cb351dc1bddafa73.tar.gz dfhack-3bd499ff93b87bd74b1ec0f5cb351dc1bddafa73.tar.bz2 dfhack-3bd499ff93b87bd74b1ec0f5cb351dc1bddafa73.tar.xz | |
Limit number of dwarves assigned when idle dwarves are available.
Diffstat (limited to 'plugins/autolabor.cpp')
| -rw-r--r-- | plugins/autolabor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 2df821d9..57c035b3 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -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++; |
