#1590

make_game: export both texture pools when basenames collide

Openanusara-bemalwants to merge intofrom

make_game.assets() builds a pool's output folder from the source basename only, and rpf9dump does the same (tools/rpf9dump/Program.cs:11-12). Two distinct pools with the same basename under one destination namespace — e.g. data/ttdb/A/pool.ttpf and data/ttdb/B/pool.ttpf — therefore share out/ttpf/pool/. The second pool finds the first pool's manifest.json, skips the exporter, and complete_pool() returns (0,0): its DDS files are never produced, with no warning and a successful build. Sorting is by file size, so which pool wins depends on the install.

Confirmed on main 99f99890 with two synthetic pools: only A/pool.ttpf was exported.

Fix

Group pools by (destination namespace, case-normalized basename). When a group has more than one member, give each a stable export root dest/<name>~<sha256(relative source path)[:12]>, and pass that root to rpf9dump; complete_pool() then reads the manifest from <root>/<name>. Unique pools keep their existing path and are not re-exported, so current builds are unaffected. Colliding pools re-export once into their new folders.

Fixes the new item claimed in #1380 (comment).

Tests

  • New tests/test_make_game_assets_pools.py (4 synthetic tests): both colliding pools export to distinct folders, a resumed build exports neither again, a unique pool keeps the old path, and same-name pools in different packs stay separate.
  • python -I tests/test_make_game_assets_pools.py -v — 4/4 pass.
  • python -m unittest discover -s tests -p 'test_make_game*.py' — 248 tests; the 4 failures are pre-existing GameDiscoveryTest.test_find_* path-separator failures, verified identical on unmodified main in a clean worktree.
  • python -m compileall -q make_game.py tests/test_make_game_assets_pools.py and python -I make_game.py --help — clean.
  • No game files, GPU, driver or network involved.

AI-assisted (OpenCode). No game data in this PR.