Minor fixes and tweaks.

This commit is contained in:
CloneTrooper1019
2019-07-04 18:26:53 -05:00
parent 4e1fdc0a22
commit cf4cf829d7
9 changed files with 60 additions and 34 deletions

View File

@ -459,7 +459,14 @@ namespace RobloxFiles
if (field.GetCustomAttribute<ObsoleteAttribute>() != null)
continue;
if (Property.Types.ContainsKey(fieldType))
PropertyType propType = PropertyType.Unknown;
if (fieldType.IsEnum)
propType = PropertyType.Enum;
else if (Property.Types.ContainsKey(fieldType))
propType = Property.Types[fieldType];
if (propType != PropertyType.Unknown)
{
if (fieldName.EndsWith("_"))
fieldName = instType.Name;
@ -468,9 +475,9 @@ namespace RobloxFiles
{
Property newProp = new Property()
{
Type = Property.Types[fieldType],
Value = field.GetValue(this),
Name = fieldName,
Type = propType,
Instance = this
};
@ -480,7 +487,7 @@ namespace RobloxFiles
{
Property prop = props[fieldName];
prop.Value = field.GetValue(this);
prop.Type = Property.Types[fieldType];
prop.Type = propType;
}
}
}