(6b47d1ebc) Fixed inability to spawn items in characters' inventories and simplified the spawnitem command (multi-word item/character names must be surrounded with quotation marks now, so we don't have to guess which words belong to the item name and which to the character name). + added "startwhenclientsready" console command
This commit is contained in:
@@ -252,7 +252,7 @@ namespace Barotrauma
|
||||
NewMessage(GameMain.Server.ServerSettings.AutoRestart ? "Automatic restart enabled." : "Automatic restart disabled.", Color.White);
|
||||
});
|
||||
|
||||
AssignOnExecute("autorestartinterval",(string[] args) =>
|
||||
AssignOnExecute("autorestartinterval", (string[] args) =>
|
||||
{
|
||||
if (GameMain.Server == null) return;
|
||||
if (args.Length > 0)
|
||||
@@ -308,6 +308,26 @@ namespace Barotrauma
|
||||
}
|
||||
});
|
||||
|
||||
AssignOnExecute("startwhenclientsready", (string[] args) =>
|
||||
{
|
||||
if (GameMain.Server == null) { return; }
|
||||
bool enabled = GameMain.Server.ServerSettings.StartWhenClientsReady;
|
||||
if (args.Length > 0)
|
||||
{
|
||||
bool.TryParse(args[0], out enabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
enabled = !enabled;
|
||||
}
|
||||
if (enabled != GameMain.Server.ServerSettings.StartWhenClientsReady)
|
||||
{
|
||||
GameMain.Server.ServerSettings.StartWhenClientsReady = enabled;
|
||||
GameMain.NetLobbyScreen.LastUpdateID++;
|
||||
}
|
||||
NewMessage(GameMain.Server.ServerSettings.StartWhenClientsReady ? "Enabled starting the round automatically when clients are ready." : "Disabled starting the round automatically when clients are ready.", Color.White);
|
||||
});
|
||||
|
||||
AssignOnExecute("giveperm", (string[] args) =>
|
||||
{
|
||||
if (GameMain.Server == null) return;
|
||||
|
||||
Reference in New Issue
Block a user