Skip to content

Overview: set the time of day and weather on the match in progress - #52

Open
jbob06 wants to merge 1 commit into
warcon-app:mainfrom
jbob06:set-weather-panel
Open

jbob06 wants to merge 1 commit into
warcon-app:mainfrom
jbob06:set-weather-panel

Conversation

@jbob06

@jbob06 jbob06 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

The problem

setWeather is a Match control action (PUT /v1/world/lighting), and the README lists "weather" under Match control, but no page in the panel calls it. The only way to change the time of day or weather is the API.

It matters more on Season 2 (CL-516586). On our server the game does not honour a rotation entry's lighting except rain: an entry queued as DayEndClear came up foggy in game, and /v1/status reported DayLateGrayFog. PUT /v1/world/lighting does work. It changes the match in progress at once, with no reload: fog to clear to rain, each confirmed by a player in game on 2026-10-16. So setting it live is currently the only reliable way to choose the time of day.

The change

On the server Overview, under the match buttons, there is a "Time of day & weather" picker with a Set now button. It lists the catalog's lightings by their display labels and calls the existing setWeather action through act(), the same path as Restart and Force end. It is gated on match.control and disabled until a lighting is picked. The "Time of day & weather" row in the status card updates from the live status as before.

No server, action or API change: 21 lines in src/routes/(app)/server/[id]/+page.svelte.

Checks

  • bun run check: 0 errors, 0 warnings.
  • prettier --check is clean on the file.
  • bun test: the same result with and without this change (21 failures on Windows on main itself, unrelated).
  • Not run against the mock game in a browser. The action and route are the ones already covered by action-matrix.test.ts and actions.test.ts.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Sk6xT19yJxWU5eEsSUG6V

The setWeather action and PUT /v1/world/lighting were wired up, and the
README lists weather under Match control, but nothing in the panel called
it. A picker beside the match controls now does, from the catalog's
lightings, gated on match.control like the buttons above it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Sk6xT19yJxWU5eEsSUG6V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant