You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an Enabled checkbox per weather condition, shown as [Disabled] in
the collapsed header when off. Disabled conditions are excluded from
manual toggling, automatic weather rolls, and the /weather chat
command. Fog now defaults to disabled since it's quite invasive to
gameplay, which lets the Weather module itself default to enabled.
for (int i = 0; i < static_cast<int>(conditions.size()); i++) {
1470
1474
auto& c = conditions[i];
1471
1475
ImGui::PushID(i);
1472
-
ImGui::BeginDisabled(auto_weather); // automatic weather owns the active state; show it read-only
1476
+
ImGui::BeginDisabled(auto_weather || !c.enabled); // automatic weather owns the active state; a disabled condition can't be activated
1473
1477
if (ImGui::Checkbox("##active", &c.active) && c.active) // only one condition at a time: turning one on turns the rest off
1474
1478
for (int j = 0; j < static_cast<int>(conditions.size()); j++)
1475
1479
if (j != i) conditions[j].active = false;
1476
-
if (auto_weather && ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) // explain the disabled state
1477
-
ImGui::SetTooltip("Automatic weather is on and controls which condition is active.\nTurn off \"Automatic weather\" below to switch conditions manually.");
1480
+
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) { // explain the disabled state
1481
+
if (!c.enabled) ImGui::SetTooltip("This condition is disabled.\nTick \"Enabled\" in its settings below to allow it to be used.");
1482
+
elseif (auto_weather) ImGui::SetTooltip("Automatic weather is on and controls which condition is active.\nTurn off \"Automatic weather\" below to switch conditions manually.");
1483
+
}
1478
1484
ImGui::EndDisabled();
1479
1485
ImGui::SameLine();
1480
-
char header[64];
1481
-
snprintf(header, sizeof(header), "%s###cond", c.name.empty() ? "(unnamed)" : c.name.c_str()); // stable id so editing the name doesn't collapse/unfocus the section
1486
+
char header[80];
1487
+
snprintf(header, sizeof(header), "%s%s###cond", c.name.empty() ? "(unnamed)" : c.name.c_str(), c.enabled ? "" : " [Disabled]"); // stable id so editing the name doesn't collapse/unfocus the section
1482
1488
if (ImGui::CollapsingHeader(header)) {
1489
+
if (ImGui::Checkbox("Enabled", &c.enabled) && !c.enabled) c.active = false; // a disabled condition can't stay active
1490
+
ImGui::ShowHelp("Untick to exclude this condition from manual selection and automatic weather rolls.");
1483
1491
ImGui::InputText("Name", c.name, 32);
1484
1492
ImGui::TextDisabled("Falling particles (set Density 0 for a cloud-cover-only condition like fog).");
Copy file name to clipboardExpand all lines: site/src/content/docs/weather.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ The Weather module draws camera-anchored weather — rain, snow, ash and similar
16
16
17
17
Each condition is one weather effect. Only one runs at a time — turning a condition on (via its checkbox or [chat command](#chat-commands)) turns the others off. Expand a condition to edit it:
18
18
19
+
-**Enabled** — turn the condition off entirely: it's skipped by automatic weather and can't be turned on manually or via chat command until re-enabled. A disabled condition shows `[Disabled]` in its header. Fog is disabled by default, as it's quite invasive to gameplay (it obscures vision); enable it here if you want it in the rotation.
19
20
-**Type** — Rain (streaked drops) or Snow (square flakes; also used for ash).
20
21
-**Density** — how densely the volume is filled, 1–100%. The particle count is derived from this and the range, so it stays consistent if you change the radius. Higher = denser and heavier on FPS; the estimated particle count is shown below the slider.
21
22
-**Range** — radius of the weather volume around the focus. A small range concentrates the effect close in; a large one fills out to compass range.
0 commit comments