Code Farm: add front-view server rack and API-backed terminal

This commit is contained in:
2026-10-19 21:32:45 +02:00
parent 7274cc1840
commit 8155f394bd
18 changed files with 1375 additions and 98 deletions
+4
View File
@@ -201,6 +201,10 @@ old eRepublik battles: settle tabs-versus-spaces by showing up daily and fightin
The **Code Farm** (`/game`) is a cooperative idle game in the spirit of Farmville, themed for developers. Each member owns a farm of plots and plays asynchronously - nothing has to happen in real time.
The game presents plots as individual servers in one front-view rack. Select a server to spin up a workload from the right-hand card picker, watch its build progress, and harvest the result. Buying a plot installs the next server, up to the existing twelve-server limit. Cooling reflects the Build Cache perk, networking reflects the CI tier, and power reflects the Optimizer perk; installed infrastructure also lights up the rack. These are visual representations of the existing upgrades and rules. Keyboard navigation, mobile controls, and the server-rendered no-JavaScript forms are supported.
The rack's **control terminal** supports every current game API route. Try `help`, `servers`, `plant 3 python`, `harvest all`, or `ci upgrade`; server numbers match the rack (1–12). Up/Down recalls commands and Tab completes commands and upgrade keys. `api` lists the route coverage, while `state` exposes the full JSON snapshot. Terminal commands and page controls share the same action handler and backend permissions. Refactoring, raids, infrastructure/cosmetic purchases, and defense downgrades retain confirmation dialogs. The terminal keeps drafts and history through live refreshes and reports actual control actions and completed builds.
- **Plant.** Plant a software project (a shell script, Python script, web app, Go service, Rust engine, compiler, or kernel) in an empty plot for a coin cost. Higher-tier crops unlock as your farm level rises.
- **Build and harvest.** A planted crop builds over real time; when the build finishes, harvest it for coins and XP. Harvesting also awards site XP and the **Green Thumb** / **Master Farmer** badges.
- **Upgrade CI.** Spend coins to raise your CI tier (Local Build through Distributed Cache); each tier makes every build faster.