mirror of
https://github.com/electronicarts/CnC_Remastered_Collection
synced 2025-08-15 21:55:05 +02:00
September 24th Hotfix
Fixed some problematic harvester behavior Implemented 10% build time reduction for Turkey Neutral structures are capturable in multiplayer again (except for STRUCT_V01) Other misc. fixes
This commit is contained in:
@@ -533,7 +533,33 @@ namespace MobiusEditor.Utility
|
||||
var converter = propertyDescriptors.Find(property.Name, false)?.Converter ?? TypeDescriptor.GetConverter(property.PropertyType);
|
||||
if (converter.CanConvertFrom(context, typeof(string)))
|
||||
{
|
||||
property.SetValue(data, converter.ConvertFromString(context, section[property.Name]));
|
||||
try
|
||||
{
|
||||
property.SetValue(data, converter.ConvertFromString(context, section[property.Name]));
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
if (property.PropertyType == typeof(bool))
|
||||
{
|
||||
var value = section[property.Name].ToLower();
|
||||
if (value == "no")
|
||||
{
|
||||
property.SetValue(data, false);
|
||||
}
|
||||
else if (value == "yes")
|
||||
{
|
||||
property.SetValue(data, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user