labormanager: add StoreItemInLocation labor, reduce tool churn

Note: this commit requires updated df-structures (77968973b28d0e828f880d119a700abb079f3521 or later)
develop
Kelly Kinkade 2016-07-05 13:16:34 -05:00
parent d8f4d79b97
commit a386228f0e
2 changed files with 5 additions and 3 deletions

@ -1 +1 @@
Subproject commit b9178de68bd67442ff720f18b04d222302ce9f8c Subproject commit 77968973b28d0e828f880d119a700abb079f3521

@ -1359,6 +1359,8 @@ public:
job_to_labor_table[df::job_type::MakeEarring] = jlf_make_object; job_to_labor_table[df::job_type::MakeEarring] = jlf_make_object;
job_to_labor_table[df::job_type::MakeBracelet] = jlf_make_object; job_to_labor_table[df::job_type::MakeBracelet] = jlf_make_object;
job_to_labor_table[df::job_type::MakeGem] = jlf_make_object; job_to_labor_table[df::job_type::MakeGem] = jlf_make_object;
job_to_labor_table[df::job_type::StoreItemInLocation] = jlf_no_labor; // StoreItemInLocation
}; };
df::unit_labor find_job_labor(df::job* j) df::unit_labor find_job_labor(df::job* j)
@ -1380,7 +1382,7 @@ public:
df::unit_labor labor; df::unit_labor labor;
if (job_to_labor_table.count(j->job_type) == 0) if (job_to_labor_table.count(j->job_type) == 0)
{ {
debug("LABORMANAGER: job has no job to labor table entry: %s\n", ENUM_KEY_STR(job_type, j->job_type).c_str()); debug("LABORMANAGER: job has no job to labor table entry: %s (%d)\n", ENUM_KEY_STR(job_type, j->job_type).c_str(), j->job_type);
debug_pause(); debug_pause();
labor = df::unit_labor::NONE; labor = df::unit_labor::NONE;
} else { } else {
@ -2526,7 +2528,7 @@ public:
ENUM_KEY_STR(unit_labor, l).c_str(), score, ENUM_KEY_STR(unit_labor, l).c_str(), score,
ENUM_KEY_STR(unit_labor, (*d)->using_labor).c_str(), current_score); ENUM_KEY_STR(unit_labor, (*d)->using_labor).c_str(), current_score);
} }
if ((*d)->using_labor != df::unit_labor::NONE && score > current_score + 5000) if ((*d)->using_labor != df::unit_labor::NONE && score > current_score + 5000 && default_labor_infos[(*d)->using_labor].tool == TOOL_NONE)
set_labor(*d, (*d)->using_labor, false); set_labor(*d, (*d)->using_labor, false);
} }
} }