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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user