mirror of
https://github.com/Deathemonic/BA-AD.git
synced 2025-07-29 03:37:24 +02:00

- bump dump file to support latest client 1.46.287264 - updated flatbuf generator to support lastest dump file - refactored table extracter
111 lines
4.2 KiB
Python
111 lines
4.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 PropMotion(object):
|
|
__slots__ = ['_tab']
|
|
|
|
@classmethod
|
|
def GetRootAs(cls, buf, offset=0):
|
|
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
|
|
x = PropMotion()
|
|
x.Init(buf, n + offset)
|
|
return x
|
|
|
|
@classmethod
|
|
def GetRootAsPropMotion(cls, buf, offset=0):
|
|
"""This method is deprecated. Please switch to GetRootAs."""
|
|
return cls.GetRootAs(buf, offset)
|
|
# PropMotion
|
|
def Init(self, buf, pos):
|
|
self._tab = flatbuffers.table.Table(buf, pos)
|
|
|
|
# PropMotion
|
|
def Name(self):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
|
|
if o != 0:
|
|
return self._tab.String(o + self._tab.Pos)
|
|
return None
|
|
|
|
# PropMotion
|
|
def Positions(self, j):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
|
if o != 0:
|
|
x = self._tab.Vector(o)
|
|
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
|
|
x = self._tab.Indirect(x)
|
|
from ..FlatData.PropVector3 import PropVector3
|
|
obj = PropVector3()
|
|
obj.Init(self._tab.Bytes, x)
|
|
return obj
|
|
return None
|
|
|
|
# PropMotion
|
|
def PositionsLength(self):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
|
if o != 0:
|
|
return self._tab.VectorLen(o)
|
|
return 0
|
|
|
|
# PropMotion
|
|
def PositionsIsNone(self):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
|
|
return o == 0
|
|
|
|
# PropMotion
|
|
def Rotations(self, j):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
|
if o != 0:
|
|
x = self._tab.Vector(o)
|
|
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
|
|
x = self._tab.Indirect(x)
|
|
from ..FlatData.PropVector3 import PropVector3
|
|
obj = PropVector3()
|
|
obj.Init(self._tab.Bytes, x)
|
|
return obj
|
|
return None
|
|
|
|
# PropMotion
|
|
def RotationsLength(self):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
|
if o != 0:
|
|
return self._tab.VectorLen(o)
|
|
return 0
|
|
|
|
# PropMotion
|
|
def RotationsIsNone(self):
|
|
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
|
|
return o == 0
|
|
|
|
def Start(builder): builder.StartObject(3)
|
|
def PropMotionStart(builder):
|
|
"""This method is deprecated. Please switch to Start."""
|
|
return Start(builder)
|
|
def AddName(builder, Name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(Name), 0)
|
|
def PropMotionAddName(builder, Name):
|
|
"""This method is deprecated. Please switch to AddName."""
|
|
return AddName(builder, Name)
|
|
def AddPositions(builder, Positions): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(Positions), 0)
|
|
def PropMotionAddPositions(builder, Positions):
|
|
"""This method is deprecated. Please switch to AddPositions."""
|
|
return AddPositions(builder, Positions)
|
|
def StartPositionsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
|
|
def PropMotionStartPositionsVector(builder, numElems):
|
|
"""This method is deprecated. Please switch to Start."""
|
|
return StartPositionsVector(builder, numElems)
|
|
def AddRotations(builder, Rotations): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(Rotations), 0)
|
|
def PropMotionAddRotations(builder, Rotations):
|
|
"""This method is deprecated. Please switch to AddRotations."""
|
|
return AddRotations(builder, Rotations)
|
|
def StartRotationsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
|
|
def PropMotionStartRotationsVector(builder, numElems):
|
|
"""This method is deprecated. Please switch to Start."""
|
|
return StartRotationsVector(builder, numElems)
|
|
def End(builder): return builder.EndObject()
|
|
def PropMotionEnd(builder):
|
|
"""This method is deprecated. Please switch to End."""
|
|
return End(builder) |