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
@@ -70,11 +70,11 @@ public class SkillGrantTests
catalog,
Fixtures.Classrooms(11),
Fixtures.SchoolSeed,
"Slavic",
"Russia",
Fixtures.AsOf,
"BelarusianLanguage");
var max = catalog.NameSets["Slavic"].RelatedLanguageMax;
var max = catalog.Countries["Russia"].Names.RelatedLanguageMax;
Assert.All(
roster.People,
person =>
@@ -97,7 +97,7 @@ public class SkillGrantTests
public void RelatedLanguages_AreCommonAndStayLow()
{
var catalog = Fixtures.Catalog();
var max = catalog.NameSets["Slavic"].RelatedLanguageMax;
var max = catalog.Countries["Russia"].Names.RelatedLanguageMax;
var roster = Fixtures.Generate(Fixtures.Classrooms(11));
Assert.Contains(
roster.People,
@@ -138,7 +138,7 @@ public class SkillGrantTests
[Fact]
public void ReloadWithoutASavedPick_TakesTheFirstLanguageInsteadOfRolling()
{
var names = Fixtures.Catalog().NameSets["Slavic"];
var names = Fixtures.Catalog().Countries["Russia"].Names;
Assert.True(names.Spoken.Count > 1, "this pins behaviour that only matters for a multi-language set");
foreach (var seed in new[] { 1, 2, 7, 20260818 })
@@ -164,8 +164,8 @@ public class SkillGrantTests
public void OmittedNativeLanguage_IsStableForTheSameSeed()
{
var map = Fixtures.Classrooms(2);
var a = RosterGenerator.Generate(Fixtures.Catalog(), map, 7, "Slavic", Fixtures.AsOf);
var b = RosterGenerator.Generate(Fixtures.Catalog(), map, 7, "Slavic", Fixtures.AsOf);
var a = RosterGenerator.Generate(Fixtures.Catalog(), map, 7, "Russia", Fixtures.AsOf);
var b = RosterGenerator.Generate(Fixtures.Catalog(), map, 7, "Russia", Fixtures.AsOf);
Assert.Equal(
a.People.Select(person => string.Join(',', person.Skills.Keys.Order(StringComparer.Ordinal))),
b.People.Select(person => string.Join(',', person.Skills.Keys.Order(StringComparer.Ordinal))));
@@ -195,7 +195,7 @@ public class SkillGrantTests
catalog,
before,
Fixtures.SchoolSeed,
"Slavic",
"Russia",
new DateTime(2012, 9, 1, 0, 0, 0, DateTimeKind.Utc));
var grown = after.People.First(person => person.Id == pupil.Id);
Assert.True(grown.ClassId is { } classId && after.Classes.Any(schoolClass =>