fix(evennia): remove hardcoded /Users/apayne path from game engines #910

Closed
Rockachopa wants to merge 1 commits from step35/831-evennia-local-world-remove-h into main

1 Commits

Author SHA1 Message Date
step35
063458d9a9 fix(evennia): remove hardcoded /Users/apayne path from game engines
Some checks failed
Self-Healing Smoke / self-healing-smoke (pull_request) Failing after 21s
Smoke Test / smoke (pull_request) Failing after 23s
Agent PR Gate / gate (pull_request) Failing after 30s
Agent PR Gate / report (pull_request) Successful in 6s
Replace WORLD_DIR hardcoded to /Users/apayne/.timmy/evennia/timmy_world
with configurable path resolution via TIMMY_WORLD_DIR environment variable.
Default remains Path.home() / '.timmy' / 'evennia' / 'timmy_world'.

Fixes portability: works on any machine, not just Alexander's Mac.

Changes:
- evennia/timmy_world/game.py: add import os, use os.getenv()
- evennia/timmy_world/world/game.py: same change

Testing:
- tests/test_evennia_local_world_game.py: add new test
  test_world_dir_is_overrideable_by_environment()
  Verifies TIMMY_WORLD_DIR env var overrides default.

Acceptance criteria:
- [x] Replace hardcoded WORLD_DIR with config/env/pathlib resolution
- [x] Save/load behavior preserved (STATE_FILE, TIMMY_LOG still derived)
- [x] Regression test added proving overrideability

Closes #831
2026-04-26 12:28:45 -04:00