Skip to content

prioritize: add 'this' action to absorb do-job-now - #1615

Merged
ab9rf merged 4 commits into
DFHack:masterfrom
Alistair-Afton:prioritize-this
Sep 22, 2026
Merged

ab9rf merged 4 commits into
DFHack:masterfrom
Alistair-Afton:prioritize-this

Conversation

@Alistair-Afton

@Alistair-Afton Alistair-Afton commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New prioritize this action applies the boost to whatever is selected in the UI: job, item, building, unit, plant, or work order (DFHack/dfhack#4206). do-job-now.lua is now a thin forwarder to the new action, so existing keybindings keep working.

Also fixes a latent crash: get_selected_work_order now nil-checks viewscreen type descriptors, which are unavailable at the title screen (the original do-job-now crashed the same way).

Repaired the dormant test/prioritize.lua suite, which had silently rotted since fba07a4 (job-list iteration, denylist warnings, num_prioritized removal): updated the mocks to the current contract and re-enabled it via config.target — 32 tests, 668 checks.

Testing

  • test -t prioritize: 32/32 tests, 668/668 checks pass in-game
  • Live fort: prioritize this and do-job-now both flag a real job do_now
  • Title screen: clean error instead of nil-index crash
  • ci/lint.py clean

Alistair-Afton and others added 3 commits September 15, 2026 02:59
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
@ab9rf
ab9rf merged commit fb6812a into DFHack:master Sep 22, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants