job-related hooks are the top priority. This API may be sufficient:
// called after a new job object is inserted in the jobs linked list
void dfhooks_on_job_created(df::job *job);
// called after a job is assigned to a unit
void dfhooks_on_job_assigned(df::job *job, df::unit *unit);
// called after job is completed, but before the job object is destroyed or reused for a repeat job
enum JobCompletionStatus {
UNKNOWN = -1,
SUCCESS,
ABANDONED, // e.g. due to missing items, etc.
CANCELED_BY_PLAYER
};
void dfhooks_on_job_completion(df::job *job, JobCompletionStatus completion_status);
job-related hooks are the top priority. This API may be sufficient: