// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package report

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type OtherScience struct {
	_tab flatbuffers.Table
}

func GetRootAsOtherScience(buf []byte, offset flatbuffers.UOffsetT) *OtherScience {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &OtherScience{}
	x.Init(buf, n+offset)
	return x
}

func FinishOtherScienceBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.Finish(offset)
}

func GetSizePrefixedRootAsOtherScience(buf []byte, offset flatbuffers.UOffsetT) *OtherScience {
	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
	x := &OtherScience{}
	x.Init(buf, n+offset+flatbuffers.SizeUint32)
	return x
}

func FinishSizePrefixedOtherScienceBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
	builder.FinishSizePrefixed(offset)
}

func (rcv *OtherScience) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *OtherScience) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *OtherScience) Race() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *OtherScience) Name() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *OtherScience) Drive() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *OtherScience) MutateDrive(n float32) bool {
	return rcv._tab.MutateFloat32Slot(8, n)
}

func (rcv *OtherScience) Weapons() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *OtherScience) MutateWeapons(n float32) bool {
	return rcv._tab.MutateFloat32Slot(10, n)
}

func (rcv *OtherScience) Shields() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *OtherScience) MutateShields(n float32) bool {
	return rcv._tab.MutateFloat32Slot(12, n)
}

func (rcv *OtherScience) Cargo() float32 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
	if o != 0 {
		return rcv._tab.GetFloat32(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *OtherScience) MutateCargo(n float32) bool {
	return rcv._tab.MutateFloat32Slot(14, n)
}

func OtherScienceStart(builder *flatbuffers.Builder) {
	builder.StartObject(6)
}
func OtherScienceAddRace(builder *flatbuffers.Builder, race flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(race), 0)
}
func OtherScienceAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(name), 0)
}
func OtherScienceAddDrive(builder *flatbuffers.Builder, drive float32) {
	builder.PrependFloat32Slot(2, drive, 0.0)
}
func OtherScienceAddWeapons(builder *flatbuffers.Builder, weapons float32) {
	builder.PrependFloat32Slot(3, weapons, 0.0)
}
func OtherScienceAddShields(builder *flatbuffers.Builder, shields float32) {
	builder.PrependFloat32Slot(4, shields, 0.0)
}
func OtherScienceAddCargo(builder *flatbuffers.Builder, cargo float32) {
	builder.PrependFloat32Slot(5, cargo, 0.0)
}
func OtherScienceEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
