Add DiseaseDef diseases with weather vectors and excused absence.

Vanilla ships several diseases whose stages drive lesson gain, stay-home
rolls, and illness attendance; cold/rain/snow raise onset via BehaviorDef scale.
This commit is contained in:
Leonid Pershin
2026-08-21 13:28:57 +03:00
parent 564776883a
commit 2d633411e4
27 changed files with 1188 additions and 38 deletions
@@ -3,24 +3,10 @@ using HSchool.People;
namespace HSchool.Simulation;
/// <summary>
/// Ticks medical condition severity on the roster. Contagion and DiseaseDef outbreaks are later phases.
/// Ticks medical conditions. DiseaseDef onset and stage curves live in <see cref="DiseaseSystem"/>.
/// Kept so older call sites and phase-77 tests still have a named entry.
/// </summary>
internal static class HealthConditionSystem
{
public static bool Apply(School school, double gameMinutes)
{
if (gameMinutes <= 0 || school.Roster is null)
{
return false;
}
var dayNumber = DateOnly.FromDateTime(school.Clock.Time).DayNumber;
var changed = false;
foreach (var person in school.Roster.People)
{
changed |= HealthConditions.Tick(person, school.PeopleSeed, dayNumber, gameMinutes);
}
return changed;
}
public static bool Apply(School school, double gameMinutes) => DiseaseSystem.Apply(school, gameMinutes);
}