(d17d1b1c0) Workaround to save path issues on Windows Server: allow configuring save paths in config_player.xml

This commit is contained in:
Joonas Rikkonen
2019-06-09 17:44:38 +03:00
parent 81b6d2199f
commit 3cfef3c5fc

View File

@@ -605,6 +605,18 @@ namespace Barotrauma
LoadControls(doc);
LoadContentPackages(doc);
//allow overriding the save paths in the config file
if (doc.Root.Attribute("overridesavefolder") != null)
{
string saveFolder = doc.Root.GetAttributeString("overridesavefolder", "");
SaveUtil.SaveFolder = saveFolder;
SaveUtil.MultiplayerSaveFolder = Path.Combine(saveFolder, "Multiplayer");
}
if (doc.Root.Attribute("overridemultiplayersavefolder") != null)
{
SaveUtil.MultiplayerSaveFolder = doc.Root.GetAttributeString("overridemultiplayersavefolder", "");
}
XElement tutorialsElement = doc.Root.Element("tutorials");
if (tutorialsElement != null)
{