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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user