Autolabor: add construct chain labor, add destruct trap labor, change overbroad test for military status (was catching uniformed reservists, who are eligible to do civilian labor)

develop
Kelly Martin 2012-12-12 22:25:23 -06:00
parent 82031092a9
commit 2535b50bfc
1 changed files with 4 additions and 1 deletions

@ -801,6 +801,7 @@ private:
case df::building_type::NestBox: case df::building_type::NestBox:
case df::building_type::TractionBench: case df::building_type::TractionBench:
case df::building_type::Slab: case df::building_type::Slab:
case df::building_type::Chain:
return df::unit_labor::HAUL_FURNITURE; return df::unit_labor::HAUL_FURNITURE;
case df::building_type::Trap: case df::building_type::Trap:
case df::building_type::GearAssembly: case df::building_type::GearAssembly:
@ -850,6 +851,8 @@ private:
break; break;
case df::building_type::FarmPlot: case df::building_type::FarmPlot:
return df::unit_labor::PLANT; return df::unit_labor::PLANT;
case df::building_type::Trap:
return df::unit_labor::MECHANIC;
} }
debug ("AUTOLABOR: Cannot deduce labor for destroy building job of type %s\n", debug ("AUTOLABOR: Cannot deduce labor for destroy building job of type %s\n",
@ -1758,7 +1761,7 @@ private:
{ {
state = CHILD; state = CHILD;
} }
else if (dwarf->dwarf->military.cur_uniform != 0) else if (ENUM_ATTR(profession, military, dwarf->dwarf->profession))
state = MILITARY; state = MILITARY;
else if (dwarf->dwarf->job.current_job == NULL) else if (dwarf->dwarf->job.current_job == NULL)
{ {