Fix issues with missing onbreak flag

develop
Japa Mala Illo 2018-10-28 10:22:03 -05:00
parent 836c011b33
commit d677880131
4 changed files with 4 additions and 4 deletions

@ -1206,7 +1206,7 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out )
for (auto p = dwarfs[dwarf]->status.misc_traits.begin(); p < dwarfs[dwarf]->status.misc_traits.end(); p++)
{
if ((*p)->id == misc_trait_type::Migrant || (*p)->id == misc_trait_type::OnBreak)
if ((*p)->id == misc_trait_type::Migrant /*|| (*p)->id == misc_trait_type::OnBreak*/)
is_on_break = true;
}

@ -1744,7 +1744,7 @@ static bool is_at_leisure(df::unit *unit)
{
for (auto p = unit->status.misc_traits.begin(); p < unit->status.misc_traits.end(); p++)
{
if ((*p)->id == misc_trait_type::Migrant || (*p)->id == misc_trait_type::OnBreak)
if ((*p)->id == misc_trait_type::Migrant /*|| (*p)->id == misc_trait_type::OnBreak*/)
return true;
}

@ -1122,7 +1122,7 @@ private:
return "";
for (auto p = unit->status.misc_traits.begin(); p < unit->status.misc_traits.end(); p++)
{
if ((*p)->id == misc_trait_type::Migrant || (*p)->id == misc_trait_type::OnBreak)
if ((*p)->id == misc_trait_type::Migrant /*|| (*p)->id == misc_trait_type::OnBreak*/)
{
int i = (*p)->value;
return ".on break";

@ -1492,7 +1492,7 @@ static void releaseTiredWorker(EngineInfo *engine, df::job *job, df::unit *worke
if (unit == worker ||
unit->job.current_job || !unit->status.labors[unit_labor::SIEGEOPERATE] ||
!Units::isCitizen(unit) || Units::getMiscTrait(unit, misc_trait_type::OnBreak) ||
!Units::isCitizen(unit) /*|| Units::getMiscTrait(unit, misc_trait_type::OnBreak)*/ ||
isTired(unit) || !Maps::canWalkBetween(job->pos, unit->pos))
continue;