Added async /save command for admins+ and server console.

Redesigned TorchBase.SaveGameAsync to take a callback function for error/success handling. Also removed local host checks as we are hosting a dedicated server.
This commit is contained in:
Alexander Qvist-Hellum
2017-07-06 16:18:10 +02:00
parent 79fe6a08ab
commit 1251b945bc
4 changed files with 67 additions and 11 deletions

View File

@@ -67,5 +67,12 @@ namespace Torch.Commands
Context.Respond("Stopping server.");
Context.Torch.Stop();
}
[Command("save", "Saves the game.")]
public void Save()
{
Context.Respond("Saving game.");
Context.Torch.Save(Context.Player?.IdentityId ?? 0);
}
}
}
}