Worker slot control in the inspector (#136) #154

Merged
liamjd merged 4 commits from 136-worker-slot-control into main 2026-10-11 18:14:04 +01:00
Owner

Adds a Timberborn-style worker slot control to the inspector for construction and demolition sites.

  • Header: Workers: a / b (assignees / open slots) with - and +, which call TaskManager.set_open_slots(). - is disabled at 1 and + at the task's maximum.
  • Grid: two columns, one WorkerSlot per worker the task can take. Each slot is closed, open or occupied, and occupied slots show the pawn's id. Occupied slots come first, in claim order, then open, then closed. Slots only display; clicking them does nothing.
  • When it shows: only for a building whose task takes more than one worker, so not for pawns or tasks with one worker. It refreshes on every tick through the panel.
  • The look is a placeholder until the art in #21.

Verification

  • Full GUT suite: 44 scripts, 977 tests, 976 passing plus 1 pending (the long-standing one).
  • test/unit/test_worker_slot_section.gd has 29 tests, written to the spec before the implementation.
  • The #152 section tests now count relative to the scene, rather than assuming the panel holds one section.
  • Headed check with tools/screenshot_worker_slots.gd: the grid sits under the header, and occupied and closed slots render.

Closes #136

🤖 Generated with Claude Code

Adds a Timberborn-style worker slot control to the inspector for construction and demolition sites. - **Header:** `Workers: a / b` (assignees / open slots) with `-` and `+`, which call `TaskManager.set_open_slots()`. `-` is disabled at 1 and `+` at the task's maximum. - **Grid:** two columns, one `WorkerSlot` per worker the task can take. Each slot is closed, open or occupied, and occupied slots show the pawn's id. Occupied slots come first, in claim order, then open, then closed. Slots only display; clicking them does nothing. - **When it shows:** only for a building whose task takes more than one worker, so not for pawns or tasks with one worker. It refreshes on every tick through the panel. - The look is a placeholder until the art in #21. ## Verification - Full GUT suite: 44 scripts, 977 tests, 976 passing plus 1 pending (the long-standing one). - `test/unit/test_worker_slot_section.gd` has 29 tests, written to the spec before the implementation. - The #152 section tests now count relative to the scene, rather than assuming the panel holds one section. - Headed check with `tools/screenshot_worker_slots.gd`: the grid sits under the header, and occupied and closed slots render. Closes #136 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Tests for WorkerSlot's three states, WorkerSlotSection.slot_states(),
applies_to/refresh, the +/- buttons and the section in the panel, plus a
headed screenshot harness. The #152 section tests now count relative to
the scene rather than assuming one section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Timberborn-style control for construction and demolition sites:
"Workers: a / b" with - and +, over a two-column grid of slots that show
closed, open or occupied (with the pawn's id). Slots only display; the
buttons call TaskManager.set_open_slots(). Placeholder look until #21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
liamjd merged commit 26e9066541 into main 2026-10-11 18:14:04 +01:00
liamjd deleted branch 136-worker-slot-control 2026-10-11 18:14:11 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liamjd/UntitledColonyBuilder!154
No description provided.