mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:50:43 +00:00
3a8249dfd1
## Summary Adds a new **Structure icon size** option to `GraphicsOverrides`, exposed as a slider in the Graphics Settings modal. Players can now scale how large structure icons are drawn on the map. ## Changes - **`GraphicsOverrides.ts`** — add `iconSize: z.number()` to the `structure` override schema. - **`RenderOverrides.ts`** — apply the override onto `settings.structure.iconSize` (consumed by `StructurePass`/`StructureLevelPass` shaders). - **`GraphicsSettingsModal.ts`** — add a slider (range 20–120, step 5) in the "Structure Icons" section, with getter/handler following the existing pattern. Falls back to the `render-settings.json` default of 60 when unset. - **`resources/lang/en.json`** — add `icon_size_label` / `icon_size_desc` (English only, per i18n rules). - **`tests/GraphicsOverrides.test.ts`** — schema-validation cases plus application tests (override sets the value; absence keeps the default). The setting persists via the existing `userSettings.graphicsOverrides()` localStorage flow and takes effect live through the existing `regenerateRenderSettings` wiring. ## Testing - `npx vitest tests/GraphicsOverrides.test.ts --run` — 35 passed - `tsc --noEmit` — no new type errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>