Skip to content

feat: add a torch to the starting home#493

Merged
dmccoystephenson merged 1 commit into
mainfrom
feat/torch-in-starting-home
Jun 22, 2026
Merged

feat: add a torch to the starting home#493
dmccoystephenson merged 1 commit into
mainfrom
feat/torch-in-starting-home

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • Follow-up to the new-world starting home (Generate starting home and grant starting items on new world #491). The home (Oak Wood walls, wood floor, doorway, bed, chest) had no light source — this adds a torch inside it.
  • StartingHomeGenerator.generate now places a Torch on the bottom-left interior corner (left+1, bottom-1). The bed and chest occupy the two top corners, so the torch corner is free / collision-free.
  • Torch is already registered in roomJsonReaderWriter.py, so the home (torch included) persists across save/reload.

Test plan

  • python3 -m compileall src -q clean
  • SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy python3 -m pytest → 930 passed (was 929; +1)
  • New test_torch_is_placed_on_a_free_interior_corner asserts the torch at (6,10) in a 17×17 room and no collision with bed/chest
  • black clean on changed files

Closes #492

🤖 Generated with Claude Code

The new-world starting home now includes a Torch on a free interior
corner (left+1, bottom-1), distinct from the bed/chest top corners, so
the starting shelter has a light source. Torch is already registered in
roomJsonReaderWriter, so it persists across save/reload.

Closes #492

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (reviewed by Claude; CI green on head):

  • Scope: PASS — only startingHomeGenerator.py, its test, and CHANGELOG.md changed; all serve Add a torch to the starting home #492.
  • Tests-new: PASS — test_torch_is_placed_on_a_free_interior_corner exercises the new placement and asserts no bed/chest collision.
  • Tests-fix: N/A — feature addition, not a bug fix.
  • Sibling structure: PASS — new test mirrors the existing furniture/floor tests in the same file.
  • Docs: PASS — CHANGELOG.md updated (summary row + dated AI-session entry); no other doc source references home contents.
  • Issue resolution: PASS — Add a torch to the starting home #492's named surface (StartingHomeGenerator.generate, torch placement, persistence, test) is changed.
  • CI: PASS — package, package-macos, test, windows-installer all green on the head SHA.
  • No @Property / no new print() / no container import in class files: PASS — grep of added lines returns none.
  • DI discipline: PASS — no DI-managed construction touched.
  • Vendored lib untouched: PASS — no src/lib/ files in the diff.
  • Markdown fences: PASS — CHANGELOG entries use inline backticks only, no triple-backtick blocks.
  • Schema sync: N/A — no JsonReaderWriter serialization changed (Torch was already registered).

Note: the box's python is Python 2.7; tests were run with python3 (matches CI/CLAUDE.md). Filed as a dev-loop learning-log note.

@dmccoystephenson dmccoystephenson merged commit 519f42b into main Jun 22, 2026
4 checks passed
@dmccoystephenson dmccoystephenson deleted the feat/torch-in-starting-home branch June 22, 2026 04:40
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.

Add a torch to the starting home

1 participant