feat(ui): Phase 29 map visibility toggles
Adds the gear-icon popover on the map view with per-game persistence of every category toggle plus the wrap-mode radio. Hide-by-id and visibility-fog facilities land on the renderer so every flip applies within one frame without a Pixi remount; the wrap-mode toggle keeps its existing remount + camera-preserve path. A new server-side turn force-resets every flag to defaults so a hidden category never makes the player miss the next turn's news. Also fixes the FligthDistance → FlightDistance typo in pkg/calc/race.go (plus the single Go caller); the TS side keeps duplicating the formula until a race-level WASM bridge lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -55,8 +55,10 @@ export function buildPendingSendLines(
|
||||
report: GameReport,
|
||||
commands: readonly OrderCommand[],
|
||||
statuses: Readonly<Record<string, string>>,
|
||||
opts?: { skipPlanets?: ReadonlySet<number> },
|
||||
): LinePrim[] {
|
||||
if (commands.length === 0) return [];
|
||||
const skip = opts?.skipPlanets;
|
||||
const planetById = new Map<number, ReportPlanet>();
|
||||
for (const planet of report.planets) {
|
||||
planetById.set(planet.number, planet);
|
||||
@@ -79,6 +81,8 @@ export function buildPendingSendLines(
|
||||
// origin / range to live coordinates and the in-space track
|
||||
// renders instead.
|
||||
if (group.origin !== null || group.range !== null) continue;
|
||||
if (skip !== undefined && skip.has(group.destination)) continue;
|
||||
if (skip !== undefined && skip.has(cmd.destinationPlanetNumber)) continue;
|
||||
const source = planetById.get(group.destination);
|
||||
const destination = planetById.get(cmd.destinationPlanetNumber);
|
||||
if (source === undefined || destination === undefined) continue;
|
||||
|
||||
Reference in New Issue
Block a user