Skip to content

Add overlay to queue lever pull jobs from linked building view#5725

Open
pajawojciech wants to merge 7 commits into
DFHack:developfrom
pajawojciech:levers
Open

Add overlay to queue lever pull jobs from linked building view#5725
pajawojciech wants to merge 7 commits into
DFHack:developfrom
pajawojciech:levers

Conversation

@pajawojciech
Copy link
Copy Markdown
Contributor

@pajawojciech pajawojciech commented Feb 26, 2026

How it works

  • New overlay display button next to lever in 'Show linked buildings' tab.
  • Button show lever status indicator: slash or backslash, representing current position of lever.
  • Button adds / removes pull lever jobs
  • Works fine even with more than one linked levers.
obraz

Click button

After click text changes to "Pulling" with yellow color, and job is queued. Now you can click again if you change your mind - it removes queued job.
obraz

obraz

Job assigned

When job is assigned text changes color to green:
obraz
obraz

Pulled

After pull text, color and indicator changes
obraz

When Unlink is enabled button moves to the left

obraz

What I tried

Instead of pull text i tried to set Open / opening / close / closing labels. For standard bridges it works fine, but for example retracting bridges or cages should have reversed operation naming, so I use 'Pull' text and lever position indicator

Issue

#3938

@chdoc chdoc added this to 53.10-r2 Apr 7, 2026
@github-project-automation github-project-automation Bot moved this to Needs review in 53.10-r2 Apr 7, 2026
@chdoc chdoc self-requested a review April 7, 2026 11:37
@chdoc
Copy link
Copy Markdown
Member

chdoc commented Apr 7, 2026

I like the idea. However, I don't see any reason why this should be extending the buildingplan tool. In fact, I don't see why this couldn't be in scripts, for instance as part of the lever tool.

@pajawojciech
Copy link
Copy Markdown
Contributor Author

I like the idea. However, I don't see any reason why this should be extending the buildingplan tool. In fact, I don't see why this couldn't be in scripts, for instance as part of the lever tool.

Thanks for review.
I made it this way because overlay reuses code from unlink_mechanisms.lua file (for example mech_iter, get_trigger_index and more). Also one new and two old overlays share the same screen space (and pull overlay checks whether unlink is enabled for good positioning), so splitting them would create duplicated code and fragille coordination.
Can scripts register overlay widgets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

2 participants