diff options
| author | Alexander Gavrilov | 2012-05-03 11:47:04 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-05-03 11:47:04 +0400 |
| commit | 5afe2ca0020404d46ad3de840030a7b9e186b059 (patch) | |
| tree | 7066712fd0d5cae9ea766189b788efc1c69ae9ad /plugins/workflow.cpp | |
| parent | 28b5068382ebd406b269e6b4aeb073e7cd26503e (diff) | |
| download | dfhack-5afe2ca0020404d46ad3de840030a7b9e186b059.tar.gz dfhack-5afe2ca0020404d46ad3de840030a7b9e186b059.tar.bz2 dfhack-5afe2ca0020404d46ad3de840030a7b9e186b059.tar.xz | |
Update dfhack for specific_ref.
Diffstat (limited to 'plugins/workflow.cpp')
| -rw-r--r-- | plugins/workflow.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/workflow.cpp b/plugins/workflow.cpp index 0d6caa47..1092c86a 100644 --- a/plugins/workflow.cpp +++ b/plugins/workflow.cpp @@ -364,7 +364,7 @@ static ProtectedJob *get_known(int id) static bool isSupportedJob(df::job *job) { - return job->misc_links.empty() && + return job->specific_refs.empty() && Job::getHolder(job) && (!job->job_items.empty() || job->job_type == job_type::CollectClay || @@ -1083,12 +1083,11 @@ static bool itemInRealJob(df::item *item) if (!item->flags.bits.in_job) return false; - if (item->jobs.size() != 1 || - item->jobs[0]->type != 2 || - item->jobs[0]->job == NULL) + auto ref = Items::getSpecificRef(item, specific_ref_type::JOB); + if (!ref || !ref->job) return true; - return ENUM_ATTR(job_type, type, item->jobs[0]->job->job_type) + return ENUM_ATTR(job_type, type, ref->job->job_type) != job_type_class::Hauling; } |
