From f410e24da0e24ba522852e709f66e043d9b6f9f6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 14 Aug 2025 14:20:37 -0400 Subject: [PATCH] Fixed #11127 --- core/src/mindustry/type/Weather.java | 2 +- core/src/mindustry/ui/dialogs/CustomRulesDialog.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/type/Weather.java b/core/src/mindustry/type/Weather.java index 0800964bca..4d77fd94a9 100644 --- a/core/src/mindustry/type/Weather.java +++ b/core/src/mindustry/type/Weather.java @@ -281,7 +281,7 @@ public class Weather extends UnlockableContent{ public static class WeatherEntry{ /** The type of weather used. */ - public Weather weather; + public Weather weather = Weathers.rain; /** Minimum and maximum spacing between weather events. Does not include the time of the event itself. */ public float minFrequency, maxFrequency, minDuration, maxDuration; /** Cooldown time before the next weather event takes place This is *state*, not configuration. */ diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 0232e08526..0082b59534 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -463,6 +463,8 @@ public class CustomRulesDialog extends BaseDialog{ int cols = Math.max(1, (int)(Core.graphics.getWidth() / Scl.scl(450))); int idx = 0; + rules.weather.removeAll(w -> w.weather == null); + for(WeatherEntry entry : rules.weather){ base.top(); //main container