Enhance staffing management in school simulation by introducing API endpoints for hiring staff and assigning subjects. Implement payroll cap validation to ensure hiring and subject assignments do not exceed the allocated budget. Update the simulation options to include a monthly payroll cap and revise related classes to support new staffing functionalities. Enhance documentation to reflect these changes and update tests to validate the new features.
This commit is contained in:
@@ -91,6 +91,21 @@ public sealed class School : IDisposable
|
||||
RosterSpawner.Spawn(World, roster);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces the roster and applicant pool after hire or a subject change. The World is rebuilt
|
||||
/// so the people list and card match; needs reset to the roster snapshot, same as yearly intake.
|
||||
/// </summary>
|
||||
public void ApplyStaffing(Roster roster, ApplicantPool applicants)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
ArgumentNullException.ThrowIfNull(roster);
|
||||
ArgumentNullException.ThrowIfNull(applicants);
|
||||
|
||||
Roster = roster;
|
||||
Applicants = applicants;
|
||||
RosterSpawner.Replace(World, roster);
|
||||
}
|
||||
|
||||
/// <summary>Runs one fixed step of the school: calendar, yearly intake, applicant refresh, then need decay.</summary>
|
||||
/// <returns><see langword="true"/> when the roster or the applicant pool changed this step.</returns>
|
||||
public bool Tick(double deltaTime, double gameMinutesPerRealSecond)
|
||||
|
||||
Reference in New Issue
Block a user