namespace HSchool.People; /// /// A country lists climate presets; the school rolls one at birth from the school seed. /// Reloads without a stored pick take the first listed preset so old saves stay put. /// public static class CountryClimate { public static string? Pick(CountryDef country, int schoolSeed, bool rollIfOmitted) { ArgumentNullException.ThrowIfNull(country); var presets = country.ClimatePresets; if (presets.Count == 0) { return null; } if (!rollIfOmitted || presets.Count == 1) { return presets[0]; } var rng = new Random(Seed.ForSchool(schoolSeed, Seed.ClimatePresetSalt)); return presets[rng.Next(presets.Count)]; } }