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:
jwinterm
2026-07-10 22:44:26 -04:00
parent 588250e5a9
commit 3eb4959e9a
2 changed files with 12 additions and 11 deletions
+10 -5
View File
@@ -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,