ui/phase-14: rename planet end-to-end + order read-back

Wires the first end-to-end command through the full pipeline:
inspector rename action → local order draft → user.games.order
submit → optimistic overlay on map / inspector → server hydration
on cache miss via the new user.games.order.get message type.

Backend: GET /api/v1/user/games/{id}/orders forwards to engine
GET /api/v1/order. Gateway parses the engine PUT response into the
extended UserGamesOrderResponse FBS envelope and adds
executeUserGamesOrderGet for the read-back path. Frontend ports
ValidateTypeName to TS, lands the inline rename editor + Submit
button, and exposes a renderedReport context so consumers see the
overlay-applied snapshot.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Ilia Denisov
2026-05-09 11:50:09 +02:00
parent 381e41b325
commit f80c623a74
86 changed files with 7505 additions and 138 deletions
+40
View File
@@ -0,0 +1,40 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
export { CommandFleetMerge, CommandFleetMergeT } from './order/command-fleet-merge.js';
export { CommandFleetSend, CommandFleetSendT } from './order/command-fleet-send.js';
export { CommandItem, CommandItemT } from './order/command-item.js';
export { CommandPayload } from './order/command-payload.js';
export { CommandPlanetProduce, CommandPlanetProduceT } from './order/command-planet-produce.js';
export { CommandPlanetRename, CommandPlanetRenameT } from './order/command-planet-rename.js';
export { CommandPlanetRouteRemove, CommandPlanetRouteRemoveT } from './order/command-planet-route-remove.js';
export { CommandPlanetRouteSet, CommandPlanetRouteSetT } from './order/command-planet-route-set.js';
export { CommandRaceQuit, CommandRaceQuitT } from './order/command-race-quit.js';
export { CommandRaceRelation, CommandRaceRelationT } from './order/command-race-relation.js';
export { CommandRaceVote, CommandRaceVoteT } from './order/command-race-vote.js';
export { CommandScienceCreate, CommandScienceCreateT } from './order/command-science-create.js';
export { CommandScienceRemove, CommandScienceRemoveT } from './order/command-science-remove.js';
export { CommandShipClassCreate, CommandShipClassCreateT } from './order/command-ship-class-create.js';
export { CommandShipClassMerge, CommandShipClassMergeT } from './order/command-ship-class-merge.js';
export { CommandShipClassRemove, CommandShipClassRemoveT } from './order/command-ship-class-remove.js';
export { CommandShipGroupBreak, CommandShipGroupBreakT } from './order/command-ship-group-break.js';
export { CommandShipGroupDismantle, CommandShipGroupDismantleT } from './order/command-ship-group-dismantle.js';
export { CommandShipGroupJoinFleet, CommandShipGroupJoinFleetT } from './order/command-ship-group-join-fleet.js';
export { CommandShipGroupLoad, CommandShipGroupLoadT } from './order/command-ship-group-load.js';
export { CommandShipGroupMerge, CommandShipGroupMergeT } from './order/command-ship-group-merge.js';
export { CommandShipGroupSend, CommandShipGroupSendT } from './order/command-ship-group-send.js';
export { CommandShipGroupTransfer, CommandShipGroupTransferT } from './order/command-ship-group-transfer.js';
export { CommandShipGroupUnload, CommandShipGroupUnloadT } from './order/command-ship-group-unload.js';
export { CommandShipGroupUpgrade, CommandShipGroupUpgradeT } from './order/command-ship-group-upgrade.js';
export { PlanetProduction } from './order/planet-production.js';
export { PlanetRouteLoadType } from './order/planet-route-load-type.js';
export { Relation } from './order/relation.js';
export { ShipGroupCargo } from './order/ship-group-cargo.js';
export { ShipGroupUpgradeTech } from './order/ship-group-upgrade-tech.js';
export { UserGamesCommand, UserGamesCommandT } from './order/user-games-command.js';
export { UserGamesCommandResponse, UserGamesCommandResponseT } from './order/user-games-command-response.js';
export { UserGamesOrder, UserGamesOrderT } from './order/user-games-order.js';
export { UserGamesOrderGet, UserGamesOrderGetT } from './order/user-games-order-get.js';
export { UserGamesOrderGetResponse, UserGamesOrderGetResponseT } from './order/user-games-order-get-response.js';
export { UserGamesOrderResponse, UserGamesOrderResponseT } from './order/user-games-order-response.js';
@@ -0,0 +1,95 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandFleetMerge implements flatbuffers.IUnpackableObject<CommandFleetMergeT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandFleetMerge {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandFleetMerge(bb:flatbuffers.ByteBuffer, obj?:CommandFleetMerge):CommandFleetMerge {
return (obj || new CommandFleetMerge()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandFleetMerge(bb:flatbuffers.ByteBuffer, obj?:CommandFleetMerge):CommandFleetMerge {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandFleetMerge()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
target():string|null
target(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
target(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandFleetMerge(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static addTarget(builder:flatbuffers.Builder, targetOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, targetOffset, 0);
}
static endCommandFleetMerge(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandFleetMerge(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, targetOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandFleetMerge.startCommandFleetMerge(builder);
CommandFleetMerge.addName(builder, nameOffset);
CommandFleetMerge.addTarget(builder, targetOffset);
return CommandFleetMerge.endCommandFleetMerge(builder);
}
unpack(): CommandFleetMergeT {
return new CommandFleetMergeT(
this.name(),
this.target()
);
}
unpackTo(_o: CommandFleetMergeT): void {
_o.name = this.name();
_o.target = this.target();
}
}
export class CommandFleetMergeT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null,
public target: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
const target = (this.target !== null ? builder.createString(this.target!) : 0);
return CommandFleetMerge.createCommandFleetMerge(builder,
name,
target
);
}
}
@@ -0,0 +1,92 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandFleetSend implements flatbuffers.IUnpackableObject<CommandFleetSendT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandFleetSend {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandFleetSend(bb:flatbuffers.ByteBuffer, obj?:CommandFleetSend):CommandFleetSend {
return (obj || new CommandFleetSend()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandFleetSend(bb:flatbuffers.ByteBuffer, obj?:CommandFleetSend):CommandFleetSend {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandFleetSend()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
destination():bigint {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
static startCommandFleetSend(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static addDestination(builder:flatbuffers.Builder, destination:bigint) {
builder.addFieldInt64(1, destination, BigInt('0'));
}
static endCommandFleetSend(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandFleetSend(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, destination:bigint):flatbuffers.Offset {
CommandFleetSend.startCommandFleetSend(builder);
CommandFleetSend.addName(builder, nameOffset);
CommandFleetSend.addDestination(builder, destination);
return CommandFleetSend.endCommandFleetSend(builder);
}
unpack(): CommandFleetSendT {
return new CommandFleetSendT(
this.name(),
this.destination()
);
}
unpackTo(_o: CommandFleetSendT): void {
_o.name = this.name();
_o.destination = this.destination();
}
}
export class CommandFleetSendT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null,
public destination: bigint = BigInt('0')
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandFleetSend.createCommandFleetSend(builder,
name,
this.destination
);
}
}
@@ -0,0 +1,170 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { CommandFleetMerge, CommandFleetMergeT } from './command-fleet-merge.js';
import { CommandFleetSend, CommandFleetSendT } from './command-fleet-send.js';
import { CommandPayload, unionToCommandPayload, unionListToCommandPayload } from './command-payload.js';
import { CommandPlanetProduce, CommandPlanetProduceT } from './command-planet-produce.js';
import { CommandPlanetRename, CommandPlanetRenameT } from './command-planet-rename.js';
import { CommandPlanetRouteRemove, CommandPlanetRouteRemoveT } from './command-planet-route-remove.js';
import { CommandPlanetRouteSet, CommandPlanetRouteSetT } from './command-planet-route-set.js';
import { CommandRaceQuit, CommandRaceQuitT } from './command-race-quit.js';
import { CommandRaceRelation, CommandRaceRelationT } from './command-race-relation.js';
import { CommandRaceVote, CommandRaceVoteT } from './command-race-vote.js';
import { CommandScienceCreate, CommandScienceCreateT } from './command-science-create.js';
import { CommandScienceRemove, CommandScienceRemoveT } from './command-science-remove.js';
import { CommandShipClassCreate, CommandShipClassCreateT } from './command-ship-class-create.js';
import { CommandShipClassMerge, CommandShipClassMergeT } from './command-ship-class-merge.js';
import { CommandShipClassRemove, CommandShipClassRemoveT } from './command-ship-class-remove.js';
import { CommandShipGroupBreak, CommandShipGroupBreakT } from './command-ship-group-break.js';
import { CommandShipGroupDismantle, CommandShipGroupDismantleT } from './command-ship-group-dismantle.js';
import { CommandShipGroupJoinFleet, CommandShipGroupJoinFleetT } from './command-ship-group-join-fleet.js';
import { CommandShipGroupLoad, CommandShipGroupLoadT } from './command-ship-group-load.js';
import { CommandShipGroupMerge, CommandShipGroupMergeT } from './command-ship-group-merge.js';
import { CommandShipGroupSend, CommandShipGroupSendT } from './command-ship-group-send.js';
import { CommandShipGroupTransfer, CommandShipGroupTransferT } from './command-ship-group-transfer.js';
import { CommandShipGroupUnload, CommandShipGroupUnloadT } from './command-ship-group-unload.js';
import { CommandShipGroupUpgrade, CommandShipGroupUpgradeT } from './command-ship-group-upgrade.js';
export class CommandItem implements flatbuffers.IUnpackableObject<CommandItemT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandItem {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandItem(bb:flatbuffers.ByteBuffer, obj?:CommandItem):CommandItem {
return (obj || new CommandItem()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandItem(bb:flatbuffers.ByteBuffer, obj?:CommandItem):CommandItem {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandItem()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
cmdId():string|null
cmdId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
cmdId(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
cmdApplied():boolean|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null;
}
cmdErrorCode():bigint|null {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : null;
}
payloadType():CommandPayload {
const offset = this.bb!.__offset(this.bb_pos, 10);
return offset ? this.bb!.readUint8(this.bb_pos + offset) : CommandPayload.NONE;
}
payload<T extends flatbuffers.Table>(obj:any):any|null {
const offset = this.bb!.__offset(this.bb_pos, 12);
return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null;
}
static startCommandItem(builder:flatbuffers.Builder) {
builder.startObject(5);
}
static addCmdId(builder:flatbuffers.Builder, cmdIdOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, cmdIdOffset, 0);
}
static addCmdApplied(builder:flatbuffers.Builder, cmdApplied:boolean) {
builder.addFieldInt8(1, +cmdApplied, null);
}
static addCmdErrorCode(builder:flatbuffers.Builder, cmdErrorCode:bigint) {
builder.addFieldInt64(2, cmdErrorCode, null);
}
static addPayloadType(builder:flatbuffers.Builder, payloadType:CommandPayload) {
builder.addFieldInt8(3, payloadType, CommandPayload.NONE);
}
static addPayload(builder:flatbuffers.Builder, payloadOffset:flatbuffers.Offset) {
builder.addFieldOffset(4, payloadOffset, 0);
}
static endCommandItem(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 12) // payload
return offset;
}
static createCommandItem(builder:flatbuffers.Builder, cmdIdOffset:flatbuffers.Offset, cmdApplied:boolean|null, cmdErrorCode:bigint|null, payloadType:CommandPayload, payloadOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandItem.startCommandItem(builder);
CommandItem.addCmdId(builder, cmdIdOffset);
if (cmdApplied !== null)
CommandItem.addCmdApplied(builder, cmdApplied);
if (cmdErrorCode !== null)
CommandItem.addCmdErrorCode(builder, cmdErrorCode);
CommandItem.addPayloadType(builder, payloadType);
CommandItem.addPayload(builder, payloadOffset);
return CommandItem.endCommandItem(builder);
}
unpack(): CommandItemT {
return new CommandItemT(
this.cmdId(),
this.cmdApplied(),
this.cmdErrorCode(),
this.payloadType(),
(() => {
const temp = unionToCommandPayload(this.payloadType(), this.payload.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})()
);
}
unpackTo(_o: CommandItemT): void {
_o.cmdId = this.cmdId();
_o.cmdApplied = this.cmdApplied();
_o.cmdErrorCode = this.cmdErrorCode();
_o.payloadType = this.payloadType();
_o.payload = (() => {
const temp = unionToCommandPayload(this.payloadType(), this.payload.bind(this));
if(temp === null) { return null; }
return temp.unpack()
})();
}
}
export class CommandItemT implements flatbuffers.IGeneratedObject {
constructor(
public cmdId: string|Uint8Array|null = null,
public cmdApplied: boolean|null = null,
public cmdErrorCode: bigint|null = null,
public payloadType: CommandPayload = CommandPayload.NONE,
public payload: CommandFleetMergeT|CommandFleetSendT|CommandPlanetProduceT|CommandPlanetRenameT|CommandPlanetRouteRemoveT|CommandPlanetRouteSetT|CommandRaceQuitT|CommandRaceRelationT|CommandRaceVoteT|CommandScienceCreateT|CommandScienceRemoveT|CommandShipClassCreateT|CommandShipClassMergeT|CommandShipClassRemoveT|CommandShipGroupBreakT|CommandShipGroupDismantleT|CommandShipGroupJoinFleetT|CommandShipGroupLoadT|CommandShipGroupMergeT|CommandShipGroupSendT|CommandShipGroupTransferT|CommandShipGroupUnloadT|CommandShipGroupUpgradeT|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const cmdId = (this.cmdId !== null ? builder.createString(this.cmdId!) : 0);
const payload = builder.createObjectOffset(this.payload);
return CommandItem.createCommandItem(builder,
cmdId,
this.cmdApplied,
this.cmdErrorCode,
this.payloadType,
payload
);
}
}
@@ -0,0 +1,122 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import { CommandFleetMerge, CommandFleetMergeT } from './command-fleet-merge.js';
import { CommandFleetSend, CommandFleetSendT } from './command-fleet-send.js';
import { CommandPlanetProduce, CommandPlanetProduceT } from './command-planet-produce.js';
import { CommandPlanetRename, CommandPlanetRenameT } from './command-planet-rename.js';
import { CommandPlanetRouteRemove, CommandPlanetRouteRemoveT } from './command-planet-route-remove.js';
import { CommandPlanetRouteSet, CommandPlanetRouteSetT } from './command-planet-route-set.js';
import { CommandRaceQuit, CommandRaceQuitT } from './command-race-quit.js';
import { CommandRaceRelation, CommandRaceRelationT } from './command-race-relation.js';
import { CommandRaceVote, CommandRaceVoteT } from './command-race-vote.js';
import { CommandScienceCreate, CommandScienceCreateT } from './command-science-create.js';
import { CommandScienceRemove, CommandScienceRemoveT } from './command-science-remove.js';
import { CommandShipClassCreate, CommandShipClassCreateT } from './command-ship-class-create.js';
import { CommandShipClassMerge, CommandShipClassMergeT } from './command-ship-class-merge.js';
import { CommandShipClassRemove, CommandShipClassRemoveT } from './command-ship-class-remove.js';
import { CommandShipGroupBreak, CommandShipGroupBreakT } from './command-ship-group-break.js';
import { CommandShipGroupDismantle, CommandShipGroupDismantleT } from './command-ship-group-dismantle.js';
import { CommandShipGroupJoinFleet, CommandShipGroupJoinFleetT } from './command-ship-group-join-fleet.js';
import { CommandShipGroupLoad, CommandShipGroupLoadT } from './command-ship-group-load.js';
import { CommandShipGroupMerge, CommandShipGroupMergeT } from './command-ship-group-merge.js';
import { CommandShipGroupSend, CommandShipGroupSendT } from './command-ship-group-send.js';
import { CommandShipGroupTransfer, CommandShipGroupTransferT } from './command-ship-group-transfer.js';
import { CommandShipGroupUnload, CommandShipGroupUnloadT } from './command-ship-group-unload.js';
import { CommandShipGroupUpgrade, CommandShipGroupUpgradeT } from './command-ship-group-upgrade.js';
export enum CommandPayload {
NONE = 0,
CommandRaceQuit = 1,
CommandRaceVote = 2,
CommandRaceRelation = 3,
CommandShipClassCreate = 4,
CommandShipClassMerge = 5,
CommandShipClassRemove = 6,
CommandShipGroupBreak = 7,
CommandShipGroupLoad = 8,
CommandShipGroupUnload = 9,
CommandShipGroupSend = 10,
CommandShipGroupUpgrade = 11,
CommandShipGroupMerge = 12,
CommandShipGroupDismantle = 13,
CommandShipGroupTransfer = 14,
CommandShipGroupJoinFleet = 15,
CommandFleetMerge = 16,
CommandFleetSend = 17,
CommandScienceCreate = 18,
CommandScienceRemove = 19,
CommandPlanetRename = 20,
CommandPlanetProduce = 21,
CommandPlanetRouteSet = 22,
CommandPlanetRouteRemove = 23
}
export function unionToCommandPayload(
type: CommandPayload,
accessor: (obj:CommandFleetMerge|CommandFleetSend|CommandPlanetProduce|CommandPlanetRename|CommandPlanetRouteRemove|CommandPlanetRouteSet|CommandRaceQuit|CommandRaceRelation|CommandRaceVote|CommandScienceCreate|CommandScienceRemove|CommandShipClassCreate|CommandShipClassMerge|CommandShipClassRemove|CommandShipGroupBreak|CommandShipGroupDismantle|CommandShipGroupJoinFleet|CommandShipGroupLoad|CommandShipGroupMerge|CommandShipGroupSend|CommandShipGroupTransfer|CommandShipGroupUnload|CommandShipGroupUpgrade) => CommandFleetMerge|CommandFleetSend|CommandPlanetProduce|CommandPlanetRename|CommandPlanetRouteRemove|CommandPlanetRouteSet|CommandRaceQuit|CommandRaceRelation|CommandRaceVote|CommandScienceCreate|CommandScienceRemove|CommandShipClassCreate|CommandShipClassMerge|CommandShipClassRemove|CommandShipGroupBreak|CommandShipGroupDismantle|CommandShipGroupJoinFleet|CommandShipGroupLoad|CommandShipGroupMerge|CommandShipGroupSend|CommandShipGroupTransfer|CommandShipGroupUnload|CommandShipGroupUpgrade|null
): CommandFleetMerge|CommandFleetSend|CommandPlanetProduce|CommandPlanetRename|CommandPlanetRouteRemove|CommandPlanetRouteSet|CommandRaceQuit|CommandRaceRelation|CommandRaceVote|CommandScienceCreate|CommandScienceRemove|CommandShipClassCreate|CommandShipClassMerge|CommandShipClassRemove|CommandShipGroupBreak|CommandShipGroupDismantle|CommandShipGroupJoinFleet|CommandShipGroupLoad|CommandShipGroupMerge|CommandShipGroupSend|CommandShipGroupTransfer|CommandShipGroupUnload|CommandShipGroupUpgrade|null {
switch(CommandPayload[type]) {
case 'NONE': return null;
case 'CommandRaceQuit': return accessor(new CommandRaceQuit())! as CommandRaceQuit;
case 'CommandRaceVote': return accessor(new CommandRaceVote())! as CommandRaceVote;
case 'CommandRaceRelation': return accessor(new CommandRaceRelation())! as CommandRaceRelation;
case 'CommandShipClassCreate': return accessor(new CommandShipClassCreate())! as CommandShipClassCreate;
case 'CommandShipClassMerge': return accessor(new CommandShipClassMerge())! as CommandShipClassMerge;
case 'CommandShipClassRemove': return accessor(new CommandShipClassRemove())! as CommandShipClassRemove;
case 'CommandShipGroupBreak': return accessor(new CommandShipGroupBreak())! as CommandShipGroupBreak;
case 'CommandShipGroupLoad': return accessor(new CommandShipGroupLoad())! as CommandShipGroupLoad;
case 'CommandShipGroupUnload': return accessor(new CommandShipGroupUnload())! as CommandShipGroupUnload;
case 'CommandShipGroupSend': return accessor(new CommandShipGroupSend())! as CommandShipGroupSend;
case 'CommandShipGroupUpgrade': return accessor(new CommandShipGroupUpgrade())! as CommandShipGroupUpgrade;
case 'CommandShipGroupMerge': return accessor(new CommandShipGroupMerge())! as CommandShipGroupMerge;
case 'CommandShipGroupDismantle': return accessor(new CommandShipGroupDismantle())! as CommandShipGroupDismantle;
case 'CommandShipGroupTransfer': return accessor(new CommandShipGroupTransfer())! as CommandShipGroupTransfer;
case 'CommandShipGroupJoinFleet': return accessor(new CommandShipGroupJoinFleet())! as CommandShipGroupJoinFleet;
case 'CommandFleetMerge': return accessor(new CommandFleetMerge())! as CommandFleetMerge;
case 'CommandFleetSend': return accessor(new CommandFleetSend())! as CommandFleetSend;
case 'CommandScienceCreate': return accessor(new CommandScienceCreate())! as CommandScienceCreate;
case 'CommandScienceRemove': return accessor(new CommandScienceRemove())! as CommandScienceRemove;
case 'CommandPlanetRename': return accessor(new CommandPlanetRename())! as CommandPlanetRename;
case 'CommandPlanetProduce': return accessor(new CommandPlanetProduce())! as CommandPlanetProduce;
case 'CommandPlanetRouteSet': return accessor(new CommandPlanetRouteSet())! as CommandPlanetRouteSet;
case 'CommandPlanetRouteRemove': return accessor(new CommandPlanetRouteRemove())! as CommandPlanetRouteRemove;
default: return null;
}
}
export function unionListToCommandPayload(
type: CommandPayload,
accessor: (index: number, obj:CommandFleetMerge|CommandFleetSend|CommandPlanetProduce|CommandPlanetRename|CommandPlanetRouteRemove|CommandPlanetRouteSet|CommandRaceQuit|CommandRaceRelation|CommandRaceVote|CommandScienceCreate|CommandScienceRemove|CommandShipClassCreate|CommandShipClassMerge|CommandShipClassRemove|CommandShipGroupBreak|CommandShipGroupDismantle|CommandShipGroupJoinFleet|CommandShipGroupLoad|CommandShipGroupMerge|CommandShipGroupSend|CommandShipGroupTransfer|CommandShipGroupUnload|CommandShipGroupUpgrade) => CommandFleetMerge|CommandFleetSend|CommandPlanetProduce|CommandPlanetRename|CommandPlanetRouteRemove|CommandPlanetRouteSet|CommandRaceQuit|CommandRaceRelation|CommandRaceVote|CommandScienceCreate|CommandScienceRemove|CommandShipClassCreate|CommandShipClassMerge|CommandShipClassRemove|CommandShipGroupBreak|CommandShipGroupDismantle|CommandShipGroupJoinFleet|CommandShipGroupLoad|CommandShipGroupMerge|CommandShipGroupSend|CommandShipGroupTransfer|CommandShipGroupUnload|CommandShipGroupUpgrade|null,
index: number
): CommandFleetMerge|CommandFleetSend|CommandPlanetProduce|CommandPlanetRename|CommandPlanetRouteRemove|CommandPlanetRouteSet|CommandRaceQuit|CommandRaceRelation|CommandRaceVote|CommandScienceCreate|CommandScienceRemove|CommandShipClassCreate|CommandShipClassMerge|CommandShipClassRemove|CommandShipGroupBreak|CommandShipGroupDismantle|CommandShipGroupJoinFleet|CommandShipGroupLoad|CommandShipGroupMerge|CommandShipGroupSend|CommandShipGroupTransfer|CommandShipGroupUnload|CommandShipGroupUpgrade|null {
switch(CommandPayload[type]) {
case 'NONE': return null;
case 'CommandRaceQuit': return accessor(index, new CommandRaceQuit())! as CommandRaceQuit;
case 'CommandRaceVote': return accessor(index, new CommandRaceVote())! as CommandRaceVote;
case 'CommandRaceRelation': return accessor(index, new CommandRaceRelation())! as CommandRaceRelation;
case 'CommandShipClassCreate': return accessor(index, new CommandShipClassCreate())! as CommandShipClassCreate;
case 'CommandShipClassMerge': return accessor(index, new CommandShipClassMerge())! as CommandShipClassMerge;
case 'CommandShipClassRemove': return accessor(index, new CommandShipClassRemove())! as CommandShipClassRemove;
case 'CommandShipGroupBreak': return accessor(index, new CommandShipGroupBreak())! as CommandShipGroupBreak;
case 'CommandShipGroupLoad': return accessor(index, new CommandShipGroupLoad())! as CommandShipGroupLoad;
case 'CommandShipGroupUnload': return accessor(index, new CommandShipGroupUnload())! as CommandShipGroupUnload;
case 'CommandShipGroupSend': return accessor(index, new CommandShipGroupSend())! as CommandShipGroupSend;
case 'CommandShipGroupUpgrade': return accessor(index, new CommandShipGroupUpgrade())! as CommandShipGroupUpgrade;
case 'CommandShipGroupMerge': return accessor(index, new CommandShipGroupMerge())! as CommandShipGroupMerge;
case 'CommandShipGroupDismantle': return accessor(index, new CommandShipGroupDismantle())! as CommandShipGroupDismantle;
case 'CommandShipGroupTransfer': return accessor(index, new CommandShipGroupTransfer())! as CommandShipGroupTransfer;
case 'CommandShipGroupJoinFleet': return accessor(index, new CommandShipGroupJoinFleet())! as CommandShipGroupJoinFleet;
case 'CommandFleetMerge': return accessor(index, new CommandFleetMerge())! as CommandFleetMerge;
case 'CommandFleetSend': return accessor(index, new CommandFleetSend())! as CommandFleetSend;
case 'CommandScienceCreate': return accessor(index, new CommandScienceCreate())! as CommandScienceCreate;
case 'CommandScienceRemove': return accessor(index, new CommandScienceRemove())! as CommandScienceRemove;
case 'CommandPlanetRename': return accessor(index, new CommandPlanetRename())! as CommandPlanetRename;
case 'CommandPlanetProduce': return accessor(index, new CommandPlanetProduce())! as CommandPlanetProduce;
case 'CommandPlanetRouteSet': return accessor(index, new CommandPlanetRouteSet())! as CommandPlanetRouteSet;
case 'CommandPlanetRouteRemove': return accessor(index, new CommandPlanetRouteRemove())! as CommandPlanetRouteRemove;
default: return null;
}
}
@@ -0,0 +1,107 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { PlanetProduction } from './planet-production.js';
export class CommandPlanetProduce implements flatbuffers.IUnpackableObject<CommandPlanetProduceT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandPlanetProduce {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandPlanetProduce(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetProduce):CommandPlanetProduce {
return (obj || new CommandPlanetProduce()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandPlanetProduce(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetProduce):CommandPlanetProduce {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandPlanetProduce()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
number():bigint {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
production():PlanetProduction {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : PlanetProduction.UNKNOWN;
}
subject():string|null
subject(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
subject(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandPlanetProduce(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addNumber(builder:flatbuffers.Builder, number:bigint) {
builder.addFieldInt64(0, number, BigInt('0'));
}
static addProduction(builder:flatbuffers.Builder, production:PlanetProduction) {
builder.addFieldInt8(1, production, PlanetProduction.UNKNOWN);
}
static addSubject(builder:flatbuffers.Builder, subjectOffset:flatbuffers.Offset) {
builder.addFieldOffset(2, subjectOffset, 0);
}
static endCommandPlanetProduce(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandPlanetProduce(builder:flatbuffers.Builder, number:bigint, production:PlanetProduction, subjectOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandPlanetProduce.startCommandPlanetProduce(builder);
CommandPlanetProduce.addNumber(builder, number);
CommandPlanetProduce.addProduction(builder, production);
CommandPlanetProduce.addSubject(builder, subjectOffset);
return CommandPlanetProduce.endCommandPlanetProduce(builder);
}
unpack(): CommandPlanetProduceT {
return new CommandPlanetProduceT(
this.number(),
this.production(),
this.subject()
);
}
unpackTo(_o: CommandPlanetProduceT): void {
_o.number = this.number();
_o.production = this.production();
_o.subject = this.subject();
}
}
export class CommandPlanetProduceT implements flatbuffers.IGeneratedObject {
constructor(
public number: bigint = BigInt('0'),
public production: PlanetProduction = PlanetProduction.UNKNOWN,
public subject: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const subject = (this.subject !== null ? builder.createString(this.subject!) : 0);
return CommandPlanetProduce.createCommandPlanetProduce(builder,
this.number,
this.production,
subject
);
}
}
@@ -0,0 +1,92 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandPlanetRename implements flatbuffers.IUnpackableObject<CommandPlanetRenameT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandPlanetRename {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandPlanetRename(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetRename):CommandPlanetRename {
return (obj || new CommandPlanetRename()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandPlanetRename(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetRename):CommandPlanetRename {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandPlanetRename()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
number():bigint {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandPlanetRename(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addNumber(builder:flatbuffers.Builder, number:bigint) {
builder.addFieldInt64(0, number, BigInt('0'));
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, nameOffset, 0);
}
static endCommandPlanetRename(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandPlanetRename(builder:flatbuffers.Builder, number:bigint, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandPlanetRename.startCommandPlanetRename(builder);
CommandPlanetRename.addNumber(builder, number);
CommandPlanetRename.addName(builder, nameOffset);
return CommandPlanetRename.endCommandPlanetRename(builder);
}
unpack(): CommandPlanetRenameT {
return new CommandPlanetRenameT(
this.number(),
this.name()
);
}
unpackTo(_o: CommandPlanetRenameT): void {
_o.number = this.number();
_o.name = this.name();
}
}
export class CommandPlanetRenameT implements flatbuffers.IGeneratedObject {
constructor(
public number: bigint = BigInt('0'),
public name: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandPlanetRename.createCommandPlanetRename(builder,
this.number,
name
);
}
}
@@ -0,0 +1,89 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { PlanetRouteLoadType } from './planet-route-load-type.js';
export class CommandPlanetRouteRemove implements flatbuffers.IUnpackableObject<CommandPlanetRouteRemoveT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandPlanetRouteRemove {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandPlanetRouteRemove(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetRouteRemove):CommandPlanetRouteRemove {
return (obj || new CommandPlanetRouteRemove()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandPlanetRouteRemove(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetRouteRemove):CommandPlanetRouteRemove {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandPlanetRouteRemove()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
origin():bigint {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
loadType():PlanetRouteLoadType {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : PlanetRouteLoadType.UNKNOWN;
}
static startCommandPlanetRouteRemove(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addOrigin(builder:flatbuffers.Builder, origin:bigint) {
builder.addFieldInt64(0, origin, BigInt('0'));
}
static addLoadType(builder:flatbuffers.Builder, loadType:PlanetRouteLoadType) {
builder.addFieldInt8(1, loadType, PlanetRouteLoadType.UNKNOWN);
}
static endCommandPlanetRouteRemove(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandPlanetRouteRemove(builder:flatbuffers.Builder, origin:bigint, loadType:PlanetRouteLoadType):flatbuffers.Offset {
CommandPlanetRouteRemove.startCommandPlanetRouteRemove(builder);
CommandPlanetRouteRemove.addOrigin(builder, origin);
CommandPlanetRouteRemove.addLoadType(builder, loadType);
return CommandPlanetRouteRemove.endCommandPlanetRouteRemove(builder);
}
unpack(): CommandPlanetRouteRemoveT {
return new CommandPlanetRouteRemoveT(
this.origin(),
this.loadType()
);
}
unpackTo(_o: CommandPlanetRouteRemoveT): void {
_o.origin = this.origin();
_o.loadType = this.loadType();
}
}
export class CommandPlanetRouteRemoveT implements flatbuffers.IGeneratedObject {
constructor(
public origin: bigint = BigInt('0'),
public loadType: PlanetRouteLoadType = PlanetRouteLoadType.UNKNOWN
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
return CommandPlanetRouteRemove.createCommandPlanetRouteRemove(builder,
this.origin,
this.loadType
);
}
}
@@ -0,0 +1,103 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { PlanetRouteLoadType } from './planet-route-load-type.js';
export class CommandPlanetRouteSet implements flatbuffers.IUnpackableObject<CommandPlanetRouteSetT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandPlanetRouteSet {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandPlanetRouteSet(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetRouteSet):CommandPlanetRouteSet {
return (obj || new CommandPlanetRouteSet()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandPlanetRouteSet(bb:flatbuffers.ByteBuffer, obj?:CommandPlanetRouteSet):CommandPlanetRouteSet {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandPlanetRouteSet()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
origin():bigint {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
destination():bigint {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
loadType():PlanetRouteLoadType {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : PlanetRouteLoadType.UNKNOWN;
}
static startCommandPlanetRouteSet(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addOrigin(builder:flatbuffers.Builder, origin:bigint) {
builder.addFieldInt64(0, origin, BigInt('0'));
}
static addDestination(builder:flatbuffers.Builder, destination:bigint) {
builder.addFieldInt64(1, destination, BigInt('0'));
}
static addLoadType(builder:flatbuffers.Builder, loadType:PlanetRouteLoadType) {
builder.addFieldInt8(2, loadType, PlanetRouteLoadType.UNKNOWN);
}
static endCommandPlanetRouteSet(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandPlanetRouteSet(builder:flatbuffers.Builder, origin:bigint, destination:bigint, loadType:PlanetRouteLoadType):flatbuffers.Offset {
CommandPlanetRouteSet.startCommandPlanetRouteSet(builder);
CommandPlanetRouteSet.addOrigin(builder, origin);
CommandPlanetRouteSet.addDestination(builder, destination);
CommandPlanetRouteSet.addLoadType(builder, loadType);
return CommandPlanetRouteSet.endCommandPlanetRouteSet(builder);
}
unpack(): CommandPlanetRouteSetT {
return new CommandPlanetRouteSetT(
this.origin(),
this.destination(),
this.loadType()
);
}
unpackTo(_o: CommandPlanetRouteSetT): void {
_o.origin = this.origin();
_o.destination = this.destination();
_o.loadType = this.loadType();
}
}
export class CommandPlanetRouteSetT implements flatbuffers.IGeneratedObject {
constructor(
public origin: bigint = BigInt('0'),
public destination: bigint = BigInt('0'),
public loadType: PlanetRouteLoadType = PlanetRouteLoadType.UNKNOWN
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
return CommandPlanetRouteSet.createCommandPlanetRouteSet(builder,
this.origin,
this.destination,
this.loadType
);
}
}
@@ -0,0 +1,56 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandRaceQuit implements flatbuffers.IUnpackableObject<CommandRaceQuitT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandRaceQuit {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandRaceQuit(bb:flatbuffers.ByteBuffer, obj?:CommandRaceQuit):CommandRaceQuit {
return (obj || new CommandRaceQuit()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandRaceQuit(bb:flatbuffers.ByteBuffer, obj?:CommandRaceQuit):CommandRaceQuit {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandRaceQuit()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static startCommandRaceQuit(builder:flatbuffers.Builder) {
builder.startObject(0);
}
static endCommandRaceQuit(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandRaceQuit(builder:flatbuffers.Builder):flatbuffers.Offset {
CommandRaceQuit.startCommandRaceQuit(builder);
return CommandRaceQuit.endCommandRaceQuit(builder);
}
unpack(): CommandRaceQuitT {
return new CommandRaceQuitT();
}
unpackTo(_o: CommandRaceQuitT): void {}
}
export class CommandRaceQuitT implements flatbuffers.IGeneratedObject {
constructor(){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
return CommandRaceQuit.createCommandRaceQuit(builder);
}
}
@@ -0,0 +1,93 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { Relation } from './relation.js';
export class CommandRaceRelation implements flatbuffers.IUnpackableObject<CommandRaceRelationT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandRaceRelation {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandRaceRelation(bb:flatbuffers.ByteBuffer, obj?:CommandRaceRelation):CommandRaceRelation {
return (obj || new CommandRaceRelation()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandRaceRelation(bb:flatbuffers.ByteBuffer, obj?:CommandRaceRelation):CommandRaceRelation {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandRaceRelation()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
acceptor():string|null
acceptor(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
acceptor(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
relation():Relation {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : Relation.UNKNOWN;
}
static startCommandRaceRelation(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addAcceptor(builder:flatbuffers.Builder, acceptorOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, acceptorOffset, 0);
}
static addRelation(builder:flatbuffers.Builder, relation:Relation) {
builder.addFieldInt8(1, relation, Relation.UNKNOWN);
}
static endCommandRaceRelation(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandRaceRelation(builder:flatbuffers.Builder, acceptorOffset:flatbuffers.Offset, relation:Relation):flatbuffers.Offset {
CommandRaceRelation.startCommandRaceRelation(builder);
CommandRaceRelation.addAcceptor(builder, acceptorOffset);
CommandRaceRelation.addRelation(builder, relation);
return CommandRaceRelation.endCommandRaceRelation(builder);
}
unpack(): CommandRaceRelationT {
return new CommandRaceRelationT(
this.acceptor(),
this.relation()
);
}
unpackTo(_o: CommandRaceRelationT): void {
_o.acceptor = this.acceptor();
_o.relation = this.relation();
}
}
export class CommandRaceRelationT implements flatbuffers.IGeneratedObject {
constructor(
public acceptor: string|Uint8Array|null = null,
public relation: Relation = Relation.UNKNOWN
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const acceptor = (this.acceptor !== null ? builder.createString(this.acceptor!) : 0);
return CommandRaceRelation.createCommandRaceRelation(builder,
acceptor,
this.relation
);
}
}
@@ -0,0 +1,78 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandRaceVote implements flatbuffers.IUnpackableObject<CommandRaceVoteT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandRaceVote {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandRaceVote(bb:flatbuffers.ByteBuffer, obj?:CommandRaceVote):CommandRaceVote {
return (obj || new CommandRaceVote()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandRaceVote(bb:flatbuffers.ByteBuffer, obj?:CommandRaceVote):CommandRaceVote {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandRaceVote()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
acceptor():string|null
acceptor(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
acceptor(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandRaceVote(builder:flatbuffers.Builder) {
builder.startObject(1);
}
static addAcceptor(builder:flatbuffers.Builder, acceptorOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, acceptorOffset, 0);
}
static endCommandRaceVote(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandRaceVote(builder:flatbuffers.Builder, acceptorOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandRaceVote.startCommandRaceVote(builder);
CommandRaceVote.addAcceptor(builder, acceptorOffset);
return CommandRaceVote.endCommandRaceVote(builder);
}
unpack(): CommandRaceVoteT {
return new CommandRaceVoteT(
this.acceptor()
);
}
unpackTo(_o: CommandRaceVoteT): void {
_o.acceptor = this.acceptor();
}
}
export class CommandRaceVoteT implements flatbuffers.IGeneratedObject {
constructor(
public acceptor: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const acceptor = (this.acceptor !== null ? builder.createString(this.acceptor!) : 0);
return CommandRaceVote.createCommandRaceVote(builder,
acceptor
);
}
}
@@ -0,0 +1,134 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandScienceCreate implements flatbuffers.IUnpackableObject<CommandScienceCreateT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandScienceCreate {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandScienceCreate(bb:flatbuffers.ByteBuffer, obj?:CommandScienceCreate):CommandScienceCreate {
return (obj || new CommandScienceCreate()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandScienceCreate(bb:flatbuffers.ByteBuffer, obj?:CommandScienceCreate):CommandScienceCreate {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandScienceCreate()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
drive():number {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
weapons():number {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
shields():number {
const offset = this.bb!.__offset(this.bb_pos, 10);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
cargo():number {
const offset = this.bb!.__offset(this.bb_pos, 12);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
static startCommandScienceCreate(builder:flatbuffers.Builder) {
builder.startObject(5);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static addDrive(builder:flatbuffers.Builder, drive:number) {
builder.addFieldFloat64(1, drive, 0.0);
}
static addWeapons(builder:flatbuffers.Builder, weapons:number) {
builder.addFieldFloat64(2, weapons, 0.0);
}
static addShields(builder:flatbuffers.Builder, shields:number) {
builder.addFieldFloat64(3, shields, 0.0);
}
static addCargo(builder:flatbuffers.Builder, cargo:number) {
builder.addFieldFloat64(4, cargo, 0.0);
}
static endCommandScienceCreate(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandScienceCreate(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, drive:number, weapons:number, shields:number, cargo:number):flatbuffers.Offset {
CommandScienceCreate.startCommandScienceCreate(builder);
CommandScienceCreate.addName(builder, nameOffset);
CommandScienceCreate.addDrive(builder, drive);
CommandScienceCreate.addWeapons(builder, weapons);
CommandScienceCreate.addShields(builder, shields);
CommandScienceCreate.addCargo(builder, cargo);
return CommandScienceCreate.endCommandScienceCreate(builder);
}
unpack(): CommandScienceCreateT {
return new CommandScienceCreateT(
this.name(),
this.drive(),
this.weapons(),
this.shields(),
this.cargo()
);
}
unpackTo(_o: CommandScienceCreateT): void {
_o.name = this.name();
_o.drive = this.drive();
_o.weapons = this.weapons();
_o.shields = this.shields();
_o.cargo = this.cargo();
}
}
export class CommandScienceCreateT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null,
public drive: number = 0.0,
public weapons: number = 0.0,
public shields: number = 0.0,
public cargo: number = 0.0
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandScienceCreate.createCommandScienceCreate(builder,
name,
this.drive,
this.weapons,
this.shields,
this.cargo
);
}
}
@@ -0,0 +1,78 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandScienceRemove implements flatbuffers.IUnpackableObject<CommandScienceRemoveT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandScienceRemove {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandScienceRemove(bb:flatbuffers.ByteBuffer, obj?:CommandScienceRemove):CommandScienceRemove {
return (obj || new CommandScienceRemove()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandScienceRemove(bb:flatbuffers.ByteBuffer, obj?:CommandScienceRemove):CommandScienceRemove {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandScienceRemove()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandScienceRemove(builder:flatbuffers.Builder) {
builder.startObject(1);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static endCommandScienceRemove(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandScienceRemove(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandScienceRemove.startCommandScienceRemove(builder);
CommandScienceRemove.addName(builder, nameOffset);
return CommandScienceRemove.endCommandScienceRemove(builder);
}
unpack(): CommandScienceRemoveT {
return new CommandScienceRemoveT(
this.name()
);
}
unpackTo(_o: CommandScienceRemoveT): void {
_o.name = this.name();
}
}
export class CommandScienceRemoveT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandScienceRemove.createCommandScienceRemove(builder,
name
);
}
}
@@ -0,0 +1,148 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipClassCreate implements flatbuffers.IUnpackableObject<CommandShipClassCreateT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipClassCreate {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipClassCreate(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassCreate):CommandShipClassCreate {
return (obj || new CommandShipClassCreate()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipClassCreate(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassCreate):CommandShipClassCreate {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipClassCreate()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
drive():number {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
armament():bigint {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
weapons():number {
const offset = this.bb!.__offset(this.bb_pos, 10);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
shields():number {
const offset = this.bb!.__offset(this.bb_pos, 12);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
cargo():number {
const offset = this.bb!.__offset(this.bb_pos, 14);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
static startCommandShipClassCreate(builder:flatbuffers.Builder) {
builder.startObject(6);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static addDrive(builder:flatbuffers.Builder, drive:number) {
builder.addFieldFloat64(1, drive, 0.0);
}
static addArmament(builder:flatbuffers.Builder, armament:bigint) {
builder.addFieldInt64(2, armament, BigInt('0'));
}
static addWeapons(builder:flatbuffers.Builder, weapons:number) {
builder.addFieldFloat64(3, weapons, 0.0);
}
static addShields(builder:flatbuffers.Builder, shields:number) {
builder.addFieldFloat64(4, shields, 0.0);
}
static addCargo(builder:flatbuffers.Builder, cargo:number) {
builder.addFieldFloat64(5, cargo, 0.0);
}
static endCommandShipClassCreate(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipClassCreate(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, drive:number, armament:bigint, weapons:number, shields:number, cargo:number):flatbuffers.Offset {
CommandShipClassCreate.startCommandShipClassCreate(builder);
CommandShipClassCreate.addName(builder, nameOffset);
CommandShipClassCreate.addDrive(builder, drive);
CommandShipClassCreate.addArmament(builder, armament);
CommandShipClassCreate.addWeapons(builder, weapons);
CommandShipClassCreate.addShields(builder, shields);
CommandShipClassCreate.addCargo(builder, cargo);
return CommandShipClassCreate.endCommandShipClassCreate(builder);
}
unpack(): CommandShipClassCreateT {
return new CommandShipClassCreateT(
this.name(),
this.drive(),
this.armament(),
this.weapons(),
this.shields(),
this.cargo()
);
}
unpackTo(_o: CommandShipClassCreateT): void {
_o.name = this.name();
_o.drive = this.drive();
_o.armament = this.armament();
_o.weapons = this.weapons();
_o.shields = this.shields();
_o.cargo = this.cargo();
}
}
export class CommandShipClassCreateT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null,
public drive: number = 0.0,
public armament: bigint = BigInt('0'),
public weapons: number = 0.0,
public shields: number = 0.0,
public cargo: number = 0.0
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandShipClassCreate.createCommandShipClassCreate(builder,
name,
this.drive,
this.armament,
this.weapons,
this.shields,
this.cargo
);
}
}
@@ -0,0 +1,95 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipClassMerge implements flatbuffers.IUnpackableObject<CommandShipClassMergeT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipClassMerge {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipClassMerge(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassMerge):CommandShipClassMerge {
return (obj || new CommandShipClassMerge()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipClassMerge(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassMerge):CommandShipClassMerge {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipClassMerge()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
target():string|null
target(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
target(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandShipClassMerge(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static addTarget(builder:flatbuffers.Builder, targetOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, targetOffset, 0);
}
static endCommandShipClassMerge(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipClassMerge(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset, targetOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandShipClassMerge.startCommandShipClassMerge(builder);
CommandShipClassMerge.addName(builder, nameOffset);
CommandShipClassMerge.addTarget(builder, targetOffset);
return CommandShipClassMerge.endCommandShipClassMerge(builder);
}
unpack(): CommandShipClassMergeT {
return new CommandShipClassMergeT(
this.name(),
this.target()
);
}
unpackTo(_o: CommandShipClassMergeT): void {
_o.name = this.name();
_o.target = this.target();
}
}
export class CommandShipClassMergeT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null,
public target: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
const target = (this.target !== null ? builder.createString(this.target!) : 0);
return CommandShipClassMerge.createCommandShipClassMerge(builder,
name,
target
);
}
}
@@ -0,0 +1,78 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipClassRemove implements flatbuffers.IUnpackableObject<CommandShipClassRemoveT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipClassRemove {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipClassRemove(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassRemove):CommandShipClassRemove {
return (obj || new CommandShipClassRemove()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipClassRemove(bb:flatbuffers.ByteBuffer, obj?:CommandShipClassRemove):CommandShipClassRemove {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipClassRemove()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandShipClassRemove(builder:flatbuffers.Builder) {
builder.startObject(1);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, nameOffset, 0);
}
static endCommandShipClassRemove(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipClassRemove(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandShipClassRemove.startCommandShipClassRemove(builder);
CommandShipClassRemove.addName(builder, nameOffset);
return CommandShipClassRemove.endCommandShipClassRemove(builder);
}
unpack(): CommandShipClassRemoveT {
return new CommandShipClassRemoveT(
this.name()
);
}
unpackTo(_o: CommandShipClassRemoveT): void {
_o.name = this.name();
}
}
export class CommandShipClassRemoveT implements flatbuffers.IGeneratedObject {
constructor(
public name: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandShipClassRemove.createCommandShipClassRemove(builder,
name
);
}
}
@@ -0,0 +1,109 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupBreak implements flatbuffers.IUnpackableObject<CommandShipGroupBreakT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupBreak {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupBreak(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupBreak):CommandShipGroupBreak {
return (obj || new CommandShipGroupBreak()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupBreak(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupBreak):CommandShipGroupBreak {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupBreak()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
newId():string|null
newId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
newId(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
quantity():bigint {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
static startCommandShipGroupBreak(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addNewId(builder:flatbuffers.Builder, newIdOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, newIdOffset, 0);
}
static addQuantity(builder:flatbuffers.Builder, quantity:bigint) {
builder.addFieldInt64(2, quantity, BigInt('0'));
}
static endCommandShipGroupBreak(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupBreak(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, newIdOffset:flatbuffers.Offset, quantity:bigint):flatbuffers.Offset {
CommandShipGroupBreak.startCommandShipGroupBreak(builder);
CommandShipGroupBreak.addId(builder, idOffset);
CommandShipGroupBreak.addNewId(builder, newIdOffset);
CommandShipGroupBreak.addQuantity(builder, quantity);
return CommandShipGroupBreak.endCommandShipGroupBreak(builder);
}
unpack(): CommandShipGroupBreakT {
return new CommandShipGroupBreakT(
this.id(),
this.newId(),
this.quantity()
);
}
unpackTo(_o: CommandShipGroupBreakT): void {
_o.id = this.id();
_o.newId = this.newId();
_o.quantity = this.quantity();
}
}
export class CommandShipGroupBreakT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public newId: string|Uint8Array|null = null,
public quantity: bigint = BigInt('0')
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
const newId = (this.newId !== null ? builder.createString(this.newId!) : 0);
return CommandShipGroupBreak.createCommandShipGroupBreak(builder,
id,
newId,
this.quantity
);
}
}
@@ -0,0 +1,78 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupDismantle implements flatbuffers.IUnpackableObject<CommandShipGroupDismantleT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupDismantle {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupDismantle(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupDismantle):CommandShipGroupDismantle {
return (obj || new CommandShipGroupDismantle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupDismantle(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupDismantle):CommandShipGroupDismantle {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupDismantle()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandShipGroupDismantle(builder:flatbuffers.Builder) {
builder.startObject(1);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static endCommandShipGroupDismantle(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupDismantle(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandShipGroupDismantle.startCommandShipGroupDismantle(builder);
CommandShipGroupDismantle.addId(builder, idOffset);
return CommandShipGroupDismantle.endCommandShipGroupDismantle(builder);
}
unpack(): CommandShipGroupDismantleT {
return new CommandShipGroupDismantleT(
this.id()
);
}
unpackTo(_o: CommandShipGroupDismantleT): void {
_o.id = this.id();
}
}
export class CommandShipGroupDismantleT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
return CommandShipGroupDismantle.createCommandShipGroupDismantle(builder,
id
);
}
}
@@ -0,0 +1,95 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupJoinFleet implements flatbuffers.IUnpackableObject<CommandShipGroupJoinFleetT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupJoinFleet {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupJoinFleet(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupJoinFleet):CommandShipGroupJoinFleet {
return (obj || new CommandShipGroupJoinFleet()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupJoinFleet(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupJoinFleet):CommandShipGroupJoinFleet {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupJoinFleet()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
name():string|null
name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
name(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandShipGroupJoinFleet(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, nameOffset, 0);
}
static endCommandShipGroupJoinFleet(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupJoinFleet(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, nameOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandShipGroupJoinFleet.startCommandShipGroupJoinFleet(builder);
CommandShipGroupJoinFleet.addId(builder, idOffset);
CommandShipGroupJoinFleet.addName(builder, nameOffset);
return CommandShipGroupJoinFleet.endCommandShipGroupJoinFleet(builder);
}
unpack(): CommandShipGroupJoinFleetT {
return new CommandShipGroupJoinFleetT(
this.id(),
this.name()
);
}
unpackTo(_o: CommandShipGroupJoinFleetT): void {
_o.id = this.id();
_o.name = this.name();
}
}
export class CommandShipGroupJoinFleetT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public name: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
const name = (this.name !== null ? builder.createString(this.name!) : 0);
return CommandShipGroupJoinFleet.createCommandShipGroupJoinFleet(builder,
id,
name
);
}
}
@@ -0,0 +1,107 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { ShipGroupCargo } from './ship-group-cargo.js';
export class CommandShipGroupLoad implements flatbuffers.IUnpackableObject<CommandShipGroupLoadT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupLoad {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupLoad(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupLoad):CommandShipGroupLoad {
return (obj || new CommandShipGroupLoad()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupLoad(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupLoad):CommandShipGroupLoad {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupLoad()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
cargo():ShipGroupCargo {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ShipGroupCargo.UNKNOWN;
}
quantity():number {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
static startCommandShipGroupLoad(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addCargo(builder:flatbuffers.Builder, cargo:ShipGroupCargo) {
builder.addFieldInt8(1, cargo, ShipGroupCargo.UNKNOWN);
}
static addQuantity(builder:flatbuffers.Builder, quantity:number) {
builder.addFieldFloat64(2, quantity, 0.0);
}
static endCommandShipGroupLoad(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupLoad(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, cargo:ShipGroupCargo, quantity:number):flatbuffers.Offset {
CommandShipGroupLoad.startCommandShipGroupLoad(builder);
CommandShipGroupLoad.addId(builder, idOffset);
CommandShipGroupLoad.addCargo(builder, cargo);
CommandShipGroupLoad.addQuantity(builder, quantity);
return CommandShipGroupLoad.endCommandShipGroupLoad(builder);
}
unpack(): CommandShipGroupLoadT {
return new CommandShipGroupLoadT(
this.id(),
this.cargo(),
this.quantity()
);
}
unpackTo(_o: CommandShipGroupLoadT): void {
_o.id = this.id();
_o.cargo = this.cargo();
_o.quantity = this.quantity();
}
}
export class CommandShipGroupLoadT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public cargo: ShipGroupCargo = ShipGroupCargo.UNKNOWN,
public quantity: number = 0.0
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
return CommandShipGroupLoad.createCommandShipGroupLoad(builder,
id,
this.cargo,
this.quantity
);
}
}
@@ -0,0 +1,56 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupMerge implements flatbuffers.IUnpackableObject<CommandShipGroupMergeT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupMerge {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupMerge(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupMerge):CommandShipGroupMerge {
return (obj || new CommandShipGroupMerge()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupMerge(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupMerge):CommandShipGroupMerge {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupMerge()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static startCommandShipGroupMerge(builder:flatbuffers.Builder) {
builder.startObject(0);
}
static endCommandShipGroupMerge(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupMerge(builder:flatbuffers.Builder):flatbuffers.Offset {
CommandShipGroupMerge.startCommandShipGroupMerge(builder);
return CommandShipGroupMerge.endCommandShipGroupMerge(builder);
}
unpack(): CommandShipGroupMergeT {
return new CommandShipGroupMergeT();
}
unpackTo(_o: CommandShipGroupMergeT): void {}
}
export class CommandShipGroupMergeT implements flatbuffers.IGeneratedObject {
constructor(){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
return CommandShipGroupMerge.createCommandShipGroupMerge(builder);
}
}
@@ -0,0 +1,92 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupSend implements flatbuffers.IUnpackableObject<CommandShipGroupSendT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupSend {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupSend(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupSend):CommandShipGroupSend {
return (obj || new CommandShipGroupSend()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupSend(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupSend):CommandShipGroupSend {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupSend()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
destination():bigint {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
static startCommandShipGroupSend(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addDestination(builder:flatbuffers.Builder, destination:bigint) {
builder.addFieldInt64(1, destination, BigInt('0'));
}
static endCommandShipGroupSend(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupSend(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, destination:bigint):flatbuffers.Offset {
CommandShipGroupSend.startCommandShipGroupSend(builder);
CommandShipGroupSend.addId(builder, idOffset);
CommandShipGroupSend.addDestination(builder, destination);
return CommandShipGroupSend.endCommandShipGroupSend(builder);
}
unpack(): CommandShipGroupSendT {
return new CommandShipGroupSendT(
this.id(),
this.destination()
);
}
unpackTo(_o: CommandShipGroupSendT): void {
_o.id = this.id();
_o.destination = this.destination();
}
}
export class CommandShipGroupSendT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public destination: bigint = BigInt('0')
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
return CommandShipGroupSend.createCommandShipGroupSend(builder,
id,
this.destination
);
}
}
@@ -0,0 +1,95 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupTransfer implements flatbuffers.IUnpackableObject<CommandShipGroupTransferT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupTransfer {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupTransfer(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupTransfer):CommandShipGroupTransfer {
return (obj || new CommandShipGroupTransfer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupTransfer(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupTransfer):CommandShipGroupTransfer {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupTransfer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
acceptor():string|null
acceptor(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
acceptor(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
static startCommandShipGroupTransfer(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addAcceptor(builder:flatbuffers.Builder, acceptorOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, acceptorOffset, 0);
}
static endCommandShipGroupTransfer(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupTransfer(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, acceptorOffset:flatbuffers.Offset):flatbuffers.Offset {
CommandShipGroupTransfer.startCommandShipGroupTransfer(builder);
CommandShipGroupTransfer.addId(builder, idOffset);
CommandShipGroupTransfer.addAcceptor(builder, acceptorOffset);
return CommandShipGroupTransfer.endCommandShipGroupTransfer(builder);
}
unpack(): CommandShipGroupTransferT {
return new CommandShipGroupTransferT(
this.id(),
this.acceptor()
);
}
unpackTo(_o: CommandShipGroupTransferT): void {
_o.id = this.id();
_o.acceptor = this.acceptor();
}
}
export class CommandShipGroupTransferT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public acceptor: string|Uint8Array|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
const acceptor = (this.acceptor !== null ? builder.createString(this.acceptor!) : 0);
return CommandShipGroupTransfer.createCommandShipGroupTransfer(builder,
id,
acceptor
);
}
}
@@ -0,0 +1,92 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class CommandShipGroupUnload implements flatbuffers.IUnpackableObject<CommandShipGroupUnloadT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupUnload {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupUnload(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupUnload):CommandShipGroupUnload {
return (obj || new CommandShipGroupUnload()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupUnload(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupUnload):CommandShipGroupUnload {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupUnload()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
quantity():number {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
static startCommandShipGroupUnload(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addQuantity(builder:flatbuffers.Builder, quantity:number) {
builder.addFieldFloat64(1, quantity, 0.0);
}
static endCommandShipGroupUnload(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupUnload(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, quantity:number):flatbuffers.Offset {
CommandShipGroupUnload.startCommandShipGroupUnload(builder);
CommandShipGroupUnload.addId(builder, idOffset);
CommandShipGroupUnload.addQuantity(builder, quantity);
return CommandShipGroupUnload.endCommandShipGroupUnload(builder);
}
unpack(): CommandShipGroupUnloadT {
return new CommandShipGroupUnloadT(
this.id(),
this.quantity()
);
}
unpackTo(_o: CommandShipGroupUnloadT): void {
_o.id = this.id();
_o.quantity = this.quantity();
}
}
export class CommandShipGroupUnloadT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public quantity: number = 0.0
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
return CommandShipGroupUnload.createCommandShipGroupUnload(builder,
id,
this.quantity
);
}
}
@@ -0,0 +1,107 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { ShipGroupUpgradeTech } from './ship-group-upgrade-tech.js';
export class CommandShipGroupUpgrade implements flatbuffers.IUnpackableObject<CommandShipGroupUpgradeT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):CommandShipGroupUpgrade {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsCommandShipGroupUpgrade(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupUpgrade):CommandShipGroupUpgrade {
return (obj || new CommandShipGroupUpgrade()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsCommandShipGroupUpgrade(bb:flatbuffers.ByteBuffer, obj?:CommandShipGroupUpgrade):CommandShipGroupUpgrade {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new CommandShipGroupUpgrade()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}
tech():ShipGroupUpgradeTech {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt8(this.bb_pos + offset) : ShipGroupUpgradeTech.UNKNOWN;
}
level():number {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}
static startCommandShipGroupUpgrade(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}
static addTech(builder:flatbuffers.Builder, tech:ShipGroupUpgradeTech) {
builder.addFieldInt8(1, tech, ShipGroupUpgradeTech.UNKNOWN);
}
static addLevel(builder:flatbuffers.Builder, level:number) {
builder.addFieldFloat64(2, level, 0.0);
}
static endCommandShipGroupUpgrade(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createCommandShipGroupUpgrade(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, tech:ShipGroupUpgradeTech, level:number):flatbuffers.Offset {
CommandShipGroupUpgrade.startCommandShipGroupUpgrade(builder);
CommandShipGroupUpgrade.addId(builder, idOffset);
CommandShipGroupUpgrade.addTech(builder, tech);
CommandShipGroupUpgrade.addLevel(builder, level);
return CommandShipGroupUpgrade.endCommandShipGroupUpgrade(builder);
}
unpack(): CommandShipGroupUpgradeT {
return new CommandShipGroupUpgradeT(
this.id(),
this.tech(),
this.level()
);
}
unpackTo(_o: CommandShipGroupUpgradeT): void {
_o.id = this.id();
_o.tech = this.tech();
_o.level = this.level();
}
}
export class CommandShipGroupUpgradeT implements flatbuffers.IGeneratedObject {
constructor(
public id: string|Uint8Array|null = null,
public tech: ShipGroupUpgradeTech = ShipGroupUpgradeTech.UNKNOWN,
public level: number = 0.0
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const id = (this.id !== null ? builder.createString(this.id!) : 0);
return CommandShipGroupUpgrade.createCommandShipGroupUpgrade(builder,
id,
this.tech,
this.level
);
}
}
@@ -0,0 +1,15 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
export enum PlanetProduction {
UNKNOWN = 0,
MAT = 1,
CAP = 2,
DRIVE = 3,
WEAPONS = 4,
SHIELDS = 5,
CARGO = 6,
SCIENCE = 7,
SHIP = 8
}
@@ -0,0 +1,11 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
export enum PlanetRouteLoadType {
UNKNOWN = 0,
MAT = 1,
CAP = 2,
COL = 3,
EMP = 4
}
@@ -0,0 +1,9 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
export enum Relation {
UNKNOWN = 0,
WAR = 1,
PEACE = 2
}
@@ -0,0 +1,10 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
export enum ShipGroupCargo {
UNKNOWN = 0,
COL = 1,
MAT = 2,
CAP = 3
}
@@ -0,0 +1,12 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
export enum ShipGroupUpgradeTech {
UNKNOWN = 0,
ALL = 1,
DRIVE = 2,
WEAPONS = 3,
SHIELDS = 4,
CARGO = 5
}
@@ -0,0 +1,56 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
export class UserGamesCommandResponse implements flatbuffers.IUnpackableObject<UserGamesCommandResponseT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):UserGamesCommandResponse {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsUserGamesCommandResponse(bb:flatbuffers.ByteBuffer, obj?:UserGamesCommandResponse):UserGamesCommandResponse {
return (obj || new UserGamesCommandResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsUserGamesCommandResponse(bb:flatbuffers.ByteBuffer, obj?:UserGamesCommandResponse):UserGamesCommandResponse {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new UserGamesCommandResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static startUserGamesCommandResponse(builder:flatbuffers.Builder) {
builder.startObject(0);
}
static endUserGamesCommandResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createUserGamesCommandResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
UserGamesCommandResponse.startUserGamesCommandResponse(builder);
return UserGamesCommandResponse.endUserGamesCommandResponse(builder);
}
unpack(): UserGamesCommandResponseT {
return new UserGamesCommandResponseT();
}
unpackTo(_o: UserGamesCommandResponseT): void {}
}
export class UserGamesCommandResponseT implements flatbuffers.IGeneratedObject {
constructor(){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
return UserGamesCommandResponse.createUserGamesCommandResponse(builder);
}
}
@@ -0,0 +1,110 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { UUID, UUIDT } from '../common/uuid.js';
import { CommandItem, CommandItemT } from './command-item.js';
export class UserGamesCommand implements flatbuffers.IUnpackableObject<UserGamesCommandT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):UserGamesCommand {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsUserGamesCommand(bb:flatbuffers.ByteBuffer, obj?:UserGamesCommand):UserGamesCommand {
return (obj || new UserGamesCommand()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsUserGamesCommand(bb:flatbuffers.ByteBuffer, obj?:UserGamesCommand):UserGamesCommand {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new UserGamesCommand()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
gameId(obj?:UUID):UUID|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
}
commands(index: number, obj?:CommandItem):CommandItem|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? (obj || new CommandItem()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
}
commandsLength():number {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
}
static startUserGamesCommand(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
builder.addFieldStruct(0, gameIdOffset, 0);
}
static addCommands(builder:flatbuffers.Builder, commandsOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, commandsOffset, 0);
}
static createCommandsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]!);
}
return builder.endVector();
}
static startCommandsVector(builder:flatbuffers.Builder, numElems:number) {
builder.startVector(4, numElems, 4);
}
static endUserGamesCommand(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 4) // game_id
return offset;
}
static createUserGamesCommand(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, commandsOffset:flatbuffers.Offset):flatbuffers.Offset {
UserGamesCommand.startUserGamesCommand(builder);
UserGamesCommand.addGameId(builder, gameIdOffset);
UserGamesCommand.addCommands(builder, commandsOffset);
return UserGamesCommand.endUserGamesCommand(builder);
}
unpack(): UserGamesCommandT {
return new UserGamesCommandT(
(this.gameId() !== null ? this.gameId()!.unpack() : null),
this.bb!.createObjList<CommandItem, CommandItemT>(this.commands.bind(this), this.commandsLength())
);
}
unpackTo(_o: UserGamesCommandT): void {
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
_o.commands = this.bb!.createObjList<CommandItem, CommandItemT>(this.commands.bind(this), this.commandsLength());
}
}
export class UserGamesCommandT implements flatbuffers.IGeneratedObject {
constructor(
public gameId: UUIDT|null = null,
public commands: (CommandItemT)[] = []
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const commands = UserGamesCommand.createCommandsVector(builder, builder.createObjectOffsetList(this.commands));
return UserGamesCommand.createUserGamesCommand(builder,
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
commands
);
}
}
@@ -0,0 +1,86 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { UserGamesOrder, UserGamesOrderT } from './user-games-order.js';
export class UserGamesOrderGetResponse implements flatbuffers.IUnpackableObject<UserGamesOrderGetResponseT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):UserGamesOrderGetResponse {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsUserGamesOrderGetResponse(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrderGetResponse):UserGamesOrderGetResponse {
return (obj || new UserGamesOrderGetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsUserGamesOrderGetResponse(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrderGetResponse):UserGamesOrderGetResponse {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new UserGamesOrderGetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
found():boolean {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
}
order(obj?:UserGamesOrder):UserGamesOrder|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? (obj || new UserGamesOrder()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
}
static startUserGamesOrderGetResponse(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addFound(builder:flatbuffers.Builder, found:boolean) {
builder.addFieldInt8(0, +found, +false);
}
static addOrder(builder:flatbuffers.Builder, orderOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, orderOffset, 0);
}
static endUserGamesOrderGetResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
unpack(): UserGamesOrderGetResponseT {
return new UserGamesOrderGetResponseT(
this.found(),
(this.order() !== null ? this.order()!.unpack() : null)
);
}
unpackTo(_o: UserGamesOrderGetResponseT): void {
_o.found = this.found();
_o.order = (this.order() !== null ? this.order()!.unpack() : null);
}
}
export class UserGamesOrderGetResponseT implements flatbuffers.IGeneratedObject {
constructor(
public found: boolean = false,
public order: UserGamesOrderT|null = null
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const order = (this.order !== null ? this.order!.pack(builder) : 0);
UserGamesOrderGetResponse.startUserGamesOrderGetResponse(builder);
UserGamesOrderGetResponse.addFound(builder, this.found);
UserGamesOrderGetResponse.addOrder(builder, order);
return UserGamesOrderGetResponse.endUserGamesOrderGetResponse(builder);
}
}
@@ -0,0 +1,90 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { UUID, UUIDT } from '../common/uuid.js';
export class UserGamesOrderGet implements flatbuffers.IUnpackableObject<UserGamesOrderGetT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):UserGamesOrderGet {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsUserGamesOrderGet(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrderGet):UserGamesOrderGet {
return (obj || new UserGamesOrderGet()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsUserGamesOrderGet(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrderGet):UserGamesOrderGet {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new UserGamesOrderGet()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
gameId(obj?:UUID):UUID|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
}
turn():bigint {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
static startUserGamesOrderGet(builder:flatbuffers.Builder) {
builder.startObject(2);
}
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
builder.addFieldStruct(0, gameIdOffset, 0);
}
static addTurn(builder:flatbuffers.Builder, turn:bigint) {
builder.addFieldInt64(1, turn, BigInt('0'));
}
static endUserGamesOrderGet(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 4) // game_id
return offset;
}
static createUserGamesOrderGet(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, turn:bigint):flatbuffers.Offset {
UserGamesOrderGet.startUserGamesOrderGet(builder);
UserGamesOrderGet.addGameId(builder, gameIdOffset);
UserGamesOrderGet.addTurn(builder, turn);
return UserGamesOrderGet.endUserGamesOrderGet(builder);
}
unpack(): UserGamesOrderGetT {
return new UserGamesOrderGetT(
(this.gameId() !== null ? this.gameId()!.unpack() : null),
this.turn()
);
}
unpackTo(_o: UserGamesOrderGetT): void {
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
_o.turn = this.turn();
}
}
export class UserGamesOrderGetT implements flatbuffers.IGeneratedObject {
constructor(
public gameId: UUIDT|null = null,
public turn: bigint = BigInt('0')
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
return UserGamesOrderGet.createUserGamesOrderGet(builder,
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
this.turn
);
}
}
@@ -0,0 +1,123 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { UUID, UUIDT } from '../common/uuid.js';
import { CommandItem, CommandItemT } from './command-item.js';
export class UserGamesOrderResponse implements flatbuffers.IUnpackableObject<UserGamesOrderResponseT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):UserGamesOrderResponse {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsUserGamesOrderResponse(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrderResponse):UserGamesOrderResponse {
return (obj || new UserGamesOrderResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsUserGamesOrderResponse(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrderResponse):UserGamesOrderResponse {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new UserGamesOrderResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
gameId(obj?:UUID):UUID|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
}
updatedAt():bigint {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
commands(index: number, obj?:CommandItem):CommandItem|null {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? (obj || new CommandItem()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
}
commandsLength():number {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
}
static startUserGamesOrderResponse(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
builder.addFieldStruct(0, gameIdOffset, 0);
}
static addUpdatedAt(builder:flatbuffers.Builder, updatedAt:bigint) {
builder.addFieldInt64(1, updatedAt, BigInt('0'));
}
static addCommands(builder:flatbuffers.Builder, commandsOffset:flatbuffers.Offset) {
builder.addFieldOffset(2, commandsOffset, 0);
}
static createCommandsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]!);
}
return builder.endVector();
}
static startCommandsVector(builder:flatbuffers.Builder, numElems:number) {
builder.startVector(4, numElems, 4);
}
static endUserGamesOrderResponse(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}
static createUserGamesOrderResponse(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, updatedAt:bigint, commandsOffset:flatbuffers.Offset):flatbuffers.Offset {
UserGamesOrderResponse.startUserGamesOrderResponse(builder);
UserGamesOrderResponse.addGameId(builder, gameIdOffset);
UserGamesOrderResponse.addUpdatedAt(builder, updatedAt);
UserGamesOrderResponse.addCommands(builder, commandsOffset);
return UserGamesOrderResponse.endUserGamesOrderResponse(builder);
}
unpack(): UserGamesOrderResponseT {
return new UserGamesOrderResponseT(
(this.gameId() !== null ? this.gameId()!.unpack() : null),
this.updatedAt(),
this.bb!.createObjList<CommandItem, CommandItemT>(this.commands.bind(this), this.commandsLength())
);
}
unpackTo(_o: UserGamesOrderResponseT): void {
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
_o.updatedAt = this.updatedAt();
_o.commands = this.bb!.createObjList<CommandItem, CommandItemT>(this.commands.bind(this), this.commandsLength());
}
}
export class UserGamesOrderResponseT implements flatbuffers.IGeneratedObject {
constructor(
public gameId: UUIDT|null = null,
public updatedAt: bigint = BigInt('0'),
public commands: (CommandItemT)[] = []
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const commands = UserGamesOrderResponse.createCommandsVector(builder, builder.createObjectOffsetList(this.commands));
return UserGamesOrderResponse.createUserGamesOrderResponse(builder,
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
this.updatedAt,
commands
);
}
}
@@ -0,0 +1,124 @@
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import * as flatbuffers from 'flatbuffers';
import { UUID, UUIDT } from '../common/uuid.js';
import { CommandItem, CommandItemT } from './command-item.js';
export class UserGamesOrder implements flatbuffers.IUnpackableObject<UserGamesOrderT> {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):UserGamesOrder {
this.bb_pos = i;
this.bb = bb;
return this;
}
static getRootAsUserGamesOrder(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrder):UserGamesOrder {
return (obj || new UserGamesOrder()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
static getSizePrefixedRootAsUserGamesOrder(bb:flatbuffers.ByteBuffer, obj?:UserGamesOrder):UserGamesOrder {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new UserGamesOrder()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}
gameId(obj?:UUID):UUID|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? (obj || new UUID()).__init(this.bb_pos + offset, this.bb!) : null;
}
updatedAt():bigint {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
}
commands(index: number, obj?:CommandItem):CommandItem|null {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? (obj || new CommandItem()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
}
commandsLength():number {
const offset = this.bb!.__offset(this.bb_pos, 8);
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
}
static startUserGamesOrder(builder:flatbuffers.Builder) {
builder.startObject(3);
}
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
builder.addFieldStruct(0, gameIdOffset, 0);
}
static addUpdatedAt(builder:flatbuffers.Builder, updatedAt:bigint) {
builder.addFieldInt64(1, updatedAt, BigInt('0'));
}
static addCommands(builder:flatbuffers.Builder, commandsOffset:flatbuffers.Offset) {
builder.addFieldOffset(2, commandsOffset, 0);
}
static createCommandsVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]!);
}
return builder.endVector();
}
static startCommandsVector(builder:flatbuffers.Builder, numElems:number) {
builder.startVector(4, numElems, 4);
}
static endUserGamesOrder(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 4) // game_id
return offset;
}
static createUserGamesOrder(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, updatedAt:bigint, commandsOffset:flatbuffers.Offset):flatbuffers.Offset {
UserGamesOrder.startUserGamesOrder(builder);
UserGamesOrder.addGameId(builder, gameIdOffset);
UserGamesOrder.addUpdatedAt(builder, updatedAt);
UserGamesOrder.addCommands(builder, commandsOffset);
return UserGamesOrder.endUserGamesOrder(builder);
}
unpack(): UserGamesOrderT {
return new UserGamesOrderT(
(this.gameId() !== null ? this.gameId()!.unpack() : null),
this.updatedAt(),
this.bb!.createObjList<CommandItem, CommandItemT>(this.commands.bind(this), this.commandsLength())
);
}
unpackTo(_o: UserGamesOrderT): void {
_o.gameId = (this.gameId() !== null ? this.gameId()!.unpack() : null);
_o.updatedAt = this.updatedAt();
_o.commands = this.bb!.createObjList<CommandItem, CommandItemT>(this.commands.bind(this), this.commandsLength());
}
}
export class UserGamesOrderT implements flatbuffers.IGeneratedObject {
constructor(
public gameId: UUIDT|null = null,
public updatedAt: bigint = BigInt('0'),
public commands: (CommandItemT)[] = []
){}
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
const commands = UserGamesOrder.createCommandsVector(builder, builder.createObjectOffsetList(this.commands));
return UserGamesOrder.createUserGamesOrder(builder,
(this.gameId !== null ? this.gameId!.pack(builder) : 0),
this.updatedAt,
commands
);
}
}