Replace selectable name sets with a country that owns names and climate presets.

Create picks a country; climate is rolled from the school seed and stored. Old Slavic saves lift as Russia.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 02:55:13 +03:00
co-authored by Cursor
parent 450495f666
commit 1b66c89cd7
58 changed files with 902 additions and 477 deletions
+4 -4
View File
@@ -15,17 +15,17 @@ public static class RosterGenerator
DefCatalog catalog,
MapLayout map,
int schoolSeed,
string nameSetId,
string countryId,
DateTime? asOf = null,
string? nativeLanguage = null)
{
ArgumentNullException.ThrowIfNull(catalog);
ArgumentNullException.ThrowIfNull(map);
ArgumentException.ThrowIfNullOrWhiteSpace(nameSetId);
ArgumentException.ThrowIfNullOrWhiteSpace(countryId);
if (!catalog.NameSets.TryGetValue(nameSetId, out var names))
if (!catalog.TryGetCountryNames(countryId, out var names))
{
throw new ArgumentException($"Unknown name set '{nameSetId}'.", nameof(nameSetId));
throw new ArgumentException($"Unknown country '{countryId}'.", nameof(countryId));
}
var native = NativeLanguages.Pick(names, schoolSeed, nativeLanguage, rollIfOmitted: true);