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:
@@ -38,17 +38,17 @@ public static class YearlyIntake
|
||||
DefCatalog catalog,
|
||||
Roster roster,
|
||||
int schoolSeed,
|
||||
string nameSetId,
|
||||
string countryId,
|
||||
DateTime asOf,
|
||||
string? nativeLanguage = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(catalog);
|
||||
ArgumentNullException.ThrowIfNull(roster);
|
||||
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: false);
|
||||
|
||||
Reference in New Issue
Block a user