diff options
| author | Kelly Martin | 2012-03-28 21:57:08 -0500 |
|---|---|---|
| committer | Kelly Martin | 2012-03-28 21:57:08 -0500 |
| commit | fea34bfdde2d5f5ab6e829e8f1706159fd9be02c (patch) | |
| tree | 67d0ba90062649e35f12655fc2913a672ac36e44 /plugins/autolabor.cpp | |
| parent | 166392af62e2fd8c8e82b6195b116ddde9136ae4 (diff) | |
| download | dfhack-fea34bfdde2d5f5ab6e829e8f1706159fd9be02c.tar.gz dfhack-fea34bfdde2d5f5ab6e829e8f1706159fd9be02c.tar.bz2 dfhack-fea34bfdde2d5f5ab6e829e8f1706159fd9be02c.tar.xz | |
autolabor: set reequip flag when appropriate. also tweaked scoring to reduce job clumping.
Diffstat (limited to 'plugins/autolabor.cpp')
| -rw-r--r-- | plugins/autolabor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 733f0806..b453da0c 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -683,7 +683,7 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) if (labor_infos[labor].is_exclusive && dwarf_info[dwarf].has_exclusive_labor) continue; - int value = dwarf_info[dwarf].mastery_penalty - dwarf_info[dwarf].assigned_jobs; + int value = dwarf_info[dwarf].mastery_penalty - dwarf_info[dwarf].assigned_jobs * 50; if (skill != df::enums::job_skill::NONE) { @@ -796,8 +796,12 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) dwarfs[dwarf]->status.labors[labor] = true; - if (labor_infos[labor].is_exclusive) + if (labor_infos[labor].is_exclusive) + { dwarf_info[dwarf].has_exclusive_labor = true; + // all the exclusive labors require equipment so this should force the dorf to reequip if needed + dwarfs[dwarf]->military.pickup_flags.bits.update = 1; + } } } |
