[Feature] Add weather.status console command
- Dominant language
- C++
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Problem statement
The `time.*` and `weather.*` command families both report engine state to the console, but only
`time.status` exists. There is no `weather.status` to print the current weather state and intensity in
isolation. Users who want to query weather without also dumping the full time/clock state have to
issue `time.status` (which works, but reads as if weather state lives under `time.*`) or guess. The
full status of weather is already in scope of `time.status` (`ConsoleCommands.cpp:1583`), but a
dedicated `weather.status` would mirror the existing `time.status` pattern and round out the `weather.*`
family.
## Suggested implementation
Two changes:
1. Add `Cmd_WeatherStatus` near the other `Cmd_Weather*` implementations (around
`ConsoleCommands.cpp:1325-1390`).
2. Register `weather.status` next to the other `weather.*` registrations at
`ConsoleCommands.cpp:3585-3607`.
```cpp
bool Cmd_WeatherStatus(std::span args, CommandContext& ctx)
{
if (ctx.time == nullptr)
{
ctx.out.PrintError("weather.status: time manager unavailable");
return false;
}
if (!args.empty())
{
ctx.out.PrintError("weather.status: usage 'weather.status'");
return false;
}
char line[128];
std::snprintf(line,
sizeof(line),
"weather.status: %s intensity=%.2f",
std::string(EnumTraits::Name(ctx.time->GetWeather())).c_str(),
static_cast(ctx.time->GetWeatherIntensity()));
ctx.out.Print(line);
return true;
}
```
Register near the existing `weather.*` block:
```cpp
m_Registry.Register("weather.status",
"print current weather state and intensity",
[makeContext](auto args, Console&)
{
CommandContext ctx = makeContext();
(void)Cmd_WeatherStatus(args, ctx);
});
```
### Proposed solution
Add a `weather.status` console command that prints one line of the form:
`weather.status: intensity=<0.00-1.00>`
Implementation mirrors `Cmd_TimeStatus/time.status` but reads only `ctx.time->GetWeather()` and
`ctx.time->GetWeatherIntensity()`. Register it next to the other `weather.*` commands at
`ConsoleCommands.cpp:3585-3607`.
### Alternatives considered
Not applicable - this approach is simple
### Scope
Not applicable - the scope is clear
### Pre-submission checklist
- [x] I searched existing issues and this proposal is not a duplicate.
- [x] This is a user-facing capability or improvement and not a purely internal task.
Contributor guide
Assessment
This issue has not been assessed yet.