From d508028bccb0cd47dd2eaaba849bcfe09b395812 Mon Sep 17 00:00:00 2001 From: sv-esk Date: Thu, 3 Mar 2016 21:32:16 +0200 Subject: [PATCH] fix job-duplicate (do not clone posting_index) if job cannot be done right now, game puts it in df.global.world.job_postings when job finally can be done, game removes job from postings and clears posting_index that index should not be cloned by job-duplicate(new jobs(added by vanilla way) have that value -1 always anyway) cloning posting_index into the new job causes that job to be ignored --- library/modules/Job.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/library/modules/Job.cpp b/library/modules/Job.cpp index af2fcb4e8..2678eadba 100644 --- a/library/modules/Job.cpp +++ b/library/modules/Job.cpp @@ -71,6 +71,7 @@ df::job *DFHack::Job::cloneJobStruct(df::job *job, bool keepEverything) pnew->flags.bits.suspend = job->flags.bits.suspend; pnew->completion_timer = -1; + pnew->posting_index = -1; } pnew->list_link = NULL;