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
+13 -13
View File
@@ -30,15 +30,15 @@ public class PresenceTests
public void ClassWithoutLessons_StaysAway_TeacherWithAnotherClassComes()
{
var (catalog, map) = Vanilla();
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Slavic", TuesdayMorning);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Slavic", TuesdayMorning);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Russia", TuesdayMorning);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Russia", TuesdayMorning);
var idle = roster.Classes[0];
var busy = roster.Classes[1];
var hired = Staffing.Hire(catalog, map, roster, pool, pool.Applicants[0].Person.Id, Staffing.TeacherPosition, Cap);
Assert.Equal(StaffingError.None, hired.Error);
using var school = School.Create(1, "Два класса", TuesdayMorning, catalog, map);
school.InstallPeople(hired.Roster, seed: 1, "Slavic", hired.Pool);
school.InstallPeople(hired.Roster, seed: 1, "Russia", hired.Pool);
school.SetTimetable(new Timetable(
[new LessonPlacement(busy.Id, "Mathematics", hired.Roster.People.First(person => person.IsStaff).Id, busy.RoomId, Day: 1, Period: 1)],
[]));
@@ -108,7 +108,7 @@ public class PresenceTests
Assert.Contains(snapshot, row => row.NodeId is not null && (row.Path.Count > 0 || row.RemainingMinutes > 0));
using var loaded = School.Load(2, "Сейв", live.Clock.Time, running: true, speedIndex: 0, catalog, map);
loaded.InstallPeople(live.Roster!, seed: 4, "Slavic", live.Applicants);
loaded.InstallPeople(live.Roster!, seed: 4, "Russia", live.Applicants);
loaded.SetTimetable(live.Timetable!);
loaded.ConfigurePresence(weekDays: 5, maxDecisionsPerTick: 10_000);
loaded.RestorePresence(snapshot);
@@ -277,12 +277,12 @@ public class PresenceTests
private static School OpenStaffed(DefCatalog catalog, MapLayout map, int seed)
{
var roster = RosterGenerator.Generate(catalog, map, seed, "Slavic", TuesdayMorning);
var pool = ApplicantPool.Create(catalog, roster, seed, "Slavic", TuesdayMorning);
var roster = RosterGenerator.Generate(catalog, map, seed, "Russia", TuesdayMorning);
var pool = ApplicantPool.Create(catalog, roster, seed, "Russia", TuesdayMorning);
var schoolClass = roster.Classes.First(row =>
row.RoomId is "classroom-101" or "classroom-102" or "classroom-103" or "classroom-104");
var school = School.Create(seed, "Присутствие", TuesdayMorning, catalog, map);
school.InstallPeople(roster, seed, "Slavic", pool);
school.InstallPeople(roster, seed, "Russia", pool);
school.SetTimetable(new Timetable(
[
new LessonPlacement(schoolClass.Id, "Mathematics", "t1", schoolClass.RoomId, Day: 1, Period: 1),
@@ -295,11 +295,11 @@ public class PresenceTests
private static School Open(DefCatalog catalog, MapLayout map, DateTime start, int seed)
{
var roster = RosterGenerator.Generate(catalog, map, seed, "Slavic", start);
var pool = ApplicantPool.Create(catalog, roster, seed, "Slavic", start);
var roster = RosterGenerator.Generate(catalog, map, seed, "Russia", start);
var pool = ApplicantPool.Create(catalog, roster, seed, "Russia", start);
var schoolClass = roster.Classes[0];
var school = School.Create(seed, "Присутствие", start, catalog, map);
school.InstallPeople(roster, seed, "Slavic", pool);
school.InstallPeople(roster, seed, "Russia", pool);
school.SetTimetable(new Timetable(
[new LessonPlacement(schoolClass.Id, "Mathematics", "t1", schoolClass.RoomId, Day: 0, Period: 1)],
[]));
@@ -310,10 +310,10 @@ public class PresenceTests
private static School OpenEmpty(DateTime start)
{
var (catalog, map) = Vanilla();
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Slavic", start);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Slavic", start);
var roster = RosterGenerator.Generate(catalog, map, schoolSeed: 1, "Russia", start);
var pool = ApplicantPool.Create(catalog, roster, schoolSeed: 1, "Russia", start);
var school = School.Create(1, "Пустая", start, catalog, map);
school.InstallPeople(roster, seed: 1, "Slavic", pool);
school.InstallPeople(roster, seed: 1, "Russia", pool);
school.ConfigurePresence(weekDays: 5, maxDecisionsPerTick: 10_000);
return school;
}