Files
BA-AD/baad/FlatData/KnockBackExcel.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

67 lines
2.4 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 KnockBackExcel(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = KnockBackExcel()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsKnockBackExcel(cls, buf, offset=0):
"""This method is deprecated. Please switch to GetRootAs."""
return cls.GetRootAs(buf, offset)
# KnockBackExcel
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# KnockBackExcel
def Index(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos)
return 0
# KnockBackExcel
def Dist(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# KnockBackExcel
def Speed(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
def Start(builder): builder.StartObject(3)
def KnockBackExcelStart(builder):
"""This method is deprecated. Please switch to Start."""
return Start(builder)
def AddIndex(builder, Index): builder.PrependInt64Slot(0, Index, 0)
def KnockBackExcelAddIndex(builder, Index):
"""This method is deprecated. Please switch to AddIndex."""
return AddIndex(builder, Index)
def AddDist(builder, Dist): builder.PrependFloat32Slot(1, Dist, 0.0)
def KnockBackExcelAddDist(builder, Dist):
"""This method is deprecated. Please switch to AddDist."""
return AddDist(builder, Dist)
def AddSpeed(builder, Speed): builder.PrependFloat32Slot(2, Speed, 0.0)
def KnockBackExcelAddSpeed(builder, Speed):
"""This method is deprecated. Please switch to AddSpeed."""
return AddSpeed(builder, Speed)
def End(builder): return builder.EndObject()
def KnockBackExcelEnd(builder):
"""This method is deprecated. Please switch to End."""
return End(builder)