Publishes the gig interface the whole round hangs off (A runs first). Everything is
behind ?gigs=1 as a POST-HOC augmentation (gigs.js withGigs, applied by the selector),
so generatePlan is untouched and all v2 goldens stay frozen (synthetic 0x3fa36874, osm
melbourne 0x34cfdec0, katoomba 0x0f652510). Source-agnostic (synthetic + osm).
- Venue: one 'pub' per town — a spine-end plain shop converted in place (keeps lot
id/geometry, enterable), shop.venue=true, never the openLate landmark. Registry gains
a weight-0 'pub' type (interior:'band_room' for Lane C) → never auto-placed → base
plan byte-identical.
- plan.gigs: 7 nightly {gigId,venueShopId,bandName,genreKey:'pubrock',night,startSeg:5,
endSeg:5,cover}; cover ~half free / half $2-$10 (F charges at the door).
- Band names: bandName(seed) generator (90s pub-rock) + OPTIONAL web/assets/custom_bands.json
drop-in (priority into the pool; absent → pure generator, no fetch under ?noassets).
- plan.posters: ~6 seeded {id,gigId,x,z,ry} for Lane B.
- Closing-time debt paid: isOpen(shopOrHours,hour) exported (half-open law as code, D consumes).
- map.html?gigs=1: venue ring + poster pins + gig panel line. Flags-off unchanged.
Self-check ALL GREEN 3074/3074 (gigSuite ×2 sources, flags-off≡base, gig golden
0xa6ae5a5e). qa.sh --strict GREEN 6/6. Verified in-browser both modes. CITY_SPEC v3
section + LANE_A_NOTES handshake for C/D/B/F. Atomic pathspec commit (shared-tree race).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
1.9 KiB
JavaScript
31 lines
1.9 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 } from './gigs.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';
|