buildingplan: add Pull button for linked levers #5824
Conversation
Add a Pull/Queued button next to linked levers on the "Show linked buildings" tab so a pull-lever job can be queued without navigating to the lever. Uses lever.leverPullJob from the existing lever script.
The Pull-button entry was filed under the released 53.14-r2 section; move it under # Future where unreleased changes belong.
|
Didn't realise there was a very similar PR already open. When I get a chance to circle back to this I'll take a look at the feedback that was on that other PR already because at a glance it might be repeated here. |
Pass priority=true to lever.leverPullJob so the Pull button creates a high-priority (do_now) pull-lever job instead of a normal-priority one.
When a pull-lever job is already pending, the button shows 'Queued' and is now clickable: activating it removes the job via dfhack.job.removeJob so it can be cancelled without navigating to the lever. The button stays enabled in both states and toggles between queuing and cancelling.
It looks like the other PR has been withdrawn. I'd appreciate if someone reviewed this one relative to the withdrawn one |
|
@chdoc compared to #5725 (separate overlay, duplicated layout machinery), this adds the Pull button to the existing What's left seems to be this list-row-decoration mechanism, which (as best as I can as a new contributor) I can't spot an existing framework for, and already looks to be duplicated between this and Is that what you had in mind for extraction? Not to say that it isn't worth it, but it's of course more than I had in mind. I need to check directions here before deciding what to do next. |
Add a Pull/Queued button next to linked levers on the "Show linked buildings" tab so a pull-lever job can be queued (do-now priority) without navigating to the lever. Safety/appropriateness of the job is left up to the player (e.g. no check for lever being linked to other buildings).
Feature-wise maybe not the best fit for
buildingplanoverall? Doesn't seem like a big tangent from the existingunlink_mechanismmodule though. Open to alternatives.Uses
lever.leverPullJobfrom the existing lever script. Happy to inline that though if that's risky.