summaryrefslogtreecommitdiff
path: root/plugins/workflow.cpp
diff options
context:
space:
mode:
authorKelly Martin2012-04-16 10:34:12 -0500
committerKelly Martin2012-04-16 10:34:12 -0500
commit43e48141472506db142a67b53b752c53c85db6d9 (patch)
treeee879bd694c78055afefc536017728d4eec66427 /plugins/workflow.cpp
parent6287ee59d8a7796640dbf030be8425452c339892 (diff)
downloaddfhack-43e48141472506db142a67b53b752c53c85db6d9.tar.gz
dfhack-43e48141472506db142a67b53b752c53c85db6d9.tar.bz2
dfhack-43e48141472506db142a67b53b752c53c85db6d9.tar.xz
Mod workflow to properly handle custom reactions that produce CRAFTS
Diffstat (limited to 'plugins/workflow.cpp')
-rw-r--r--plugins/workflow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/workflow.cpp b/plugins/workflow.cpp
index 48037926..aa3c94a5 100644
--- a/plugins/workflow.cpp
+++ b/plugins/workflow.cpp
@@ -808,7 +808,7 @@ static void compute_custom_job(ProtectedJob *pj, df::job *job)
using namespace df::enums::reaction_product_item_flags;
VIRTUAL_CAST_VAR(prod, df::reaction_product_itemst, r->products[i]);
- if (!prod || prod->item_type < 0)
+ if (!prod || (prod->item_type < 0 && !prod->flags.is_set(CRAFTS)))
continue;
MaterialInfo mat(prod);
@@ -854,7 +854,7 @@ static void compute_custom_job(ProtectedJob *pj, df::job *job)
}
link_job_constraint(pj, prod->item_type, prod->item_subtype,
- mat_mask, mat.type, mat.index);
+ mat_mask, mat.type, mat.index, prod->flags.is_set(CRAFTS));
}
}