Merge remote-tracking branch 'ab9rf/labormanager-1106' into develop

develop
lethosor 2017-08-07 14:00:37 -04:00
commit 14867c36cc
1 changed files with 12 additions and 0 deletions

@ -67,6 +67,7 @@
#include <df/ui.h> #include <df/ui.h>
#include <df/training_assignment.h> #include <df/training_assignment.h>
#include <df/general_ref_contains_itemst.h> #include <df/general_ref_contains_itemst.h>
#include <df/personality_facet_type.h>
#include "labormanager.h" #include "labormanager.h"
#include "joblabormapper.h" #include "joblabormapper.h"
@ -1498,6 +1499,17 @@ private:
score += 5000; score += 5000;
} }
// Favor/disfavor RECOVER_WOUNDED based on ALTRUISM personality facet
if (labor == df::unit_labor::RECOVER_WOUNDED)
{
int altruism = d->dwarf->status.current_soul->personality.traits[df::personality_facet_type::ALTRUISM];
if (altruism >= 61)
score += 5000;
else if (altruism <= 24)
score -= 50000;
}
score -= Units::computeMovementSpeed(d->dwarf); score -= Units::computeMovementSpeed(d->dwarf);
return score; return score;