mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-29 17:11:47 +00:00
Add Fallout effects toggle to graphics settings ☢️ (#4313)
## Summary Adds a **"Fallout effects"** toggle to the *Effects* section of the graphics settings modal, letting players disable the nuclear fallout visuals (useful for performance). Fallout is rendered by two passes — the broiling green **bloom** on irradiated territory and its additive **light** contribution in day/night mode. The bloom pass was already gated by `passEnabled.falloutBloom`, but the light pass had no gate. This adds a `passEnabled.falloutLight` flag and a single user-facing `passEnabled.fallout` graphics override that drives both together. ## Changes - **`RenderSettings.ts` / `render-settings.json`** — new `passEnabled.falloutLight` flag (default `true`). - **`LightmapPass.ts`** — gate the fallout light pass behind `passEnabled.falloutLight`. - **`GraphicsOverrides.ts`** — add `fallout: z.boolean()` to the `passEnabled` override group. - **`RenderOverrides.ts`** — apply `passEnabled.fallout` to both `falloutBloom` and `falloutLight`. - **`GraphicsSettingsModal.ts`** — `currentFallout()` / `onToggleFallout()` + a toggle button (mirrors the existing Special Effects toggle). - **`en.json`** — `graphics_setting.fallout_label` / `fallout_desc`. ## Testing - `tsc --noEmit` passes; JSON files validated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,12 @@ export function applyGraphicsOverrides(
|
||||
if (overrides.passEnabled?.fx !== undefined) {
|
||||
settings.passEnabled.fx = overrides.passEnabled.fx;
|
||||
}
|
||||
if (overrides.passEnabled?.fallout !== undefined) {
|
||||
// One user-facing toggle drives both fallout passes: the territory bloom
|
||||
// and its additive light contribution in the day/night composite.
|
||||
settings.passEnabled.falloutBloom = overrides.passEnabled.fallout;
|
||||
settings.passEnabled.falloutLight = overrides.passEnabled.fallout;
|
||||
}
|
||||
if (overrides.terrain?.oceanColor !== undefined) {
|
||||
settings.terrain.oceanColor = overrides.terrain.oceanColor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user