Implement per-school save functionality by introducing a dedicated save directory and updating the school management system to support loading and saving school states. Revise documentation to reflect these changes, including updates to the architecture and design documents, and enhance the API for reloading schools from disk. Update tests to ensure proper functionality of the new save and reload features.
This commit is contained in:
@@ -26,8 +26,21 @@ public sealed class SimulationOptions
|
||||
set => _defaultStartDate = DateTime.SpecifyKind(value, DateTimeKind.Utc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Directory for per-school save files. Relative paths are resolved against the content root.
|
||||
/// </summary>
|
||||
public string SavesDirectory { get; set; } = "saves";
|
||||
|
||||
/// <summary>
|
||||
/// How often a running school writes its clock to disk. Create, pause, speed and shutdown
|
||||
/// write immediately; the tick itself never does.
|
||||
/// </summary>
|
||||
public int SaveIntervalSeconds { get; set; } = 30;
|
||||
|
||||
/// <summary>Length of one fixed step.</summary>
|
||||
public double FixedDeltaTime => 1d / TickRate;
|
||||
|
||||
public TimeSpan TickInterval => TimeSpan.FromSeconds(1d / TickRate);
|
||||
|
||||
public TimeSpan SaveInterval => TimeSpan.FromSeconds(SaveIntervalSeconds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user