Skip to content

Commit

Permalink
Update Chunks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Captian-obvious authored Nov 23, 2023
1 parent 4c8e863 commit 0b06ef2
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ class vi:
##end

def INST(chunk, rbxm):
buf=chunk.Data
ClassID=buf:readNumber("<I4")
ClassName=BasicTypes.String(buf)
buffer=chunk.Data
ClassID=buffer.readNumber("<I4")
ClassName=basicTypes.String(buffer)
if (buffer.read()=="\1"):
chunk.Error("Attempt to insert binary model with services")
##endif
count=buffer.readNumber("<I4")
refs=basicTypes.RefArray(buffer, count)
class theclass:
Name=ClassName,
Sizeof=count,
Refs=refs
##end
rbxm.ClassRefs[ClassID]=theclass
for ref in refs:
rbxm.InstanceRefs[ref]=VirtualInstance(ClassID, ClassName, ref)
##end
##end

0 comments on commit 0b06ef2

Please sign in to comment.