prioritize: add 'this' action to absorb do-job-now - #1615
Open
Alistair-Afton wants to merge 1 commit into
Open
Alistair-Afton wants to merge 1 commit into
Alistair-Afton wants to merge 1 commit into
Conversation
prioritize_this() runs the do-job-now selection cascade (job, item, building, unit, plant, work order) and boosts the related job. The do-job-now script now forwards to it, preserving existing keybindings. Selection getters are module-level so tests can mock them. Enabling config.target for the test file reactivated dormant tests written for the pre-fba07a4 posting-based implementation; they are updated to the current job-list iteration and matcher schema, and dig/smooth job types are covered by a denylist warning test instead of watch expectations. fixes DFHack/dfhack#4206
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New
prioritize thisaction applies the boost to whatever is selected in the UI: job, item, building, unit, plant, or work order (DFHack/dfhack#4206).do-job-now.luais now a thin forwarder to the new action, so existing keybindings keep working.Also fixes a latent crash:
get_selected_work_ordernow nil-checks viewscreen type descriptors, which are unavailable at the title screen (the originaldo-job-nowcrashed the same way).Repaired the dormant
test/prioritize.luasuite, which had silently rotted since fba07a4 (job-list iteration, denylist warnings,num_prioritizedremoval): updated the mocks to the current contract and re-enabled it viaconfig.target— 32 tests, 668 checks.Testing
test -t prioritize: 32/32 tests, 668/668 checks pass in-gameprioritize thisanddo-job-nowboth flag a real jobdo_nowci/lint.pyclean