Skip to content

buildingplan: add "Do now" option for planned buildings - #5954

Merged
ab9rf merged 6 commits into
DFHack:developfrom
Alistair-Afton:buildingplan-do-now
Sep 21, 2026
Merged

ab9rf merged 6 commits into
DFHack:developfrom
Alistair-Afton:buildingplan-do-now

Conversation

@Alistair-Afton

@Alistair-Afton Alistair-Afton commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements #2353: a do_job_now option at building designation time.

  • New "Do now" toggle (n) in the planner overlay, in the options
    block above "Building safety" — while on, every subsequently placed
    building's construction job gets flags.do_now set. The state persists
    in buildingplan.json like other planner options.
  • Shared buildingplan.setDoNow/getDoNow helpers; the flag lives on the
    job (which exists at designation time), so it works whether the job is
    suspended by buildingplan, suspendmanager, or not at all, and persists
    with the save — no separate tracking state needed.

Works for both buildings and constructions, since both go through the
planner. Manual material selection is also covered — the flag is applied
after addPlannedBuilding regardless of how items were chosen.

Relationship to prioritize

The prioritize overlay already exposes the same flag as "Make top
priority" for buildings with an active construction job. This feature
covers the earlier phase (designation through item collection) where the
job is still suspended and prioritize cannot reach it. A per-building
inspector toggle was considered and dropped to avoid two controls for the
same flag on one screen.

Notes for reviewers

do_now semantics (verified during the job-assignment RE documented in
DFHack/df_misc#90): it adds a flat +20,000,000 to every unit's bid on the
job's posting, so flagged buildings outbid essentially everything else —
that is the intended "drop everything and build this" behavior, matching
how the lever Pull button already uses the flag.

Test plan

  • test/plugins/buildingplan.lua — 3 tests, 15 checks, all pass
    in-game on 53.16 (flag round-trip, invalid-input handling, flag
    survives registration + doCycle)
  • Verified live: placed a Box with the flag → unsuspended and built
    within seconds
  • Overlay verified on-screen: n: Do now: On/Off row renders in the
    planner options block (initial placement at b=4 collided with the
    favorites divider row and was invisible; now at b=3, l=24)

Adds a toggle to the planner overlay that flags the construction job of
each subsequently placed building with do_now, and a toggle on the
planned-building inspector overlay to flag or unflag individual
buildings. The flag lives on the job, which exists as soon as the
building is designated, so it takes effect whenever the job is
unsuspended and persists with the save.

Closes DFHack#2353.
The b=4 slot in the planner panel's left column is the same row the
favorites divider paints across, which erased the label entirely.
Relocate to the top of the options block's right column (b=3, l=24),
which is always free and always visible.
The prioritize overlay already exposes job.flags.do_now as "Make top
priority" for active construction jobs. Gate the inspector toggle to
suspended jobs (or a disabled prioritize overlay) so the same flag is
never controlled from two places at once.
The prioritize overlay already exposes job.flags.do_now as "Make top
priority" for construction jobs, so a second control in the building
status panel would be redundant.
@ab9rf
ab9rf merged commit 143f3df into DFHack:develop Sep 21, 2026
14 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