Enhance apparel definitions: Introduce 'UpperUnderwear' layer and related items (Bra, SportsBra, SoftBra) to support gender-specific clothing. Update inventory and dress generation logic to accommodate new layers and ensure proper coverage. Adjust localization for new apparel terms and refine tests for underwear functionality.
This commit is contained in:
@@ -952,36 +952,31 @@ internal sealed class SchoolWorker
|
||||
var loaded = _store.TryReadPeople(_id);
|
||||
if (loaded is null)
|
||||
{
|
||||
seed = school.Id;
|
||||
native = ResolveNative(country, seed, _nativeLanguage, generating: true);
|
||||
_nativeLanguage = native;
|
||||
roster = RosterGenerator.Generate(catalog, map, seed, countryId, school.Clock.Time, native);
|
||||
applicants = ApplicantPool.Create(catalog, roster, seed, countryId, school.Clock.Time, native);
|
||||
generated = true;
|
||||
throw new SchoolContentUnavailableException(
|
||||
$"School {_id} has no people file; the school was left unstarted.");
|
||||
}
|
||||
|
||||
seed = loaded.Seed;
|
||||
native = ResolveNative(country, seed, _nativeLanguage, generating: false);
|
||||
_nativeLanguage = native;
|
||||
roster = loaded.ToRoster();
|
||||
if (loaded.Applicants is { Applicants.Count: > 0 })
|
||||
{
|
||||
applicants = loaded.Applicants;
|
||||
}
|
||||
else
|
||||
{
|
||||
seed = loaded.Seed;
|
||||
native = ResolveNative(country, seed, _nativeLanguage, generating: false);
|
||||
_nativeLanguage = native;
|
||||
roster = loaded.ToRoster();
|
||||
if (loaded.Applicants is { Applicants.Count: > 0 })
|
||||
{
|
||||
applicants = loaded.Applicants;
|
||||
}
|
||||
else
|
||||
{
|
||||
applicants = ApplicantPool.Create(catalog, roster, seed, countryId, school.Clock.Time, native);
|
||||
generated = true;
|
||||
}
|
||||
applicants = ApplicantPool.Create(catalog, roster, seed, countryId, school.Clock.Time, native);
|
||||
generated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (DressGenerator.NeedsDressing(roster, applicants))
|
||||
{
|
||||
roster = DressGenerator.EnsureRoster(catalog, roster, seed, school.Clock.Time);
|
||||
applicants = DressGenerator.EnsurePool(catalog, applicants, roster, seed, school.Clock.Time);
|
||||
generated = true;
|
||||
if (DressGenerator.NeedsDressing(roster, applicants))
|
||||
{
|
||||
throw new SchoolContentUnavailableException(
|
||||
$"School {_id} people have no clothes; the school was left unstarted.");
|
||||
}
|
||||
|
||||
RequireKnownApparel(catalog, roster, applicants);
|
||||
}
|
||||
|
||||
roster = LockerAssigner.Apply(catalog, map, roster);
|
||||
|
||||
Reference in New Issue
Block a user