From 590ea629f36dd1b37fc980104654434278a9f476 Mon Sep 17 00:00:00 2001 From: RossM Date: Fri, 30 Mar 2012 10:01:33 -0700 Subject: [PATCH] Don't try to give labors to merchant guards or dead dwarves. --- plugins/autolabor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 3ef0f9e5c..f748738b9 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -457,7 +457,8 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) for (int i = 0; i < world->units.all.size(); ++i) { df::unit* cre = world->units.all[i]; - if (cre->race == race && cre->civ_id == civ && !cre->flags1.bits.marauder && !cre->flags1.bits.diplomat && !cre->flags1.bits.merchant && !cre->flags1.bits.dead) { + if (cre->race == race && cre->civ_id == civ && !cre->flags1.bits.marauder && !cre->flags1.bits.diplomat && !cre->flags1.bits.merchant && + !cre->flags1.bits.dead && !cre->flags1.bits.forest) { dwarfs.push_back(cre); } }