Navigation requires power, locationtypes and missions included in content packages

This commit is contained in:
Regalis
2016-02-18 22:04:47 +02:00
parent cd4e3a3d2a
commit 9e11134bd3
10 changed files with 50 additions and 29 deletions
+16 -10
View File
@@ -127,20 +127,26 @@ namespace Barotrauma
return null;
}
public static void Init(string file)
public static void Init()
{
XDocument doc = ToolBox.TryLoadXml(file);
if (doc==null)
var locationTypeFiles = GameMain.SelectedPackage.GetFilesOfType(ContentType.LocationTypes);
foreach (string file in locationTypeFiles)
{
return;
XDocument doc = ToolBox.TryLoadXml(file);
if (doc==null)
{
return;
}
foreach (XElement element in doc.Root.Elements())
{
LocationType locationType = new LocationType(element);
list.Add(locationType);
}
}
foreach (XElement element in doc.Root.Elements())
{
LocationType locationType = new LocationType(element);
list.Add(locationType);
}
}
}
}