mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-18 06:41:27 +02:00
The engine behind 'add more 2D tilesets / iso packs / 3D skins as products'. A pack is a self-contained render environment for a projection (topdown/iso/3d); because scenes are kind-based, the SAME pack renders both town and dungeon (interchangeable), and each maps to a catalog id (monetizable, entitlement-gated). - packRegistry.js: registerPack / packsForProjection / unlockedPacks (canUsePack) / activePackId (saved-if-unlocked else first unlocked) / setActivePack / activePackAssets. Per-projection active-pack selection, persisted. In-memory store fallback so it's testable under Node. - assetPacks: registers the 3 built-ins (roguelike-interior topdown, iso-dungeon, kenney-3d-characters) + activeIsoAssets()/activeThreeAssets() resolvers; RK.theme() now defaults to the active topdown pack. - isoRenderer + avatarVisuals (iso/3d character lookup) read the ACTIVE pack. - packRegistry loaded before assetPacks in tavern + game. Backward-compatible: one pack per projection resolves to today's defaults — nothing changes visually. Adding a pack now = registerPack(...) + assets + a catalog row. Tests: +5 (register/list, unlock filter, active/saved/fallback, refuse locked). Suite 58 suites / 419 tests green.