Enhance school creation and staffing management with native language support
- Updated protocol documentation to include `nativeLanguages` in `nameSets` and added `nativeLanguage` to school creation options. - Enhanced the UI for school creation to allow selection of native languages, improving user experience. - Revised API interfaces to accommodate new native language features, ensuring proper data handling. - Improved localization strings to support new native language functionalities in both English and Russian. - Updated tests to validate the new native language features and ensure robust functionality in staffing scenarios.
This commit is contained in:
@@ -19,7 +19,17 @@ public class PeopleDefTests
|
||||
Assert.All(catalog.Needs.Values, need => Assert.True(need.DecayPerHour > 0));
|
||||
Assert.True(catalog.Needs["Sleep"].RestoredOffCampus);
|
||||
Assert.Equal(0.1f, catalog.Needs["Hunger"].DecayPerHour);
|
||||
Assert.Contains(catalog.Skills["Agility"].BodyLimits, limit => limit.Attribute == "Build" && limit.Value == "Obese");
|
||||
Assert.True(catalog.Skills["Communication"].Always);
|
||||
Assert.True(catalog.Skills["Agility"].Always);
|
||||
Assert.True(catalog.Skills["Pedagogy"].Work);
|
||||
Assert.Equal(0.4f, catalog.Skills["English"].AdultChance);
|
||||
Assert.Equal(
|
||||
["RussianLanguage", "BelarusianLanguage", "UkrainianLanguage"],
|
||||
catalog.NameSets["Slavic"].Spoken);
|
||||
Assert.Equal(0.6f, catalog.NameSets["Slavic"].RelatedLanguageChance);
|
||||
Assert.Equal(40, catalog.NameSets["Slavic"].RelatedLanguageMax);
|
||||
Assert.Contains(catalog.Subjects["ForeignLanguage"].Skills, share => share.Skill == "English");
|
||||
Assert.False(catalog.Skills.ContainsKey("ForeignLanguage"));
|
||||
Assert.True(catalog.NameSets.ContainsKey("Slavic"));
|
||||
Assert.True(catalog.NameSets["Slavic"].MaleGiven.Count >= 20);
|
||||
Assert.Equal("Славянский", catalog.Label("ru", catalog.NameSets["Slavic"]));
|
||||
@@ -27,7 +37,7 @@ public class PeopleDefTests
|
||||
Assert.Equal("Усидчивый", catalog.Label("ru", catalog.Traits["Diligent"]));
|
||||
Assert.True(catalog.Subjects.ContainsKey("PrimarySchool"));
|
||||
Assert.NotNull(catalog.StaffingRules);
|
||||
Assert.Equal(12, catalog.StaffingRules.PoolSize);
|
||||
Assert.Equal(32, catalog.StaffingRules.PoolSize);
|
||||
Assert.Equal(20, catalog.StaffingRules.BaseWeeklyHours);
|
||||
Assert.Equal(4, catalog.StaffingRules.WeeksPerMonth);
|
||||
Assert.Equal(36, catalog.StaffingRules.MaxWeeklyHours);
|
||||
|
||||
Reference in New Issue
Block a user