/** * Where the shipped buildings stand, separately from the buildings themselves. * * An `Office` pack carries its own `site`, and that is still the authority — a * pack handed over HTTP by a self-hoster brings its site with it and never * touches this file. What this file exists for is the one question the *city* * asks, which a pack cannot answer without being loaded: **where are the * buildings I could walk into?** * * The office packs are deliberately lazy chunks. `lumbridge-hq` alone is 25 kB * of furniture and floor plan, and the whole point of `loadOffice`'s dynamic * import is that a visitor who only ever looks at the city never pays for it. * But the city wants to draw a marker on the two buildings the moment the board * appears, which is long before anybody has opened a door — so importing a pack * to read four numbers off it would put the entire catalogue back in the entry * chunk and undo the split. * * Hence a tiny eagerly-imported module holding just the coordinates, and each * pack importing its own site **from here** rather than declaring it inline. One * source of truth, and the direction of the dependency is the safe one: the * small thing does not know about the large one. */ import type { OfficeSite } from "../interiors/types.ts"; /** * High in a Transbay tower. See `lumbridge-hq.ts` for what the four numbers mean * and why `heading` is the one that decides whether the sun ever gets in. */ export const LUMBRIDGE_HQ_SITE: OfficeSite = { lat: 37.7897, lng: -122.3972, elevation: 188, heading: 205, label: "Transbay, San Francisco", }; /** A hangar on the old naval air station. See `frontier-valley.ts`. */ export const FRONTIER_VALLEY_SITE: OfficeSite = { lat: 37.7756, lng: -122.3186, elevation: 4, heading: 0, label: "Alameda Point", }; /** * Every building this build can walk into, for the city to point at. * * `id` matches the pack's own `Office.id` and the `OFFICES` table in `main.ts`, * which is what lets a click on a marker resolve to a door. Keeping the three in * step is not enforced by the type system; it is enforced by there being exactly * two of them and by `office.test.ts` asserting that each pack's site is the one * named here. */ export const OFFICE_SITES: { id: string; name: string; site: OfficeSite }[] = [ { id: "lumbridge-hq", name: "Lumbridge HQ", site: LUMBRIDGE_HQ_SITE }, { id: "frontier-valley", name: "Frontier Valley", site: FRONTIER_VALLEY_SITE }, ];