Patched fatal flaw with property setter.

Turns out the property setter was failing to cover inheritance, so referent properties were being corrupted in the process. This should now be fixed.

I've also deprecated IsA<T>() in favor of using C#'s own `is` operator and stopped locking the parent of service classes to avoid saving issues.
This commit is contained in:
CloneTrooper1019
2020-08-21 10:31:12 -05:00
parent 2ff5d82218
commit 1314be22bb
5 changed files with 26 additions and 30 deletions

View File

@ -27,7 +27,6 @@ namespace RobloxFiles.BinaryFormat.Chunks
Instance child = file.Instances[childId];
child.Parent = (parentId >= 0 ? file.Instances[parentId] : file);
child.ParentLocked = child.IsService;
}
}

View File

@ -362,7 +362,12 @@ namespace RobloxFiles.BinaryFormat.Chunks
readProperties(i =>
{
int instId = instIds[i];
return instId >= 0 ? file.Instances[instId] : null;
Instance result = null;
if (instId >= 0)
result = file.Instances[instId];
return result;
});
break;