# automatically generated by the FlatBuffers compiler, do not modify

# namespace: flat

import flatbuffers

# /// Sent when connecting to RLBot to indicate what type of messages are desired.
# /// This could be sent by a bot, or a bot manager governing several bots, an
# /// overlay, or any other utility that connects to the RLBot process.
class ReadyMessage(object):
    __slots__ = ['_tab']

    @classmethod
    def GetRootAsReadyMessage(cls, buf, offset):
        n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
        x = ReadyMessage()
        x.Init(buf, n + offset)
        return x

    # ReadyMessage
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # ReadyMessage
    def WantsBallPredictions(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)
        return 0

    # ReadyMessage
    def WantsQuickChat(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)
        return 0

    # ReadyMessage
    def WantsGameMessages(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
        if o != 0:
            return self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)
        return 0

def ReadyMessageStart(builder): builder.StartObject(3)
def ReadyMessageAddWantsBallPredictions(builder, wantsBallPredictions): builder.PrependBoolSlot(0, wantsBallPredictions, 0)
def ReadyMessageAddWantsQuickChat(builder, wantsQuickChat): builder.PrependBoolSlot(1, wantsQuickChat, 0)
def ReadyMessageAddWantsGameMessages(builder, wantsGameMessages): builder.PrependBoolSlot(2, wantsGameMessages, 0)
def ReadyMessageEnd(builder): return builder.EndObject()
