Game.LoadGame, Game.SaveGame and Game.LoadCampaign
This commit is contained in:
@@ -169,6 +169,7 @@ RegisterBarotrauma("PvPMode")
|
|||||||
RegisterBarotrauma("Mission")
|
RegisterBarotrauma("Mission")
|
||||||
RegisterBarotrauma("CampaignMode")
|
RegisterBarotrauma("CampaignMode")
|
||||||
RegisterBarotrauma("CoOpMode")
|
RegisterBarotrauma("CoOpMode")
|
||||||
|
RegisterBarotrauma("MultiPlayerCampaign")
|
||||||
|
|
||||||
RegisterBarotrauma("CampaignMetadata")
|
RegisterBarotrauma("CampaignMetadata")
|
||||||
RegisterBarotrauma("Wallet")
|
RegisterBarotrauma("Wallet")
|
||||||
|
|||||||
@@ -366,8 +366,22 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public void AssignOnExecute(string names, object onExecute) => DebugConsole.AssignOnExecute(names, (string[] a) => { GameMain.LuaCs.CallLuaFunction(onExecute, new object[] { a }); });
|
public void AssignOnExecute(string names, object onExecute) => DebugConsole.AssignOnExecute(names, (string[] a) => { GameMain.LuaCs.CallLuaFunction(onExecute, new object[] { a }); });
|
||||||
|
|
||||||
|
public void SaveGame(string path)
|
||||||
|
{
|
||||||
|
if (LuaCsFile.CanWriteToPath(path)) { throw new ScriptRuntimeException($"Saving files to {path} is disallowed."); }
|
||||||
|
SaveUtil.SaveGame(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadGame(string path)
|
||||||
|
{
|
||||||
|
SaveUtil.LoadGame(path);
|
||||||
|
}
|
||||||
|
|
||||||
#if SERVER
|
#if SERVER
|
||||||
|
public void LoadCampaign(string path)
|
||||||
|
{
|
||||||
|
MultiPlayerCampaign.LoadCampaign(path);
|
||||||
|
}
|
||||||
|
|
||||||
public static void SendMessage(string msg, ChatMessageType? messageType = null, Client sender = null, Character character = null)
|
public static void SendMessage(string msg, ChatMessageType? messageType = null, Client sender = null, Character character = null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user