Add win condition: all items placed -> completion state #9

Merged
scruffydude merged 1 commit from task/4-win-condition into main 2026-10-01 17:51:11 -04:00
Owner

armory.gd tracks items in the items group and listens to each one's placed_changed signal (#3). Once the placed count equals the total, it emits level_complete and shows a minimal All items placed! overlay (CanvasLayer + ColorRect + Label). Picking an item back up drops the count below total and hides the overlay again.

Validated with a disposable headless SceneTree test: overlay hidden at 1/3 and 2/3, level_complete fires and overlay shows at exactly 3/3, un-placing afterward hides it again.

Closes #4

`armory.gd` tracks items in the `items` group and listens to each one's `placed_changed` signal (#3). Once the placed count equals the total, it emits `level_complete` and shows a minimal `All items placed!` overlay (CanvasLayer + ColorRect + Label). Picking an item back up drops the count below total and hides the overlay again. Validated with a disposable headless SceneTree test: overlay hidden at 1/3 and 2/3, `level_complete` fires and overlay shows at exactly 3/3, un-placing afterward hides it again. Closes #4
armory.gd now counts items in the "items" group and listens to each
one's placed_changed signal (#3). When the placed count reaches the
total, it emits a level_complete signal and shows a simple
"All items placed!" overlay (CanvasLayer + ColorRect + Label). The
overlay hides itself again if an item gets picked back up, so a
false win state can't get stuck on screen.

Verified with a disposable headless SceneTree test script: overlay
stays hidden at 1/3 and 2/3 placed, level_complete fires and the
overlay shows at exactly 3/3, and un-placing an item afterward hides
it again.

Closes #4

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
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
scruffydude/project-awry!9
No description provided.