diff --git a/plugins/labormanager/labormanager.cpp b/plugins/labormanager/labormanager.cpp index c3d5a8d63..d7d4ffc6b 100644 --- a/plugins/labormanager/labormanager.cpp +++ b/plugins/labormanager/labormanager.cpp @@ -68,6 +68,8 @@ #include #include #include +#include +#include #include "labormanager.h" #include "joblabormapper.h" @@ -1479,6 +1481,7 @@ private: for (int ma = 0; ma < 13; ma++) attr_weight += (skill_attr_weights[skill].mental_attr_weights[ma]) * (d->dwarf->status.current_soul->mental_attrs[ma].value - 1000); } + } int score = skill_level * 1000 - (d->high_skill - skill_level) * 2000 + (xp / (skill_level + 5) * 10) + attr_weight; @@ -1509,6 +1512,16 @@ private: else if (altruism <= 24) score -= 50000; } + // This should reweight assigning CUTWOOD jobs based on a citizen's ethic toward killing plants + + if (labor == df::unit_labor::CUTWOOD) + { + auto c_id = d->dwarf->cultural_identity; + auto culture = world->cultural_identities.all[c_id]; + auto ethics = culture->ethic[df::ethic_type::KILL_PLANT]; + if (ethics != df::ethic_response::NOT_APPLICABLE && ethics != df::ethic_response::REQUIRED) + score += 10000 * (df::ethic_response::ACCEPTABLE - ethics); + } score -= Units::computeMovementSpeed(d->dwarf);