-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interrupt work when schedule changes #189
Comments
For now, and as an example of what I mean, I have made it work for my own JobDrivers. I've added this class (with the two private mehtods copied from JobDriver_Work):
It's not pretty, and it doesn't work for Researching, as I have to add a call to |
I'm not sure if it's correct/OK/good to post this here. It might be more of a help/discussion post that an actuall feature, as it might not be possible to implement as part of this mod... feel free to close/delete if it doesn't fit here :)
Problem description
When I set up very specific schedules, for instance research from 8-10 and then scanning 10-12, by pawn will often continue researching for up to an hour after the schedule has changed (in the example until around 11).
Describe the solution
The solution (if one exists) would make sure a job is cancelled/interrupted (if it's cancellable without a loss, like researching is, as opposed to butchering an animal, cooking) if the schedule no longer allows/prioritieses that job.
Alternatives
I'm not really sure how else to achieve the goal... I guess if it's consistent that the pawn will research for around an hour after the schedule has expired, one could simply set the schedule for researching to finish an hour before you'd want them to start another task, but I presume that it depends on some sort of "work chunk" under the hood that determines how often the pawn will check if it should find something else to do...
If it's not possible to do, because it's all defined in the research specific core code, would it at least be possible to do in custom work types / jobs? I'm not sure how to achieve that either. Would it for instance be possible to add a
FailOn
to ones own job's toil, that would fail the task if it's no longer in the pawns schedule? ... I'm not sure how one would check that...Additional materials
The text was updated successfully, but these errors were encountered: