Updated TypeId to be writable
This makes the reader function a tiny bit cleaner.
This commit is contained in:
parent
8821731aab
commit
8e01f33d6b
@ -16,7 +16,11 @@ namespace RobloxFiles.BinaryFormat.Chunks
|
|||||||
public int TypeIndex { get; internal set; }
|
public int TypeIndex { get; internal set; }
|
||||||
|
|
||||||
public PropertyType Type { get; internal set; }
|
public PropertyType Type { get; internal set; }
|
||||||
public byte TypeId => (byte)Type;
|
public byte TypeId
|
||||||
|
{
|
||||||
|
get { return (byte)Type; }
|
||||||
|
internal set { Type = (PropertyType)value; }
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadFromReader(BinaryRobloxFileReader reader)
|
public void LoadFromReader(BinaryRobloxFileReader reader)
|
||||||
{
|
{
|
||||||
@ -24,9 +28,7 @@ namespace RobloxFiles.BinaryFormat.Chunks
|
|||||||
|
|
||||||
TypeIndex = reader.ReadInt32();
|
TypeIndex = reader.ReadInt32();
|
||||||
Name = reader.ReadString();
|
Name = reader.ReadString();
|
||||||
|
TypeId = reader.ReadByte();
|
||||||
byte propType = reader.ReadByte();
|
|
||||||
Type = (PropertyType)propType;
|
|
||||||
|
|
||||||
INST type = file.Types[TypeIndex];
|
INST type = file.Types[TypeIndex];
|
||||||
Property[] props = new Property[type.NumInstances];
|
Property[] props = new Property[type.NumInstances];
|
||||||
|
Loading…
Reference in New Issue
Block a user