Modifiers - Fixed the same issue but at the right place now

Modifiers - Saturate and desaturate modifiers WIP
This commit is contained in:
SpoinkyNL committed 2020-11-02 23:57:08 +01:00
1 parent f2e21bfe37
commit 26daa8e1dd
5 files changed
+45 -16

No files matched your search

@@ -109,14 +109,6 @@ namespace Artemis.Core
$"it does not support this data binding's type {targetType.Name}");
ModifierType = modifierType;
// Ensure the right parameter static value is never null when the parameter type is a value type
if (ParameterType == ProfileRightSideType.Static && modifierType.ParameterType != null)
{
if (modifierType.ParameterType.IsValueType && ParameterStaticValue == null)
UpdateParameterStatic(modifierType.ParameterType.GetDefault());
}
ValidateParameter();
}
@@ -225,14 +217,7 @@ namespace Artemis.Core
staticValue = Activator.CreateInstance(parameterType);
}
try
{
UpdateParameterStatic(staticValue);
}
catch (Exception e)
{
DeserializationLogger.LogModifierDeserializationFailure(GetType().Name, new JsonSerializationException("The JSON deserialized into a mismatching type", e));
}
UpdateParameterStatic(staticValue);
}
}