Unstable 0.17.7.0
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user