Multi-pawn work slots, opted into per site (#117) #137
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "117-multi-pawn-work-slots"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #117
Closes #111
Several pawns can now work one task. Each task type declares how many it can use (
max_workers(): construction and demolition 3, everything else 1). A new task opens one slot, and the player opens the rest deliberately. The full spec and the decisions from 2026-09-28 are in the spec comment on #117. The player-facing slot control was split out into #136.Changes
Task.assignees: Array[int](in claim order) replacesassignee.open_slotsstarts at 1, andmax_workers()is a virtual method rather than aconst, because GDScript has no overridable constant.set_open_slots(id, count) -> intclamps the count to1..max_workers(). Lowering it below the headcount releases the newest pawns first.claim()adds a pawn without displacing anyone. A claim on a full task, or by a pawn already on it, is refused.release(id, pawn_id)removes one pawn and emitstask_released(task, pawn_id)on every release. The task returns to PENDING only when its last pawn leaves.next_for()offers only free slots, and never relabels a task BLOCKED while pawns are on it._on_task_released()clears only the pawn that was released.remove()frees the pawn's slot through the manager. Before this, a removed pawn left its task claimed indefinitely.clear_task()now changes only the pawn's own state.workers n/open of max.BuildingType.build_daysdocstring: now says that elapsed time equals the authored figure until the player opens more slots. This meets #111's remaining criterion.Verification
3da1c50). They failed for the right reason, on the missing #117 API. I also checked them against a throwaway implementation written to the outline before handing over.clear_task()crashed on a pawn with no task. Both now have tests and are fixed.IN_PROGRESS workers 3/3 of 3.Known, not fixed here
🤖 Generated with Claude Code