@maka/maka-cli 5.49.0 → 5.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +20 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +9 -8
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.d.ts +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +27 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +43 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +6 -24
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/loot.d.ts +21 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/loot.js +93 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/loot.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.d.ts +4 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +23 -31
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.d.ts +32 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js +313 -17
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/note.d.ts +25 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/note.js +57 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/note.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +20 -3
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +9 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +13 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +66 -9
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +37 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.d.ts +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-seed-generator.js +2 -2
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +66 -19
- package/bundle/typescript/src/commands/game/sideQuest/game.js +264 -91
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless.js +17 -2
- package/bundle/typescript/src/commands/game/sideQuest/headless.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +84 -3
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +31 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +24 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +85 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +182 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +4 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +17 -7
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +17 -13
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +29 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +87 -8
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +28 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/range.d.ts +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/range.js +69 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/range.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.d.ts +186 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js +742 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-grid.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.d.ts +34 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js +536 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +273 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +890 -24
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
- package/bundle/typescript/src/commands/set/global.sub.cmd.js +18 -1
- package/bundle/typescript/src/commands/set/global.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/ai/ai.class.d.ts +1 -1
- package/bundle/typescript/src/tools/ai/ai.class.js +39 -7
- package/bundle/typescript/src/tools/ai/ai.class.js.map +1 -1
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.d.ts +1 -0
- package/bundle/typescript/src/tools/fsi/fsi.interfaces.js.map +1 -1
- package/bundle/typescript/src/tools/https/https.class.d.ts +19 -0
- package/bundle/typescript/src/tools/https/https.class.js +36 -0
- package/bundle/typescript/src/tools/https/https.class.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-grid.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/room-grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AA6B9D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,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CAAC;YACvF,CAAC;QACH,CAAC;QACD,IAAI,GAAG,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Room } from '../models/room.js';
|
|
2
|
+
import type { Player } from '../models/player.js';
|
|
3
|
+
/**
|
|
4
|
+
* The room's grid as ASCII: one block per z-level (ground always, plus
|
|
5
|
+
* any declared catwalk/balcony/mezzanine), viewer's position inverse-lit
|
|
6
|
+
* (blank when circulating -- no fixed cell to mark, per THE COMPAT
|
|
7
|
+
* RULE), other visible actors as person icons colored by allegiance
|
|
8
|
+
* (see actorGlyph), uncleared terrain as ▓ (blocking) / ▒ (cover-only,
|
|
9
|
+
* degraded), named places as ◆, vertical links as S/L/C, exits as
|
|
10
|
+
* directional arrows (U/D for up/down). A legend follows naming every
|
|
11
|
+
* glyph used. Returns [] for a spotless room (no grid ever synthesizes
|
|
12
|
+
* -- see Room.ensureGrid).
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderRoomLayout(room: Room, viewer: Player, isOtherPlayer?: (p: Player) => boolean): string[];
|
|
15
|
+
/**
|
|
16
|
+
* The compact, icon-only twin for the docked ROOM box (game.ts
|
|
17
|
+
* updateExits). Three cases, all of which draw SOMETHING as long as the
|
|
18
|
+
* player is somewhere physical:
|
|
19
|
+
* - spotted room, player positioned: the synthesized grid with their
|
|
20
|
+
* cell marked
|
|
21
|
+
* - spotted room, player circulating: the same grid with NO marker --
|
|
22
|
+
* "everywhere in the room" has no cell to claim, and inventing one
|
|
23
|
+
* would contradict the HUD
|
|
24
|
+
* - spotless room: the size-class shell (renderShellCompact)
|
|
25
|
+
* The whole room is always drawn (see frameCells) so the walls stay put
|
|
26
|
+
* as you cross it. Only the viewer's CURRENT z-level renders (a
|
|
27
|
+
* multi-level stack wouldn't fit the dock) -- the elevation bar down
|
|
28
|
+
* the right side carries the rest, and "map" draws every level in full.
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderRoomLayoutCompact(room: Room, viewer: Player, opts?: {
|
|
31
|
+
viewH?: number;
|
|
32
|
+
boxWidth?: number;
|
|
33
|
+
isOtherPlayer?: (p: Player) => boolean;
|
|
34
|
+
}): string[];
|
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
import { capitalCase } from 'change-case';
|
|
2
|
+
import { Direction } from '../types/shared/direction-enum.js';
|
|
3
|
+
import { OPEN_FLOOR, spotOf, visibleActorsIn, exitSpot, seatingIn } from './spots.js';
|
|
4
|
+
import { key, levelFootprint, dimsForSize, METERS_PER_LEVEL, } from './room-grid.js';
|
|
5
|
+
/**
|
|
6
|
+
* THE ROOM LAYOUT (spatial-viz follow-up, 2026-08-25): an ASCII top-down
|
|
7
|
+
* render of a spotted room's synthesized grid (room-grid.ts) -- the
|
|
8
|
+
* internal-layout counterpart to map-view.ts's district view. Two
|
|
9
|
+
* consumers, same split as map-view.ts:
|
|
10
|
+
* - commands/map.ts: the detailed layout plus its glyph legend
|
|
11
|
+
* - the docked ROOM box (game.ts updateExits) -- icons only, windowed
|
|
12
|
+
* and centered on the player, twin to the district box beside it
|
|
13
|
+
* A spotless room draws a plain size-class shell instead (the grid is
|
|
14
|
+
* never synthesized for one -- THE COMPAT RULE, spots.ts:14-17).
|
|
15
|
+
*
|
|
16
|
+
* Rendering runs in CELL space, not character space: every cell is an
|
|
17
|
+
* IGlyph (char + optional color) and blessed tags are applied only
|
|
18
|
+
* after windowing. The compact box slices its viewport out of the room,
|
|
19
|
+
* and slicing tagged strings mid-tag would shred them -- so colors and
|
|
20
|
+
* the camera cannot both work unless the camera moves cells, not chars.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Actor icons (player ruling 2026-08-25): SHAPE carries who someone is,
|
|
24
|
+
* not colour -- 👤 a runner (the same PLAYER_ICON commands/crew.ts uses
|
|
25
|
+
* to mark real players), ☺ a neutral NPC, ⚔ one who's fighting, 💀 one
|
|
26
|
+
* who's down (the death icon the rest of the game already speaks).
|
|
27
|
+
*
|
|
28
|
+
* WIDTH IS PART OF THE GLYPH here. 👤/💀 are astral-plane pictographs
|
|
29
|
+
* that Windows Terminal draws TWO columns wide -- ui.ts patches blessed's
|
|
30
|
+
* charWidth so it agrees -- while ☺/⚔ are BMP dingbats the terminal
|
|
31
|
+
* really does draw narrow (ui.ts calls out ⚔ staying flush by name). A
|
|
32
|
+
* cell is always two columns: a narrow glyph pads with a space, a wide
|
|
33
|
+
* one fills the cell alone. Get that wrong and every row after the icon
|
|
34
|
+
* shears sideways.
|
|
35
|
+
*/
|
|
36
|
+
const PLAYER_GLYPH = '👤';
|
|
37
|
+
const NEUTRAL_GLYPH = '☺';
|
|
38
|
+
const HOSTILE_GLYPH = '⚔';
|
|
39
|
+
/** YOUR CREW: hired runners, spirits, drones -- anyone riding your bond
|
|
40
|
+
* (Player.allyOf). Blue belongs to fellow PLAYERS, so crew take their
|
|
41
|
+
* own shape rather than a shade of someone else's (player ruling
|
|
42
|
+
* 2026-08-25: "if they can't be blue, their icon should be changed").
|
|
43
|
+
* A star reads as "yours" without pretending to be a person you can
|
|
44
|
+
* hand the controls to. */
|
|
45
|
+
const CREW_GLYPH = '★';
|
|
46
|
+
/** A CORPSE -- a body left where it fell, lootable (Room.bodies). */
|
|
47
|
+
const DEAD_GLYPH = '💀';
|
|
48
|
+
/**
|
|
49
|
+
* DOWN BUT BREATHING: knocked out, still an actor, still revivable.
|
|
50
|
+
*
|
|
51
|
+
* Was ☹, and that failed on contrast (player 2026-08-25): at one cell a
|
|
52
|
+
* frowning face and a smiling one differ by a couple of pixels of
|
|
53
|
+
* mouth, so the whole point -- upright or down? -- was unreadable. This
|
|
54
|
+
* mark contrasts by SHAPE instead. Block glyphs would have read better
|
|
55
|
+
* still, but ▓/▒ already mean terrain here, so a body cannot be one.
|
|
56
|
+
*/
|
|
57
|
+
const DOWNED_GLYPH = '☓';
|
|
58
|
+
/** Single-width stand-ins for the two wide icons, used only when the
|
|
59
|
+
* docked box has to draw a big room at one column per cell (see
|
|
60
|
+
* frameCells). Same shapes-not-colour logic: a filled face is still a
|
|
61
|
+
* person, a dagger is still a body. */
|
|
62
|
+
const NARROW_SUBSTITUTE = {
|
|
63
|
+
[PLAYER_GLYPH]: '☻',
|
|
64
|
+
[DEAD_GLYPH]: '†',
|
|
65
|
+
};
|
|
66
|
+
/** Every "at" spot wears the SAME mark (player ruling 2026-08-25:
|
|
67
|
+
* "keep locations agnostic"). Per-spot letters were tried first and
|
|
68
|
+
* scrapped -- with more spots than initials they stop matching their
|
|
69
|
+
* own names, and a B that means "booths" because "bar" took it is
|
|
70
|
+
* worse than no letter at all. The map says "there are places here";
|
|
71
|
+
* `move` and `look` are where they get named. */
|
|
72
|
+
const SPOT_GLYPH = '◆';
|
|
73
|
+
const DIR_GLYPH = {
|
|
74
|
+
[Direction.NORTH]: '▲', [Direction.SOUTH]: '▼', [Direction.EAST]: '▶', [Direction.WEST]: '◀',
|
|
75
|
+
};
|
|
76
|
+
function exitGlyph(dir) {
|
|
77
|
+
return DIR_GLYPH[dir] ?? (dir === Direction.UP ? 'U' : dir === Direction.DOWN ? 'D' : '?');
|
|
78
|
+
}
|
|
79
|
+
function verticalGlyph(kind) {
|
|
80
|
+
return kind === 'stairs' ? 'S' : kind === 'ladder' ? 'L' : 'C';
|
|
81
|
+
}
|
|
82
|
+
function buildRenderMaps(grid, room, viewer) {
|
|
83
|
+
// The whole footprint, not just the anchor: a bar three cells long
|
|
84
|
+
// draws three diamonds (see room-grid.ts spotFootprints).
|
|
85
|
+
const cellToSpot = new Map();
|
|
86
|
+
for (const [name, cells] of grid.spotFootprints.entries()) {
|
|
87
|
+
for (const c of cells)
|
|
88
|
+
cellToSpot.set(key(c), name);
|
|
89
|
+
}
|
|
90
|
+
for (const [name, c] of grid.spotCells.entries()) {
|
|
91
|
+
if (!cellToSpot.has(key(c)))
|
|
92
|
+
cellToSpot.set(key(c), name);
|
|
93
|
+
}
|
|
94
|
+
const cellToExit = new Map();
|
|
95
|
+
for (const [dir, c] of grid.exitCells.entries())
|
|
96
|
+
cellToExit.set(key(c), dir);
|
|
97
|
+
const verticalAt = new Map();
|
|
98
|
+
for (const [fromKey, link] of grid.vertical.entries()) {
|
|
99
|
+
verticalAt.set(fromKey, link.kind);
|
|
100
|
+
const [fx, fy] = fromKey.split(',').map(Number);
|
|
101
|
+
verticalAt.set(`${fx},${fy},${link.toZ}`, link.kind);
|
|
102
|
+
}
|
|
103
|
+
const cellTerrain = new Map();
|
|
104
|
+
for (const region of grid.terrain.values()) {
|
|
105
|
+
if (region.cleared)
|
|
106
|
+
continue;
|
|
107
|
+
for (const c of region.cells)
|
|
108
|
+
cellTerrain.set(key(c), region);
|
|
109
|
+
}
|
|
110
|
+
// Bodies sit in their own cells AROUND the furniture (spots.ts
|
|
111
|
+
// seatingIn) -- never inside it, and never two to a cell.
|
|
112
|
+
const seats = seatingIn(room);
|
|
113
|
+
const occupants = new Map();
|
|
114
|
+
for (const a of visibleActorsIn(room, viewer)) {
|
|
115
|
+
const c = seats.get(a.name);
|
|
116
|
+
if (!c)
|
|
117
|
+
continue;
|
|
118
|
+
const list = occupants.get(key(c)) ?? [];
|
|
119
|
+
list.push(a);
|
|
120
|
+
occupants.set(key(c), list);
|
|
121
|
+
}
|
|
122
|
+
const corpses = new Map();
|
|
123
|
+
for (const b of room.bodies)
|
|
124
|
+
corpses.set(key(b.cell), b.name);
|
|
125
|
+
return { cellToSpot, cellToExit, verticalAt, cellTerrain, occupants, corpses };
|
|
126
|
+
}
|
|
127
|
+
function paint(g) {
|
|
128
|
+
const body = g.inverse ? `{inverse}${g.ch}{/inverse}` : g.ch;
|
|
129
|
+
return g.color ? `{${g.color}-fg}${body}{/${g.color}-fg}` : body;
|
|
130
|
+
}
|
|
131
|
+
/** Renders one cell at a given column width. At TWO columns (the
|
|
132
|
+
* normal case) a wide pictograph fills the cell alone and a narrow
|
|
133
|
+
* glyph pads with a space. At ONE column -- the squeeze a big room
|
|
134
|
+
* needs to stay whole in the docked box -- wide icons fall back to
|
|
135
|
+
* their single-width stand-ins. See the icon block above. */
|
|
136
|
+
function cell(g, stride = 2) {
|
|
137
|
+
if (!g)
|
|
138
|
+
return stride === 2 ? ' ' : ' ';
|
|
139
|
+
if (stride === 1) {
|
|
140
|
+
return paint(g.wide ? { ...g, ch: NARROW_SUBSTITUTE[g.ch] ?? '*', wide: false } : g);
|
|
141
|
+
}
|
|
142
|
+
return paint(g) + (g.wide ? '' : ' ');
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* How a person reads on the map (player ruling 2026-08-25): one person
|
|
146
|
+
* icon for everybody, colored by what they are to you -- blue a fellow
|
|
147
|
+
* runner, red someone currently in a fight, white everyone else, and a
|
|
148
|
+
* skull once they're down. Hostility has no first-class flag in the
|
|
149
|
+
* model, so it's read off live combat state (`inExchange`, minus anyone
|
|
150
|
+
* who has surrendered): red means "swinging right now", which is
|
|
151
|
+
* exactly when this map is worth looking at.
|
|
152
|
+
*
|
|
153
|
+
* The VIEWER wears the runner icon like any other player, plainly --
|
|
154
|
+
* an inverse block was tried and scrapped (playtest 2026-08-25: it
|
|
155
|
+
* read as black-on-white and fought the rest of the panel).
|
|
156
|
+
*/
|
|
157
|
+
function actorGlyph(a, viewer, isOtherPlayer) {
|
|
158
|
+
// Still an actor, so still alive -- the dead are Room.bodies, drawn
|
|
159
|
+
// separately as skulls. This is someone face-down and revivable.
|
|
160
|
+
if (a.isIncapacitated())
|
|
161
|
+
return { ch: DOWNED_GLYPH, color: 'yellow' };
|
|
162
|
+
if (a === viewer)
|
|
163
|
+
return { ch: PLAYER_GLYPH, wide: true };
|
|
164
|
+
if (isOtherPlayer?.(a))
|
|
165
|
+
return { ch: PLAYER_GLYPH, wide: true };
|
|
166
|
+
// Your own people read as yours even mid-fight -- knowing which of
|
|
167
|
+
// the two figures trading shots is your rigger is the whole point.
|
|
168
|
+
if (a.allyOf === viewer.name)
|
|
169
|
+
return { ch: CREW_GLYPH, color: 'green' };
|
|
170
|
+
if (a.inExchange && !a.surrendered)
|
|
171
|
+
return { ch: HOSTILE_GLYPH, color: 'red' };
|
|
172
|
+
return { ch: NEUTRAL_GLYPH, color: 'white' };
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The glyph for one cell, in priority order: people, then terrain, then
|
|
176
|
+
* vertical links, then exits, then the spot itself.
|
|
177
|
+
*/
|
|
178
|
+
function glyphAt(c, maps, viewer, isOtherPlayer) {
|
|
179
|
+
const k = key(c);
|
|
180
|
+
const occ = maps.occupants.get(k);
|
|
181
|
+
if (occ && occ.length > 0) {
|
|
182
|
+
if (occ.includes(viewer))
|
|
183
|
+
return actorGlyph(viewer, viewer, isOtherPlayer);
|
|
184
|
+
if (occ.length === 1)
|
|
185
|
+
return actorGlyph(occ[0], viewer, isOtherPlayer);
|
|
186
|
+
// A crowded cell shows the most urgent icon standing in it: a fight
|
|
187
|
+
// outranks a runner outranks a bystander, and a body never hides
|
|
188
|
+
// someone still upright.
|
|
189
|
+
const glyphs = occ.map(a => actorGlyph(a, viewer, isOtherPlayer));
|
|
190
|
+
return glyphs.find(g => g.ch === HOSTILE_GLYPH)
|
|
191
|
+
?? glyphs.find(g => g.ch === PLAYER_GLYPH)
|
|
192
|
+
?? glyphs.find(g => g.ch === NEUTRAL_GLYPH)
|
|
193
|
+
?? glyphs[0];
|
|
194
|
+
}
|
|
195
|
+
// Nobody standing here -- but something may be lying here.
|
|
196
|
+
if (maps.corpses.has(k))
|
|
197
|
+
return { ch: DEAD_GLYPH, wide: true };
|
|
198
|
+
const terrain = maps.cellTerrain.get(k);
|
|
199
|
+
if (terrain)
|
|
200
|
+
return terrain.blocking ? { ch: '▓', color: 'red' } : { ch: '▒', color: 'yellow' };
|
|
201
|
+
const vert = maps.verticalAt.get(k);
|
|
202
|
+
if (vert)
|
|
203
|
+
return { ch: verticalGlyph(vert), color: 'magenta' };
|
|
204
|
+
const dir = maps.cellToExit.get(k);
|
|
205
|
+
if (dir !== undefined)
|
|
206
|
+
return { ch: exitGlyph(dir), color: 'cyan' };
|
|
207
|
+
const spotName = maps.cellToSpot.get(k);
|
|
208
|
+
// The OPEN FLOOR draws nothing of its own -- it is plain floor, and
|
|
209
|
+
// since reseatOpenFloor moves it to wherever the room is emptiest,
|
|
210
|
+
// a marker for it was just a dot wandering the room (playtest
|
|
211
|
+
// 2026-08-25: "I still see the marker for the 'away' point").
|
|
212
|
+
if (spotName !== undefined && spotName !== OPEN_FLOOR) {
|
|
213
|
+
return { ch: SPOT_GLYPH, color: 'yellow' };
|
|
214
|
+
}
|
|
215
|
+
return { ch: '.' };
|
|
216
|
+
}
|
|
217
|
+
/** The spots that draw as their own diamond, in seed order -- i.e.
|
|
218
|
+
* everything except a spot sitting ON an exit cell, where both
|
|
219
|
+
* renderers draw the exit arrow instead (the more actionable glyph)
|
|
220
|
+
* and the exit's own legend row names the spot. */
|
|
221
|
+
function diamondSpots(room, grid) {
|
|
222
|
+
const onExit = new Set([...grid.exitCells.values()].map(key));
|
|
223
|
+
return (room.spots ?? [])
|
|
224
|
+
.filter(s => {
|
|
225
|
+
const cell = grid.spotCells.get(s.name);
|
|
226
|
+
return cell !== undefined && !onExit.has(key(cell));
|
|
227
|
+
})
|
|
228
|
+
.map(s => {
|
|
229
|
+
const tags = [...new Set((s.tags ?? []).map(t => t.startsWith('cover') ? 'cover' : t))];
|
|
230
|
+
return `${s.name}${tags.length > 0 ? ` (${tags.join(', ')})` : ''}`;
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function levelPlansFor(room) {
|
|
234
|
+
const plans = [{ z: 0, label: 'Ground' }];
|
|
235
|
+
(room.levels ?? []).forEach((lvl, i) => plans.push({ z: i + 1, label: capitalCase(lvl.name) }));
|
|
236
|
+
return plans;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The room's grid as ASCII: one block per z-level (ground always, plus
|
|
240
|
+
* any declared catwalk/balcony/mezzanine), viewer's position inverse-lit
|
|
241
|
+
* (blank when circulating -- no fixed cell to mark, per THE COMPAT
|
|
242
|
+
* RULE), other visible actors as person icons colored by allegiance
|
|
243
|
+
* (see actorGlyph), uncleared terrain as ▓ (blocking) / ▒ (cover-only,
|
|
244
|
+
* degraded), named places as ◆, vertical links as S/L/C, exits as
|
|
245
|
+
* directional arrows (U/D for up/down). A legend follows naming every
|
|
246
|
+
* glyph used. Returns [] for a spotless room (no grid ever synthesizes
|
|
247
|
+
* -- see Room.ensureGrid).
|
|
248
|
+
*/
|
|
249
|
+
export function renderRoomLayout(room, viewer, isOtherPlayer) {
|
|
250
|
+
const grid = room.ensureGrid();
|
|
251
|
+
if (!grid)
|
|
252
|
+
return [];
|
|
253
|
+
const levelPlans = levelPlansFor(room);
|
|
254
|
+
const maps = buildRenderMaps(grid, room, viewer);
|
|
255
|
+
const rows = [];
|
|
256
|
+
for (const lvl of levelPlans) {
|
|
257
|
+
const footprint = levelFootprint(grid, lvl.z);
|
|
258
|
+
if (footprint.length === 0)
|
|
259
|
+
continue;
|
|
260
|
+
const xs = footprint.map(c => c.x), ys = footprint.map(c => c.y);
|
|
261
|
+
const x0 = Math.min(...xs), x1 = Math.max(...xs);
|
|
262
|
+
const y0 = Math.min(...ys), y1 = Math.max(...ys);
|
|
263
|
+
const exists = new Set(footprint.map(key));
|
|
264
|
+
if (levelPlans.length > 1)
|
|
265
|
+
rows.push(`{bold}${lvl.label}{/bold}`);
|
|
266
|
+
for (let y = y0; y <= y1; y++) {
|
|
267
|
+
let row = '';
|
|
268
|
+
for (let x = x0; x <= x1; x++) {
|
|
269
|
+
const c = { x, y, z: lvl.z };
|
|
270
|
+
row += exists.has(key(c)) ? cell(glyphAt(c, maps, viewer, isOtherPlayer)) : ' ';
|
|
271
|
+
}
|
|
272
|
+
rows.push(row.trimEnd());
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (rows.length === 0)
|
|
276
|
+
return [];
|
|
277
|
+
const legend = [];
|
|
278
|
+
// One row for every diamond alike -- which diamond is which is what
|
|
279
|
+
// "move" and "look" are for (the agnostic-places ruling).
|
|
280
|
+
const places = diamondSpots(room, grid);
|
|
281
|
+
if (places.length > 0) {
|
|
282
|
+
legend.push(`{yellow-fg}${SPOT_GLYPH}{/yellow-fg} places: ${places.join(', ')}`);
|
|
283
|
+
}
|
|
284
|
+
for (const dir of grid.exitCells.keys()) {
|
|
285
|
+
// Name the spot you actually stand in to leave this way -- read
|
|
286
|
+
// from the same resolver movement uses, not from cell coincidence:
|
|
287
|
+
// a spot serving SEVERAL exits (Night Market's stalls) is seated
|
|
288
|
+
// between them rather than on any one, so it shares a cell with
|
|
289
|
+
// none of them and would otherwise go unnamed here.
|
|
290
|
+
const via = exitSpot(room, dir);
|
|
291
|
+
legend.push(`{cyan-fg}${exitGlyph(dir)}{/cyan-fg} ${capitalCase(dir)} exit${via ? ` -- the ${via}` : ''}`);
|
|
292
|
+
}
|
|
293
|
+
const seenVert = new Set();
|
|
294
|
+
for (const [fromKey, link] of grid.vertical.entries()) {
|
|
295
|
+
if (seenVert.has(fromKey))
|
|
296
|
+
continue;
|
|
297
|
+
seenVert.add(fromKey);
|
|
298
|
+
const label = link.kind === 'climb' ? 'risky climb (Athletics, or a fall)' : link.kind;
|
|
299
|
+
const toLabel = levelPlans.find(l => l.z === link.toZ)?.label ?? `level ${link.toZ}`;
|
|
300
|
+
legend.push(`{magenta-fg}${verticalGlyph(link.kind)}{/magenta-fg} ${label} to the ${toLabel}`);
|
|
301
|
+
}
|
|
302
|
+
const seenTerrain = new Set();
|
|
303
|
+
for (const region of maps.cellTerrain.values()) {
|
|
304
|
+
if (seenTerrain.has(region.id))
|
|
305
|
+
continue;
|
|
306
|
+
seenTerrain.add(region.id);
|
|
307
|
+
const color = region.blocking ? 'red' : 'yellow';
|
|
308
|
+
legend.push(`{${color}-fg}${region.blocking ? '▓' : '▒'}{/${color}-fg} ${region.label}${region.blocking ? '' : ' -- cover only, not blocking'}`);
|
|
309
|
+
}
|
|
310
|
+
// People, once, only for the icons actually standing in the room --
|
|
311
|
+
// a key to four kinds of person in an empty bar is just noise.
|
|
312
|
+
const present = new Set(visibleActorsIn(room, viewer).map(a => actorGlyph(a, viewer, isOtherPlayer).ch));
|
|
313
|
+
const who = [
|
|
314
|
+
present.has(PLAYER_GLYPH) ? `${PLAYER_GLYPH} runner` : '',
|
|
315
|
+
present.has(CREW_GLYPH) ? `{green-fg}${CREW_GLYPH}{/green-fg} yours` : '',
|
|
316
|
+
present.has(NEUTRAL_GLYPH) ? `{white-fg}${NEUTRAL_GLYPH}{/white-fg} local` : '',
|
|
317
|
+
present.has(HOSTILE_GLYPH) ? `{red-fg}${HOSTILE_GLYPH}{/red-fg} fighting` : '',
|
|
318
|
+
// The knocked-out mark was missing from this key entirely -- the one
|
|
319
|
+
// glyph on the map a player is most likely to need explained.
|
|
320
|
+
present.has(DOWNED_GLYPH) ? `{yellow-fg}${DOWNED_GLYPH}{/yellow-fg} out cold` : '',
|
|
321
|
+
// Corpses are Room.bodies, not actors, so they never appear in
|
|
322
|
+
// `present` -- key them off the room itself.
|
|
323
|
+
room.bodies.length > 0 ? `${DEAD_GLYPH} dead` : '',
|
|
324
|
+
].filter(Boolean);
|
|
325
|
+
if (who.length > 0)
|
|
326
|
+
legend.push(who.join(' '));
|
|
327
|
+
const out = [...rows];
|
|
328
|
+
if (legend.length > 0)
|
|
329
|
+
out.push('', ...legend);
|
|
330
|
+
if (!spotOf(viewer))
|
|
331
|
+
out.push(`{gray-fg}(you're circulating -- no fixed spot to mark on the layout){/gray-fg}`);
|
|
332
|
+
return out;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Draws the WHOLE room as a stable frame -- no scrolling camera
|
|
336
|
+
* (playtest 2026-08-25: "moving around disjoints the map... it gets
|
|
337
|
+
* resized between the door and the bar"). A district needs a camera
|
|
338
|
+
* because it is unbounded; a ROOM is a handful of cells, so panning it
|
|
339
|
+
* only made the walls slide around under the player for no gain. Here
|
|
340
|
+
* the walls hold still and the marker moves inside them, which is what
|
|
341
|
+
* a room minimap is for.
|
|
342
|
+
*
|
|
343
|
+
* Cells are two columns while that fits, and fall back to ONE column
|
|
344
|
+
* (wide icons swapped for their narrow stand-ins) rather than start
|
|
345
|
+
* panning -- after the 2026-08-25 room resize a `large` bar is 12 cells
|
|
346
|
+
* across, and squeezing the whole room is far better than sliding a
|
|
347
|
+
* window over it. Only a room too wide even for that is clipped, from
|
|
348
|
+
* the right, anchored at the left wall; "map" always draws it whole.
|
|
349
|
+
* The block is centred inside a fixed `viewH` rows so the box height
|
|
350
|
+
* never jumps between rooms either.
|
|
351
|
+
*/
|
|
352
|
+
function frameCells(cells, availW, viewH) {
|
|
353
|
+
const width = Math.max(...cells.map(r => r.length), 0);
|
|
354
|
+
// Squeeze before you clip, and clip before you pan.
|
|
355
|
+
const stride = width * 2 <= availW ? 2 : 1;
|
|
356
|
+
const cols = Math.min(width, Math.floor(availW / stride));
|
|
357
|
+
const body = cells.map(row => {
|
|
358
|
+
let line = '';
|
|
359
|
+
for (let x = 0; x < cols; x++)
|
|
360
|
+
line += cell(row[x], stride);
|
|
361
|
+
return line.trimEnd();
|
|
362
|
+
});
|
|
363
|
+
// Vertically centre into a fixed height: a short room shouldn't sit
|
|
364
|
+
// jammed against the top while a tall one fills the box.
|
|
365
|
+
const pad = Math.max(0, viewH - body.length);
|
|
366
|
+
const top = Math.floor(pad / 2);
|
|
367
|
+
return [
|
|
368
|
+
...new Array(top).fill(''),
|
|
369
|
+
...body.slice(0, viewH),
|
|
370
|
+
...new Array(Math.max(0, pad - top)).fill(''),
|
|
371
|
+
];
|
|
372
|
+
}
|
|
373
|
+
/** Visible COLUMN width of a painted line -- needed to right-justify
|
|
374
|
+
* against it, since blessed tags occupy string length but no screen
|
|
375
|
+
* columns. UTF-16 length is the right measure for the rest: the wide
|
|
376
|
+
* pictographs are surrogate pairs (2 units) and draw 2 columns, the
|
|
377
|
+
* narrow glyphs are 1 unit and draw 1. */
|
|
378
|
+
function visibleWidth(s) {
|
|
379
|
+
return s.replace(/\{[^}]*\}/g, '').length;
|
|
380
|
+
}
|
|
381
|
+
/** Safest-first, so the elevation bar advertises the route pathing
|
|
382
|
+
* actually prefers (findPath's two-pass rule: a climb is only ever
|
|
383
|
+
* taken when nothing safer reaches). */
|
|
384
|
+
const VERTICAL_SAFETY = ['stairs', 'ladder', 'climb'];
|
|
385
|
+
/** Widest an elevation rung gets ("▶── 12m"); reserved out of the box
|
|
386
|
+
* so the grid never grows into the bar's column. */
|
|
387
|
+
const ELEVATION_WIDTH = 7;
|
|
388
|
+
/**
|
|
389
|
+
* THE ELEVATION BAR (player request 2026-08-25, "another elevation bar
|
|
390
|
+
* off to the right"): the room's z-stack as a side column, ground at
|
|
391
|
+
* the BOTTOM (it's an elevation, so it reads like one). Every level is
|
|
392
|
+
* a TICK; the level you're standing on gets the ▶ and the bar's ONE
|
|
393
|
+
* height counter, which climbs with you (0m -> 3m) as the arrow steps
|
|
394
|
+
* up a tick -- per the 2026-08-25 ruling, a label on every rung was
|
|
395
|
+
* repeating a fixed 3m scale the ticks already show. The connecting
|
|
396
|
+
* stairs/ladder/climb glyph sits between ticks, so the bar also says
|
|
397
|
+
* HOW you get up. This is the companion the compact grid needs: that
|
|
398
|
+
* grid deliberately draws only the viewer's CURRENT level, so without
|
|
399
|
+
* it nothing would say a level above even existed.
|
|
400
|
+
*
|
|
401
|
+
* Returns exactly `viewH` cells (blank where no tick falls), so callers
|
|
402
|
+
* can zip it onto the framed grid row-for-row. A flat room still
|
|
403
|
+
* renders its single ground tick -- "one floor, you're on it" is real
|
|
404
|
+
* information, and a bar that vanishes on most rooms is the same trap
|
|
405
|
+
* the spotless-room shell just fixed.
|
|
406
|
+
*/
|
|
407
|
+
function elevationColumn(grid, viewerZ, viewH) {
|
|
408
|
+
const cells = new Array(viewH).fill('');
|
|
409
|
+
const levels = grid?.dims.z ?? 1;
|
|
410
|
+
// Which kinds connect z -> z+1 (synthesis keys every link at the
|
|
411
|
+
// GROUND cell with toZ = the level it serves; see synthesizeGrid).
|
|
412
|
+
const linkKinds = new Map();
|
|
413
|
+
for (const link of grid?.vertical.values() ?? []) {
|
|
414
|
+
const set = linkKinds.get(link.toZ) ?? new Set();
|
|
415
|
+
set.add(link.kind);
|
|
416
|
+
linkKinds.set(link.toZ, set);
|
|
417
|
+
}
|
|
418
|
+
for (let z = 0; z < levels; z++) {
|
|
419
|
+
const rung = viewH - 1 - z * 2;
|
|
420
|
+
if (rung < 0)
|
|
421
|
+
break; // taller stack than the dock can show
|
|
422
|
+
// The one counter rides the arrow; every other level is a bare tick.
|
|
423
|
+
cells[rung] = z === viewerZ ? `▶── ${z * METERS_PER_LEVEL}m` : ' ──';
|
|
424
|
+
const kinds = linkKinds.get(z + 1);
|
|
425
|
+
if (kinds && rung - 1 >= 0) {
|
|
426
|
+
const kind = VERTICAL_SAFETY.find(k => kinds.has(k)) ?? 'climb';
|
|
427
|
+
cells[rung - 1] = ` ${verticalGlyph(kind)}`;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return cells;
|
|
431
|
+
}
|
|
432
|
+
/** Zips the elevation column onto the windowed grid, FLUSH RIGHT
|
|
433
|
+
* against `boxWidth` (player request 2026-08-25: "completely right
|
|
434
|
+
* justify the elevation bar"). Padding is computed on VISIBLE width,
|
|
435
|
+
* never string length -- painted cells carry blessed tags that cost
|
|
436
|
+
* string characters but no screen columns, so `.length` would shove
|
|
437
|
+
* the bar off the edge. Falls back to a single-space gap when the box
|
|
438
|
+
* is too narrow to justify into. */
|
|
439
|
+
function withElevation(windowed, elevation, boxWidth) {
|
|
440
|
+
const barWidth = Math.max(0, ...elevation.map(e => e.length));
|
|
441
|
+
if (barWidth === 0)
|
|
442
|
+
return windowed;
|
|
443
|
+
return windowed.map((line, i) => {
|
|
444
|
+
const cell = (elevation[i] ?? '').padStart(barWidth);
|
|
445
|
+
const gap = boxWidth !== undefined
|
|
446
|
+
? Math.max(1, boxWidth - visibleWidth(line) - barWidth)
|
|
447
|
+
: 1;
|
|
448
|
+
return `${line}${' '.repeat(gap)}${cell}`;
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* A SPOTLESS room's shell (THE COMPAT RULE: it never synthesizes a
|
|
453
|
+
* grid, and drawing it must not make it start) -- the room's size class
|
|
454
|
+
* as a plain footprint with its exits on the walls and the player in
|
|
455
|
+
* the middle. Most rooms in most seeds are spotless, so without this
|
|
456
|
+
* the docked Room box would sit empty nearly always and read as broken
|
|
457
|
+
* (playtest 2026-08-25: "it's still not showing" -- from Neon Strip,
|
|
458
|
+
* a spotless room, working exactly as designed and still wrong).
|
|
459
|
+
*/
|
|
460
|
+
function renderShellCompact(room, viewer, availW, viewH, boxWidth) {
|
|
461
|
+
const dims = dimsForSize(room.size);
|
|
462
|
+
const cx = Math.floor((dims.x - 1) / 2);
|
|
463
|
+
const cy = Math.floor((dims.y - 1) / 2);
|
|
464
|
+
const glyphs = new Map();
|
|
465
|
+
const wallMid = {
|
|
466
|
+
[Direction.NORTH]: [cx, 0],
|
|
467
|
+
[Direction.SOUTH]: [cx, dims.y - 1],
|
|
468
|
+
[Direction.WEST]: [0, cy],
|
|
469
|
+
[Direction.EAST]: [dims.x - 1, cy],
|
|
470
|
+
};
|
|
471
|
+
for (const dir of room.exits.keys()) {
|
|
472
|
+
const at = wallMid[dir];
|
|
473
|
+
// up/down have no wall to sit on -- they ride the near corners.
|
|
474
|
+
const [gx, gy] = at ?? (dir === Direction.UP ? [0, 0] : [0, dims.y - 1]);
|
|
475
|
+
glyphs.set(`${gx},${gy}`, { ch: exitGlyph(dir), color: 'cyan' });
|
|
476
|
+
}
|
|
477
|
+
// A spotless room is one implicit whole-room spot: the player is
|
|
478
|
+
// simply "in it", so the middle is as true a position as any.
|
|
479
|
+
glyphs.set(`${cx},${cy}`, actorGlyph(viewer, viewer));
|
|
480
|
+
const cells = [];
|
|
481
|
+
for (let y = 0; y < dims.y; y++) {
|
|
482
|
+
const row = [];
|
|
483
|
+
for (let x = 0; x < dims.x; x++)
|
|
484
|
+
row.push(glyphs.get(`${x},${y}`) ?? { ch: '.' });
|
|
485
|
+
cells.push(row);
|
|
486
|
+
}
|
|
487
|
+
return withElevation(frameCells(cells, availW, viewH), elevationColumn(undefined, 0, viewH), boxWidth);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* The compact, icon-only twin for the docked ROOM box (game.ts
|
|
491
|
+
* updateExits). Three cases, all of which draw SOMETHING as long as the
|
|
492
|
+
* player is somewhere physical:
|
|
493
|
+
* - spotted room, player positioned: the synthesized grid with their
|
|
494
|
+
* cell marked
|
|
495
|
+
* - spotted room, player circulating: the same grid with NO marker --
|
|
496
|
+
* "everywhere in the room" has no cell to claim, and inventing one
|
|
497
|
+
* would contradict the HUD
|
|
498
|
+
* - spotless room: the size-class shell (renderShellCompact)
|
|
499
|
+
* The whole room is always drawn (see frameCells) so the walls stay put
|
|
500
|
+
* as you cross it. Only the viewer's CURRENT z-level renders (a
|
|
501
|
+
* multi-level stack wouldn't fit the dock) -- the elevation bar down
|
|
502
|
+
* the right side carries the rest, and "map" draws every level in full.
|
|
503
|
+
*/
|
|
504
|
+
export function renderRoomLayoutCompact(room, viewer, opts = {}) {
|
|
505
|
+
const { viewH = 9, boxWidth, isOtherPlayer } = opts;
|
|
506
|
+
// Width left for the grid once the right-justified elevation bar and
|
|
507
|
+
// its gap are reserved.
|
|
508
|
+
const availW = Math.max(6, (boxWidth ?? 27) - ELEVATION_WIDTH - 1);
|
|
509
|
+
const grid = room.ensureGrid();
|
|
510
|
+
if (!grid)
|
|
511
|
+
return renderShellCompact(room, viewer, availW, viewH, boxWidth);
|
|
512
|
+
const mySpot = spotOf(viewer);
|
|
513
|
+
const viewerCell = mySpot ? grid.spotCells.get(mySpot) : undefined;
|
|
514
|
+
const z = viewerCell?.z ?? 0;
|
|
515
|
+
const footprint = levelFootprint(grid, z);
|
|
516
|
+
if (footprint.length === 0)
|
|
517
|
+
return renderShellCompact(room, viewer, availW, viewH, boxWidth);
|
|
518
|
+
const exists = new Set(footprint.map(key));
|
|
519
|
+
const xs = footprint.map(c => c.x), ys = footprint.map(c => c.y);
|
|
520
|
+
const x0 = Math.min(...xs), x1 = Math.max(...xs);
|
|
521
|
+
const y0 = Math.min(...ys), y1 = Math.max(...ys);
|
|
522
|
+
const maps = buildRenderMaps(grid, room, viewer);
|
|
523
|
+
const cells = [];
|
|
524
|
+
for (let y = y0; y <= y1; y++) {
|
|
525
|
+
const row = [];
|
|
526
|
+
for (let x = x0; x <= x1; x++) {
|
|
527
|
+
const c = { x, y, z };
|
|
528
|
+
row.push(exists.has(key(c)) ? glyphAt(c, maps, viewer, isOtherPlayer) : undefined);
|
|
529
|
+
}
|
|
530
|
+
cells.push(row);
|
|
531
|
+
}
|
|
532
|
+
return withElevation(frameCells(cells, availW, viewH),
|
|
533
|
+
// Circulating has no level to claim, same as it has no cell.
|
|
534
|
+
elevationColumn(grid, viewerCell ? z : undefined, viewH), boxWidth);
|
|
535
|
+
}
|
|
536
|
+
//# sourceMappingURL=room-view.js.map
|