mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-24 09:38:32 +02:00
fix(tavern): render the reliable procedural room, drop the goblin 'cat'
- The imported .tmx tavern room renders as a block-scatter in the browser (the client falls back to the walkable grid, drawing furniture/walls as generic blocks). Gate it behind TAVERN_DESIGNED_ROOM=true and default to the hand-built procedural tavern (tavernMap.js) — bar + tables + walls — which renders reliably through the theme atlas. - Remove the tavern 'cat': it used the char-goblin sprite, so it read as a green monster stuck in the wall. Gone until there's a real critter sprite.
This commit is contained in:
@@ -198,11 +198,16 @@ class SocketHandlers {
|
||||
// Load the designed tavern room (imported .tmx); fall back to the procedural map if absent.
|
||||
let tavernRoomData = null;
|
||||
const tavernRoomUrl = 'assets/kenney/tavern_room.json';
|
||||
try {
|
||||
const roomPath = require('path').join(__dirname, '../../html', tavernRoomUrl);
|
||||
tavernRoomData = JSON.parse(require('fs').readFileSync(roomPath, 'utf8'));
|
||||
} catch (e) {
|
||||
if (this.debugManager.CONSOLE_LOGGING) console.log('Tavern room JSON not found; using default map:', e.message);
|
||||
// The imported .tmx room renders as a block-scatter in the browser (the client falls back to
|
||||
// the walkable grid), so use the hand-built procedural tavern (tavernMap.js) — which renders
|
||||
// reliably through the theme atlas — by default. Opt back into the .tmx with TAVERN_DESIGNED_ROOM=true.
|
||||
if (process.env.TAVERN_DESIGNED_ROOM === 'true') {
|
||||
try {
|
||||
const roomPath = require('path').join(__dirname, '../../html', tavernRoomUrl);
|
||||
tavernRoomData = JSON.parse(require('fs').readFileSync(roomPath, 'utf8'));
|
||||
} catch (e) {
|
||||
if (this.debugManager.CONSOLE_LOGGING) console.log('Tavern room JSON not found; using default map:', e.message);
|
||||
}
|
||||
}
|
||||
this.tavernManager = new TavernManager({
|
||||
io: this.io,
|
||||
|
||||
Reference in New Issue
Block a user