Unstable 0.17.7.0

This commit is contained in:
Markus Isberg
2022-04-08 00:34:17 +09:00
parent 95764d1fa8
commit 164d72ae3a
82 changed files with 852 additions and 385 deletions
@@ -440,7 +440,7 @@ namespace Barotrauma
}
else
{
connection.OverrideValue = Convert.ChangeType(attribute.Value, connection.ValueType);
connection.OverrideValue = ChangeType(attribute.Value, connection.ValueType);
}
}
}
@@ -524,6 +524,18 @@ namespace Barotrauma
GuiFrame.AddToGUIUpdateList();
}
public static object? ChangeType(string value, Type type)
{
if (type == typeof(Identifier))
{
return value.ToIdentifier();
}
else
{
return Convert.ChangeType(value, type);
}
}
private XElement? ExportXML()
{
XElement mainElement = new XElement("ScriptedEvent", new XAttribute("identifier", projectName.RemoveWhitespace().ToLowerInvariant()));