Publishes the multi-venue plan.gigs interface C/D/B/F hang off (half-day handshake, A first). - pickVenues: seeded 2–4 shops converted in place → pub (spine end) / band_room (warehouse fringe) / rsl (off-spine); 4th = 2nd pub at far end. Registry gains weight-0 band_room+rsl kinds + venueKind/genreKey/placement. Never the openLate landmark; osm-safe fallbacks. - gigKey contract (debt #1): gigKeyFor(genreKey) => 'gig-'+genreKey, the single exported genre→bed mapping. No table anywhere; F deletes the GIG_BED bridge. - plan.gigs goes district: 7 nights × every venue, each plays a seeded 4–6 (dark reads true); cover skewed by kind; no band plays two venues on one night; custom names spread night-major. - plan.posters goes town-wide: tonight's playing venues each get frontage + seeded spine run. - Verge fix (debt #5): new corridor law roadWidth/vergeBand/poleOffset(edge) in registry.js (road-vs-verge split of edge.width, published as functions ⇒ base goldens frozen). Posters seat on the verge, never bitumen; selfcheck asserts no poster on a carriageway. - registry pub.interior 'band_room'→'pub' (unread field; avoids collision with band_room type). Gig golden re-pinned 0xa6ae5a5e→0x1f636349 (multi-venue changed output; in-commit per amendment law). selfcheck ALL GREEN 3273/3273; scaffold_check + consistency GREEN; flags-off byte-identical. CITY_SPEC §v3.0-beta + LANE_A_NOTES §Round 13 updated in this commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
2.3 KiB
JavaScript
35 lines
2.3 KiB
JavaScript
// PROCITY citygen — canonical Lane A public entry point (barrel).
|
||
//
|
||
// Consumers import the whole CityGen API from here (not from plan.js directly), e.g. Lane B's shell:
|
||
// const citygen = await import('./js/citygen/index.js'); citygen.generatePlan(seed) → CityPlan
|
||
// Keep this the stable import surface for the lane; internals may move between files behind it.
|
||
//
|
||
// (Originated as a Lane F integration shim because the shell imports ./js/citygen/index.js while the
|
||
// generator ships as plan.js; adopted here as the real Lane A entry point, per the shim's own note.)
|
||
|
||
export { generatePlan, chunkIndex, chunkKey, CHUNK, lotCorners, obbOverlap, isOpen } from './plan.js';
|
||
export { shopName, townName, bandName } from './names.js';
|
||
export { generatePlanOSM, osmTownKeys } from './plan_osm.js';
|
||
export { withGigs, gigKeyFor } from './gigs.js';
|
||
// The street-corridor law + venue vocabulary, re-exported so consumers get the whole Lane A contract
|
||
// from one import (ROUND13). `roadWidth`/`vergeBand`/`poleOffset` are the road-vs-verge split of
|
||
// `edge.width` — see the note in registry.js; `gigKeyFor` is the one and only genre→audio-key mapping.
|
||
export { SHOP_TYPES, VENUE_KINDS, genreForVenueKind, roadWidth, vergeBand, poleOffset } from '../core/registry.js';
|
||
|
||
// planSource selector (round 6; multi-town round 8). Default 'synthetic' → the byte-identical
|
||
// golden-hash generator; 'osm' → the real-data fixture importer. Lane F wires ?plansrc=osm (+ optional
|
||
// &town=<key>) to these args so the shell bootstrap picks the producer/town without B–F caring which
|
||
// ran. Unknown source → synthetic; unknown town → the default town.
|
||
import { generatePlan as _synth } from './plan.js';
|
||
import { generatePlanOSM as _osm } from './plan_osm.js';
|
||
import { withGigs as _withGigs } from './gigs.js';
|
||
export function generatePlanFor(seed, source = 'synthetic', opts = {}) {
|
||
const plan = source === 'osm' ? _osm(seed, opts.town, opts) : _synth(seed);
|
||
// v3 gig layer, gated: ?gigs=1 → shell passes { gigs:true, customBands } and we augment; otherwise
|
||
// the base plan is returned untouched (byte-identical, goldens frozen — CITY_SPEC prime flag law).
|
||
return opts.gigs ? _withGigs(plan, seed, opts) : plan;
|
||
}
|
||
|
||
// Convenience default so `citygen.default` also resolves to the (synthetic) generator.
|
||
export { generatePlan as default } from './plan.js';
|