This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
K0lb3 16d6d3f877 flatbuf decoder added
integrated into extract_tables
2021-11-12 23:14:45 +01:00

64 lines
2.2 KiB
Python

# automatically generated by the FlatBuffers compiler, do not modify
# namespace: FlatData
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class Form(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Form()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsForm(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# Form
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# Form
def MoveEnd_(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from FlatData.MoveEnd import MoveEnd
obj = MoveEnd()
obj.Init(self._tab.Bytes, x)
return obj
return None
# Form
def PublicSkill(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
x = self._tab.Indirect(o + self._tab.Pos)
from FlatData.Motion import Motion
obj = Motion()
obj.Init(self._tab.Bytes, x)
return obj
return None
def Start(builder): builder.StartObject(2)
def FormStart(builder):
"""This method is deprecated. Please switch to Start."""
return Start(builder)
def AddMoveEnd_(builder, MoveEnd_): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(MoveEnd_), 0)
def FormAddMoveEnd_(builder, MoveEnd_):
"""This method is deprecated. Please switch to AddMoveEnd_."""
return AddMoveEnd_(builder, MoveEnd_)
def AddPublicSkill(builder, PublicSkill): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(PublicSkill), 0)
def FormAddPublicSkill(builder, PublicSkill):
"""This method is deprecated. Please switch to AddPublicSkill."""
return AddPublicSkill(builder, PublicSkill)
def End(builder): return builder.EndObject()
def FormEnd(builder):
"""This method is deprecated. Please switch to End."""
return End(builder)