mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-23 09:08:32 +02:00
feat(tavern): proper tavern — real bar, kegs, bottles, tables+chairs, windows, rug
Used the sheet's hand-labelled roguelikeSheet_meta.json to pick the RIGHT tiles instead of guessing: - New tile kinds + coords (window, counter, keg/barrel, shelf, table, chair, crate, rug, door) in sceneModel TAVERN_LEGEND/TILE_OF + assetPacks tileMap. - tavernMap redesigned: windowed walls, a bar counter with a shelf of bottles behind it and a keg (beer!) at each end, six tables each with a chair, a central rug, corner barrels/crates, and a door. Chairs are walkable so standing on one reads as sitting. Warm wood floor color (was a dark green in the fallback). - Bartender now stands BEHIND the bar (spawn + roam confined to the row between the top wall and the counter, sealed off by it). Still TODO from feedback: a cat (no cat sprite on the sheet — needs an asset) and richer bar bottles. Suite 57 suites / 413 tests green.
This commit is contained in:
@@ -141,17 +141,25 @@
|
||||
// keep one coherent tile per kind. (TileRenderer still accepts an array here if a
|
||||
// future theme wants subtle, same-material variation.)
|
||||
tiles: {
|
||||
floor: [5, 2], // tile 119 — wood floor (uniform)
|
||||
floor2: [6, 2], // tile 120 — stone floor (accent)
|
||||
wall: [13, 12], // tile 697 — stone masonry
|
||||
|
||||
bar: [28, 0], // tile 28 — counter
|
||||
table: [20, 3], // tile 191 — table
|
||||
floor: [5, 2], // 119 — wood floor
|
||||
floor2: [6, 2], // 120 — stone floor (accent)
|
||||
wall: [13, 12], // 697 — stone masonry
|
||||
// Tavern furnishings (coords from roguelikeSheet_meta.json labels: index -> [i%57, i/57]).
|
||||
window: [42, 2], // 156 — window (in the wall)
|
||||
bar: [29, 0], // 29 — bar counter
|
||||
keg: [23, 0], // 23 — barrel / beer keg (behind the bar)
|
||||
shelf: [30, 1], // 87 — shelf of bottles (behind the bar)
|
||||
table: [27, 5], // 312 — table
|
||||
chair: [19, 3], // 190 — chair
|
||||
barrel: [23, 0], // 23 — barrel (decor)
|
||||
crate: [25, 0], // 25 — crate (decor)
|
||||
rug: [11, 16], // 923 — rug
|
||||
door: [37, 9], // 550 — door
|
||||
// Dungeon features drawn as real tiles instead of monospace glyphs.
|
||||
entrance: [37, 9], // tile 550 — door
|
||||
exit: [37, 9], // tile 550 — door
|
||||
treasure: [42, 15], // tile 897 — item
|
||||
torch: [50, 10] // tile 620 — rubble / prop
|
||||
entrance: [37, 9], // 550 — door
|
||||
exit: [37, 9], // 550 — door
|
||||
treasure: [42, 15], // 897 — item
|
||||
torch: [50, 10] // 620 — rubble / prop
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -8,14 +8,26 @@
|
||||
|
||||
// Tile kinds and how each renderer treats them (glyph for ASCII, colour for tiled/fancy).
|
||||
var TAVERN_LEGEND = {
|
||||
wall: { char: '#', color: '#20262e', solid: true },
|
||||
floor: { char: '·', color: '#0c1410', solid: false },
|
||||
bar: { char: '=', color: '#5a4632', solid: true },
|
||||
table: { char: 'o', color: '#4a3a28', solid: true }
|
||||
wall: { char: '#', color: '#3a3f4b', solid: true },
|
||||
window: { char: 'W', color: '#4a6a8a', solid: true },
|
||||
floor: { char: '·', color: '#6b4d33', solid: false }, // warm wood, not the old dark green
|
||||
rug: { char: '=', color: '#7a3b39', solid: false },
|
||||
bar: { char: '=', color: '#6a4a2a', solid: true },
|
||||
keg: { char: 'k', color: '#5a4028', solid: true },
|
||||
shelf: { char: 'h', color: '#4a3a28', solid: true },
|
||||
table: { char: 'T', color: '#6a4a2a', solid: true },
|
||||
chair: { char: 'c', color: '#5a4028', solid: false }, // walkable — stand on it to "sit"
|
||||
barrel: { char: 'B', color: '#5a4028', solid: true },
|
||||
crate: { char: 'C', color: '#7a5a38', solid: true },
|
||||
door: { char: 'D', color: '#3fb950', solid: false }
|
||||
};
|
||||
|
||||
// Layout character -> tile kind.
|
||||
var TAVERN_TILE_OF = { '#': 'wall', '.': 'floor', '@': 'floor', '=': 'bar', 'o': 'table' };
|
||||
var TAVERN_TILE_OF = {
|
||||
'#': 'wall', 'W': 'window', '.': 'floor', '@': 'floor', 'r': 'rug',
|
||||
'=': 'bar', 'k': 'keg', 'h': 'shelf', 'T': 'table', 'c': 'chair',
|
||||
'B': 'barrel', 'C': 'crate', 'D': 'door'
|
||||
};
|
||||
|
||||
var AVATAR_COLORS = { 'default': '#9aa4b2', green: '#3fb950', amber: '#d29922', red: '#f85149' };
|
||||
|
||||
|
||||
@@ -69,8 +69,9 @@
|
||||
}
|
||||
|
||||
function bartendersArea(cols, rows) {
|
||||
// Bartender roams along the top interior (bar counter row ~ y=2).
|
||||
return { minY: 1, maxY: 3, minX: 2, maxX: Math.max(5, cols - 3) };
|
||||
// Behind the bar: the row between the top wall and the counter (y=1). Sealed off by the
|
||||
// counter, so the bartender stays back there and never wanders onto the customer floor.
|
||||
return { minY: 1, maxY: 1, minX: 3, maxX: Math.max(5, cols - 5) };
|
||||
}
|
||||
function patronsArea(cols, rows) {
|
||||
// Patrons roam the middle/lower floor.
|
||||
@@ -195,8 +196,8 @@
|
||||
return { x: 1, y: 1 };
|
||||
}
|
||||
|
||||
// Bartender near the bar (top area).
|
||||
var barSpot = findFloor(Math.floor(cols / 2), 3);
|
||||
// Bartender BEHIND the bar (row 1, between the top wall and the counter).
|
||||
var barSpot = findFloor(Math.floor(cols / 2), 1);
|
||||
var bartender = makeNPC('bartender', 'bartender', 'char-merchant', barSpot.x, barSpot.y, {
|
||||
label: 'Bartender', color: '#c9a25e', role: 'bartender',
|
||||
roamArea: bartendersArea(cols, rows)
|
||||
|
||||
Reference in New Issue
Block a user