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
develop
sv-esk 2016-03-03 21:32:16 +02:00
parent 5e2fc56621
commit d508028bcc
1 changed files with 1 additions and 0 deletions

@ -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;