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

package order

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

type CommandScienceCreate struct {
	_tab flatbuffers.Table
}

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

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

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

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

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

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

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

func (rcv *CommandScienceCreate) Drive() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandScienceCreate) MutateDrive(n float64) bool {
	return rcv._tab.MutateFloat64Slot(6, n)
}

func (rcv *CommandScienceCreate) Weapons() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandScienceCreate) MutateWeapons(n float64) bool {
	return rcv._tab.MutateFloat64Slot(8, n)
}

func (rcv *CommandScienceCreate) Shields() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandScienceCreate) MutateShields(n float64) bool {
	return rcv._tab.MutateFloat64Slot(10, n)
}

func (rcv *CommandScienceCreate) Cargo() float64 {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
	if o != 0 {
		return rcv._tab.GetFloat64(o + rcv._tab.Pos)
	}
	return 0.0
}

func (rcv *CommandScienceCreate) MutateCargo(n float64) bool {
	return rcv._tab.MutateFloat64Slot(12, n)
}

func CommandScienceCreateStart(builder *flatbuffers.Builder) {
	builder.StartObject(5)
}
func CommandScienceCreateAddName(builder *flatbuffers.Builder, name flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(name), 0)
}
func CommandScienceCreateAddDrive(builder *flatbuffers.Builder, drive float64) {
	builder.PrependFloat64Slot(1, drive, 0.0)
}
func CommandScienceCreateAddWeapons(builder *flatbuffers.Builder, weapons float64) {
	builder.PrependFloat64Slot(2, weapons, 0.0)
}
func CommandScienceCreateAddShields(builder *flatbuffers.Builder, shields float64) {
	builder.PrependFloat64Slot(3, shields, 0.0)
}
func CommandScienceCreateAddCargo(builder *flatbuffers.Builder, cargo float64) {
	builder.PrependFloat64Slot(4, cargo, 0.0)
}
func CommandScienceCreateEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
