Cargo spawns at the floor of the cargo room, item configs are fetched from the prefab instead of reloading the config files every time when placing an item

This commit is contained in:
Regalis
2016-07-16 16:12:34 +03:00
parent 03a3a156ba
commit 8357532fc1
3 changed files with 15 additions and 17 deletions
+2 -13
View File
@@ -325,20 +325,9 @@ namespace Barotrauma
condition = 100.0f;
XElement element = ToolBox.TryLoadXml(Prefab.ConfigFile).Root;
XElement element = prefab.ConfigElement;
if (element == null) return;
if (ToolBox.GetAttributeString(element, "name", "") != Name)
{
foreach (XElement subElement in element.Elements())
{
if (ToolBox.GetAttributeString(subElement, "name", "") != Name) continue;
element = subElement;
break;
}
}
properties = ObjectProperty.InitProperties(this, element);
foreach (XElement subElement in element.Elements())