Files
BA-AD/baad/FlatData/Form.py
Deathemonic 2386ae982d fix: importing
- typo fix at main
- added __all__ at flatdata init
- added missing type hints
- fix formatting
- table service now uses pathlib
- set unused progress to a private variable
- added proper error handling when extracting (probaly need to refactor it)
- fix path not recognizing as path at table extractor
- change the extracting progress bar to one instead of the download like progress bar
2024-07-14 03:50:50 +08: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)