mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:40:44 +00:00
fc3d80ec73
Adds a "Classic icons" toggle in the structure-icons section of the Graphics Settings modal. Off (default) keeps today's renderer look; on switches to a classic style — lighter player-colored shape behind a dark icon glyph, with 0.75 alpha for a subtle translucent feel. Exposes the underlying tuning as new render-settings knobs (`structure.fillDarken`, `borderDarken`, `iconAlpha`, `iconR/G/B`) and threads them through the structure shader as uniforms, replacing the previously hardcoded `darken(_, 0.65)` / `darken(_, 0.35)` calls and the hardcoded white `vec3(1.0)` icon color. The `classicIcons` boolean in the override schema is the single user-facing knob; the generator derives the five underlying field values from it. Extends the ClientGameRunner live-apply path to copy the `structure` slice too, and adds tests covering the schema and preset derivation.
21 lines
426 B
TypeScript
21 lines
426 B
TypeScript
import { z } from "zod";
|
|
|
|
export const GraphicsOverridesSchema = z
|
|
.object({
|
|
name: z
|
|
.object({
|
|
nameScaleFactor: z.number(),
|
|
cullThreshold: z.number(),
|
|
darkNames: z.boolean(),
|
|
})
|
|
.partial(),
|
|
structure: z
|
|
.object({
|
|
classicIcons: z.boolean(),
|
|
})
|
|
.partial(),
|
|
})
|
|
.partial();
|
|
|
|
export type GraphicsOverrides = z.infer<typeof GraphicsOverridesSchema>;
|