import { content, type Location } from "@deadhead/content"; import { Link } from "react-router"; import { useClock } from "../clock/clock"; import { cargoName, formatCredits, formatMillionKm } from "../format"; import { distanceAt } from "../game"; import { errorMessage, useGameAction, useLoadedPlayer } from "../state/actions"; const TYPE_LABELS: Record = { "atmospheric-world": "Atmospheric world", "airless-body": "Airless body", "cloud-platform": "Cloud platform", "belt-station": "Belt station", }; /** What a bay is for (CR-002: bays are HQs, not access to contracts). */ export const HQ_EXPLANATION = "Open an HQ here: hire pilots and take delivery of new ships at this location."; const LANDING_LABELS = { vacuum: "Any ship", atmospheric: "Atmospheric", hardened: "Hardened" }; /** Every location; details, contracts and HQ leasing once discovered (Steps 9.9, 10B.9). */ export function Locations() { const state = useLoadedPlayer(); const now = useClock((s) => s.now); const lease = useGameAction("leaseBay"); return (

Locations

{lease.isError && (

{errorMessage(lease.error)}

)}
); }