diff --git a/AGENTS.md b/AGENTS.md index ad2340c..089f42a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -163,3 +163,17 @@ use the native BGS mechanism: declared as `expansions: [{ name, label }]` on the gameinfo doc, the chosen names arrive in `wrapper.init`'s `expansions: string[]` param and the wrapper maps `kicker` onto the internal `options.kicker` flag (also kept working for games created back when it was a checkbox option). + +## BGS publication and Git delivery + +Whenever changes are published to BGS, commit the corresponding source, tests, +dependency/lockfile changes and version bumps, then push them to this repository's +`main` or `master` release branch in the same task. A BGS upload or a push only to +a feature branch does not complete delivery. This is standing authorization to +commit and push published changes without asking for separate confirmation. + +Fetch and integrate the latest release-branch changes, run the relevant repository +checks, and push without force. Update any public mirrors required by this repo's +existing workflow too. Keep credentials, generated artifacts excluded by the repo, +and unrelated unfinished work out of the commit. Verify the remote branch contains +the delivered commit and report any blocker instead of claiming delivery. diff --git a/packages/viewer/colony-preview.html b/packages/viewer/colony-preview.html new file mode 100644 index 0000000..1bf1981 --- /dev/null +++ b/packages/viewer/colony-preview.html @@ -0,0 +1,33 @@ + +Outpost — colony design preview + +
+ diff --git a/packages/viewer/src/App.svelte b/packages/viewer/src/App.svelte index 8112644..2ef4bef 100644 --- a/packages/viewer/src/App.svelte +++ b/packages/viewer/src/App.svelte @@ -10,6 +10,7 @@ import LogFeed from "./lib/LogFeed.svelte"; import ChatPanel from "./lib/ChatPanel.svelte"; import SpaceScene from "./lib/SpaceScene.svelte"; + import ColonyScene from "./lib/ColonyScene.svelte"; interface Props { store: ViewerStore; @@ -20,7 +21,7 @@ const state = $derived(store.state); - + {#if state}
@@ -57,6 +58,9 @@
+ {#if store.preferences.showColony !== false} + + {/if} {:else} diff --git a/packages/viewer/src/dev.ts b/packages/viewer/src/dev.ts index b0e2221..43009fc 100644 --- a/packages/viewer/src/dev.ts +++ b/packages/viewer/src/dev.ts @@ -18,7 +18,17 @@ if (kicker) { } const emitter = window.outpost.launch("#app"); -mountSoundTests((sound) => emitter.emit("preferences", { sound })); +const previewPreferences = { sound: true, showColony: true }; +mountSoundTests( + (sound) => { + previewPreferences.sound = sound; + emitter.emit("preferences", { ...previewPreferences }); + }, + (showColony) => { + previewPreferences.showColony = showColony; + emitter.emit("preferences", { ...previewPreferences }); + } +); startDevBackend(emitter, { players, seed, auto, delayMs, gameOptions }); (window as unknown as { outpostDev?: unknown }).outpostDev = { diff --git a/packages/viewer/src/lib/ColonyBuilding.svelte b/packages/viewer/src/lib/ColonyBuilding.svelte new file mode 100644 index 0000000..b2c505b --- /dev/null +++ b/packages/viewer/src/lib/ColonyBuilding.svelte @@ -0,0 +1,313 @@ + + + + {#if type === "ore"} + + + + {:else if type === "water"} + + + + {:else if type === "titanium"} + + + + {:else if type === "research"} + + + {:else if type === "newChemicals"} + + + + + {:else if type === "dataLibrary"} + + + + {:else if type === "warehouse"} + + + {:else if type === "heavyEquipment"} + + + + {:else if type === "nodule"} + + + + {:else if type === "scientists"} + + + + + {:else if type === "orbitalLab"} + + + + + {:else if type === "robots"} + + + + {:else if type === "laboratory"} + + + + {:else if type === "ecoplants"} + + + + {:else if type === "outpost"} + + + + {:else if type === "spaceStation"} + + + + {:else if type === "planetaryCruiser"} + + + + + + + {:else if type === "moonBase"} + + + + {:else if type === "iceProspector"} + + + + {:else if type === "robotPrototype"} + + + {:else if type === "smelter"} + + + + {:else if type === "wilyTrader"} + + + {:else if type === "launchFacility"} + + + + {:else if type === "merchantHouse"} + + + + {:else if type === "ncfPrototype"} + + + + {:else if type === "refinery"} + + + + + {:else if type === "biosphere"} + + + + {/if} + {#if resource && marks[type]} + + {/if} + + + diff --git a/packages/viewer/src/lib/ColonyScene.svelte b/packages/viewer/src/lib/ColonyScene.svelte new file mode 100644 index 0000000..732762b --- /dev/null +++ b/packages/viewer/src/lib/ColonyScene.svelte @@ -0,0 +1,685 @@ + + +{#snippet building(site: Site, number: number)} + + + + + + + {String(number).padStart(2, "0")} +{/snippet} + +
+
+
+ Colony surface{String(seat + 1).padStart(2, "0")} +
+
+ +
+
+ +
+
+
+ {player.name} + + + {working}/{player.factories.length} + +
+ + + + + + + + + + + + + {#each visible as site, i (site.id)} + {@const x = 345 + (i % 4) * 91 - Math.floor(i / 4) * 155} + {@const y = 119 + (i % 4) * 39 + Math.floor(i / 4) * 80} + (selected = site.id)} + onkeydown={(e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault(); + selected = site.id; + } + }} + > + {@render building(site, currentPage * 8 + i + 1)} + + {/each} + +
OUTPOST / {String(gameState.round).padStart(3, "0")}
+
+ {#if pages > 1} + + {/if} +
+ +
+
+ {#if focused} + + {#if focused.resource}{:else}{/if} + {focused.name} + + {#if focused.factory} + + + {focused.working ? "Operating" : "Idle"} + + {/if} + {focused.points} VP{focused.factory ? " when staffed" : ""} + {focused.factory ? "Build cost" : "Minimum bid"}: ◈ {focused.price} +
+ {#if focused.factory} + {@const type = focused.type as FactoryType} + {@const spec = FACTORIES[type]} +

+ + Produces 1 {focused.name} card per round when staffed, worth ◈ {MIN_CARD_VALUE[type]}–{MAX_CARD_VALUE[ + type + ]}. +

+

+ {focused.working + ? "Operated by one colonist or robot." + : "No operator assigned. This factory produces no cards and scores no VP until staffed."} +

+ {#if MEGA_CARDS[type]}

+ Every 4 staffed {focused.name} factories can produce one Mega card worth ◈ {MEGA_CARDS[type]!.value} instead + of 4 singles. +

{/if} + {#if spec.requires}

+ Building this factory requires {UPGRADE_SPECS[spec.requires].name}. +

{/if} + {#if spec.needsResearchCard}

+ Building this factory requires at least one Research card in the payment. +

{/if} + {:else if focused.effect} +

+ {#if focused.resource}

Production is automatic; no colonist or robot is needed.

{/if} + {/if} +
+ {:else}Select a building to inspect it.{/if} +
+
+
+ + diff --git a/packages/viewer/src/lib/SpaceScene.svelte b/packages/viewer/src/lib/SpaceScene.svelte index 6c41778..32c452d 100644 --- a/packages/viewer/src/lib/SpaceScene.svelte +++ b/packages/viewer/src/lib/SpaceScene.svelte @@ -1,245 +1,5 @@