Moved SaveGameStatus to seperate file, guarded against null callbacks and added documentation

This commit is contained in:
Alexander Qvist-Hellum
2017-07-07 00:34:45 +02:00
parent 1251b945bc
commit 8ab16c3d30
6 changed files with 37 additions and 14 deletions

View File

@@ -222,11 +222,17 @@ namespace Torch.Server
State = ServerState.Stopped;
}
/// <inheritdoc/>
public override void Save(long callerId)
{
base.SaveGameAsync((statusCode) => SaveCompleted(statusCode, callerId));
}
/// <summary>
/// Callback for when save has finished.
/// </summary>
/// <param name="statusCode">Return code of the save operation</param>
/// <param name="callerId">Caller of the save operation</param>
private void SaveCompleted(SaveGameStatus statusCode, long callerId)
{
switch (statusCode)