Merge phase 29 country.
ci / server (push) Failing after 3m53s
ci / client (push) Successful in 19s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 02:59:46 +03:00
co-authored by Cursor
59 changed files with 903 additions and 478 deletions
+12 -8
View File
@@ -75,8 +75,11 @@ public sealed class School : IDisposable
public int PeopleSeed { get; private set; }
/// <summary>Name pack used to generate this school's people. Needed again on 1 September.</summary>
public string? NameSetId { get; private set; }
/// <summary>Country used to generate this school's people. Needed again on 1 September.</summary>
public string? CountryId { get; private set; }
/// <summary>Climate preset rolled at birth. Phase 32 reads it; it cannot change on a live school.</summary>
public string? ClimatePresetId { get; private set; }
/// <summary>Skill everyone generated for this school speaks natively.</summary>
public string? NativeLanguage { get; private set; }
@@ -118,14 +121,15 @@ public sealed class School : IDisposable
/// <summary>
/// Installs a roster that already matches the map. Spawns entities; does not write to disk.
/// </summary>
public void InstallPeople(Roster roster, int seed, string? nameSetId = null, ApplicantPool? applicants = null, string? nativeLanguage = null)
public void InstallPeople(Roster roster, int seed, string? countryId = null, ApplicantPool? applicants = null, string? nativeLanguage = null, string? climatePresetId = null)
{
ObjectDisposedException.ThrowIf(_disposed, this);
ArgumentNullException.ThrowIfNull(roster);
Roster = roster;
PeopleSeed = seed;
NameSetId = nameSetId;
CountryId = countryId;
ClimatePresetId = climatePresetId;
NativeLanguage = nativeLanguage;
Applicants = applicants;
RosterSpawner.Spawn(World, roster);
@@ -282,7 +286,7 @@ public sealed class School : IDisposable
private bool TryYearlyIntake(DateTime before, DateTime after)
{
if (Roster is null || Catalog is null || NameSetId is null)
if (Roster is null || Catalog is null || CountryId is null)
{
return false;
}
@@ -290,7 +294,7 @@ public sealed class School : IDisposable
var changed = false;
foreach (var date in YearlyIntake.DatesBetween(before, after))
{
Roster = YearlyIntake.Apply(Catalog, Roster, PeopleSeed, NameSetId, date, NativeLanguage);
Roster = YearlyIntake.Apply(Catalog, Roster, PeopleSeed, CountryId, date, NativeLanguage);
changed = true;
}
@@ -307,12 +311,12 @@ public sealed class School : IDisposable
private bool TryApplicantRefresh()
{
if (Applicants is null || Roster is null || Catalog is null || NameSetId is null || Catalog.StaffingRules is null)
if (Applicants is null || Roster is null || Catalog is null || CountryId is null || Catalog.StaffingRules is null)
{
return false;
}
var next = Applicants.Advance(Catalog, Roster, PeopleSeed, NameSetId, Clock.Time, NativeLanguage);
var next = Applicants.Advance(Catalog, Roster, PeopleSeed, CountryId, Clock.Time, NativeLanguage);
if (next.Week == Applicants.Week)
{
return false;