Fixes to server settings. Closes #225
- Selected mode and mission type settings are saved and loaded. - RandomizeSeed setting can be changed via the debug console and it also has an effect in the dedicated server. - Dedicated server randomizes sub & mode settings if their selection modes are set to random.
This commit is contained in:
@@ -79,10 +79,9 @@ namespace Barotrauma.Networking
|
||||
public bool RandomizeSeed
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
[Serialize(300.0f, true)]
|
||||
public float RespawnInterval
|
||||
{
|
||||
@@ -241,6 +240,20 @@ namespace Barotrauma.Networking
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize("Sandbox", true)]
|
||||
public string GameMode
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize("Random", true)]
|
||||
public string MissionType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
XDocument doc = new XDocument(new XElement("serversettings"));
|
||||
@@ -327,6 +340,8 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
#if SERVER
|
||||
GameMain.NetLobbyScreen.ServerName = doc.Root.GetAttributeString("name", "");
|
||||
GameMain.NetLobbyScreen.SelectedModeName = GameMode;
|
||||
GameMain.NetLobbyScreen.MissionTypeName = MissionType;
|
||||
#endif
|
||||
GameMain.NetLobbyScreen.ServerMessageText = doc.Root.GetAttributeString("ServerMessage", "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user