27 lines
714 B
C#
27 lines
714 B
C#
using HSchool.People;
|
|
|
|
namespace HSchool.Simulation;
|
|
|
|
/// <summary>
|
|
/// Ticks medical condition severity on the roster. Contagion and DiseaseDef outbreaks are later phases.
|
|
/// </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;
|
|
}
|
|
}
|