v0.19.0.0 (unstable)

This commit is contained in:
Regalis11
2022-07-20 18:47:07 +03:00
parent 2e2663a175
commit 6b55adcdd9
170 changed files with 2769 additions and 1634 deletions
@@ -1448,7 +1448,9 @@ namespace Barotrauma
var component = otherComponents[componentIndex];
Debug.Assert(component.GetType() == parentObject.GetType());
SafeAdd(component, property);
if (value is string stringValue && Enum.TryParse(property.PropertyType, stringValue, out var enumValue))
if (value is string stringValue &&
property.PropertyType.IsEnum &&
Enum.TryParse(property.PropertyType, stringValue, out var enumValue))
{
property.PropertyInfo.SetValue(component, enumValue);
}