Fix labormanager never assigning dwarves to fill ponds, making irrigation very difficult.

develop
Ben Lubar 2018-02-21 18:46:21 -06:00
parent 6e3b29930d
commit 9f9d90c2ef
No known key found for this signature in database
GPG Key ID: 018BAB45DB2D2B24
2 changed files with 12 additions and 6 deletions

@ -731,7 +731,8 @@ JobLaborMapper::JobLaborMapper()
job_to_labor_table[df::job_type::ConstructStatue] = jlf_make_furniture;
job_to_labor_table[df::job_type::ConstructBlocks] = jlf_make_furniture;
job_to_labor_table[df::job_type::MakeRawGlass] = jlf_const(df::unit_labor::GLASSMAKER);
job_to_labor_table[df::job_type::MakeCrafts] = jlf_make_object; job_to_labor_table[df::job_type::MintCoins] = jlf_const(df::unit_labor::METAL_CRAFT);
job_to_labor_table[df::job_type::MakeCrafts] = jlf_make_object;
job_to_labor_table[df::job_type::MintCoins] = jlf_const(df::unit_labor::METAL_CRAFT);
job_to_labor_table[df::job_type::CutGems] = jlf_const(df::unit_labor::CUT_GEM);
job_to_labor_table[df::job_type::CutGlass] = jlf_const(df::unit_labor::CUT_GEM);
job_to_labor_table[df::job_type::EncrustWithGems] = jlf_const(df::unit_labor::ENCRUST_GEM);
@ -819,13 +820,13 @@ JobLaborMapper::JobLaborMapper()
job_to_labor_table[df::job_type::Suture] = jlf_const(df::unit_labor::SUTURING);
job_to_labor_table[df::job_type::SetBone] = jlf_const(df::unit_labor::BONE_SETTING);
job_to_labor_table[df::job_type::PlaceInTraction] = jlf_const(df::unit_labor::BONE_SETTING);
job_to_labor_table[df::job_type::DrainAquarium] = jlf_no_labor;
job_to_labor_table[df::job_type::FillAquarium] = jlf_no_labor;
job_to_labor_table[df::job_type::FillPond] = jlf_no_labor;
job_to_labor_table[df::job_type::DrainAquarium] = jlf_const(df::unit_labor::HAUL_WATER);
job_to_labor_table[df::job_type::FillAquarium] = jlf_const(df::unit_labor::HAUL_WATER);
job_to_labor_table[df::job_type::FillPond] = jlf_const(df::unit_labor::HAUL_WATER);
job_to_labor_table[df::job_type::GiveWater] = jlf_const(df::unit_labor::FEED_WATER_CIVILIANS);
job_to_labor_table[df::job_type::GiveFood] = jlf_const(df::unit_labor::FEED_WATER_CIVILIANS);
job_to_labor_table[df::job_type::GiveWater2] = jlf_no_labor;
job_to_labor_table[df::job_type::GiveFood2] = jlf_no_labor;
job_to_labor_table[df::job_type::GiveWater2] = jlf_const(df::unit_labor::FEED_WATER_CIVILIANS);
job_to_labor_table[df::job_type::GiveFood2] = jlf_const(df::unit_labor::FEED_WATER_CIVILIANS);
job_to_labor_table[df::job_type::RecoverPet] = jlf_no_labor;
job_to_labor_table[df::job_type::PitLargeAnimal] = jlf_const(df::unit_labor::HAUL_ANIMALS);
job_to_labor_table[df::job_type::PitSmallAnimal] = jlf_no_labor;

@ -1941,6 +1941,10 @@ public:
set_labor(canary_dwarf, df::unit_labor::REMOVE_CONSTRUCTION, true);
/* Set HAUL_WATER so we can detect ponds that need to be filled ponds. */
set_labor(canary_dwarf, df::unit_labor::HAUL_WATER, true);
if (print_debug)
out.print("Setting %s as the hauling canary\n", canary_dwarf->dwarf->name.first_name.c_str());
}
@ -1965,6 +1969,7 @@ public:
set_labor(*d, l,
(l >= df::unit_labor::HAUL_STONE && l <= df::unit_labor::HAUL_ANIMALS) ||
l == df::unit_labor::CLEAN ||
l == df::unit_labor::HAUL_WATER ||
l == df::unit_labor::REMOVE_CONSTRUCTION ||
l == df::unit_labor::PULL_LEVER ||
l == df::unit_labor::HAUL_TRADE);