From 032852fb525a1ac8cbd27f1b7e279ee07e529c61 Mon Sep 17 00:00:00 2001 From: Anonymous <84868516+Captian-obvious@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:10:15 -0400 Subject: [PATCH] Update binary.py --- pyrbxm/binary.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pyrbxm/binary.py b/pyrbxm/binary.py index 07893bb..6fdf3a0 100644 --- a/pyrbxm/binary.py +++ b/pyrbxm/binary.py @@ -180,31 +180,30 @@ class PROP: Name: str = "" ClassIndex: int = -1 Type: PropertyType = PropertyType.Unknown - @property def Class(self): return self.File.Classes[self.ClassIndex] - + ##end @property def ClassName(self): return self.Class.ClassName if self.Class else "UnknownClass" - + ##end def __str__(self): return f"{self.Type} {self.ClassName}.{self.Name}" - + ##end def deserialize(self, stream: BinaryStream, file: RobloxBinaryFile): self.File = file (self.ClassIndex,) = stream.unpack(" 0 - + ##end def __str__(self): chunkType = self.ChunkType.replace(b"\0", b" ") return f"'{chunkType}' Chunk ({self.Size} bytes) [{self.Handler}]" - + ##end def deserialize(self, stream: BinaryStream): ( self.ChunkType, @@ -246,6 +245,9 @@ def deserialize(self, stream: BinaryStream): # print(self.Data) else: self.Data = stream.read_bytes(self.Size) + ##endif + ##end +##end class BinaryRobloxFile(Instance): # (RobloxFile): @@ -272,15 +274,15 @@ def __init__(self): self.Name = "Bin:" self.Referent = "-1" self.ParentLocked = True - + ##end @property def Chunks(self): return self.ChunksImpl - + ##end @property def HasMetadata(self): return self.META is not None - + ##end @property def Metadata(self): return self.META.Data if self.META else {}