ui/phase-21: sciences CRUD list, designer, and production-picker integration

Lights up the player-defined sciences feature: a table view with sort
and filter, a designer with four percent inputs and a strict
sum-equals-100 gate, and a Research-sub-row integration so the
planet production picker lists the user's sciences alongside the
four tech buttons. Phase 21 decisions are baked back into ui/PLAN.md
(no UpdateScience on the wire — write-once via createScience +
removeScience; percentages instead of fractions; sciences live under
the existing Research segment).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-10 21:32:37 +02:00
parent 0509f2cde2
commit 7bea22b0b5
31 changed files with 2751 additions and 71 deletions
+4 -1
View File
@@ -19,6 +19,7 @@ field with five buttons.
ReportOtherShipGroup,
ReportPlanet,
ReportRoute,
ScienceSummary,
ShipClassSummary,
} from "../../api/game-state";
import { i18n, type TranslationKey } from "$lib/i18n/index.svelte";
@@ -37,6 +38,7 @@ field with five buttons.
type Props = {
planet: ReportPlanet;
localShipClass: ShipClassSummary[];
localScience: ScienceSummary[];
routes: ReportRoute[];
planets: ReportPlanet[];
mapWidth: number;
@@ -49,6 +51,7 @@ field with five buttons.
let {
planet,
localShipClass,
localScience,
routes,
planets,
mapWidth,
@@ -221,7 +224,7 @@ field with five buttons.
{/if}
{#if planet.kind === "local"}
<Production {planet} {localShipClass} />
<Production {planet} {localShipClass} {localScience} />
<CargoRoutes
{planet}
{routes}