fbs: order
This commit is contained in:
+172
-19
@@ -1,46 +1,199 @@
|
|||||||
namespace order;
|
namespace order;
|
||||||
|
|
||||||
enum Relation : byte { War = 0, Peace = 1 }
|
enum Relation : byte {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
WAR = 1,
|
||||||
|
PEACE = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ShipGroupCargo : byte {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
COL = 1,
|
||||||
|
MAT = 2,
|
||||||
|
CAP = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ShipGroupUpgradeTech : byte {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
ALL = 1,
|
||||||
|
DRIVE = 2,
|
||||||
|
WEAPONS = 3,
|
||||||
|
SHIELDS = 4,
|
||||||
|
CARGO = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PlanetProduction : byte {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
MAT = 1,
|
||||||
|
CAP = 2,
|
||||||
|
DRIVE = 3,
|
||||||
|
WEAPONS = 4,
|
||||||
|
SHIELDS = 5,
|
||||||
|
CARGO = 6,
|
||||||
|
SCIENCE = 7,
|
||||||
|
SHIP = 8
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PlanetRouteLoadType : byte {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
MAT = 1,
|
||||||
|
CAP = 2,
|
||||||
|
COL = 3,
|
||||||
|
EMP = 4
|
||||||
|
}
|
||||||
|
|
||||||
table CommandRaceQuit {}
|
table CommandRaceQuit {}
|
||||||
|
|
||||||
table CommandRaceVote {
|
table CommandRaceVote {
|
||||||
for: string;
|
acceptor: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
table CommandRaceRelation {
|
table CommandRaceRelation {
|
||||||
relation: Relation;
|
acceptor: string;
|
||||||
for: string;
|
relation: Relation = UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
table CommandShipClassCreate {
|
table CommandShipClassCreate {
|
||||||
drive: float32;
|
name: string;
|
||||||
weapons: float32;
|
drive: float64;
|
||||||
shields: float32;
|
armament: int64;
|
||||||
cargo: float32;
|
weapons: float64;
|
||||||
armament: uint16;
|
shields: float64;
|
||||||
|
cargo: float64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipClassMerge {
|
||||||
|
name: string;
|
||||||
|
target: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipClassRemove {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
union Commands {
|
table CommandShipGroupBreak {
|
||||||
|
id: string;
|
||||||
|
new_id: string;
|
||||||
|
quantity: int64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupLoad {
|
||||||
|
id: string;
|
||||||
|
cargo: ShipGroupCargo = UNKNOWN;
|
||||||
|
quantity: float64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupUnload {
|
||||||
|
id: string;
|
||||||
|
quantity: float64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupSend {
|
||||||
|
id: string;
|
||||||
|
destination: int64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupUpgrade {
|
||||||
|
id: string;
|
||||||
|
tech: ShipGroupUpgradeTech = UNKNOWN;
|
||||||
|
level: float64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupMerge {}
|
||||||
|
|
||||||
|
table CommandShipGroupDismantle {
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupTransfer {
|
||||||
|
id: string;
|
||||||
|
acceptor: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandShipGroupJoinFleet {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandFleetMerge {
|
||||||
|
name: string;
|
||||||
|
target: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandFleetSend {
|
||||||
|
name: string;
|
||||||
|
destination: int64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandScienceCreate {
|
||||||
|
name: string;
|
||||||
|
drive: float64;
|
||||||
|
weapons: float64;
|
||||||
|
shields: float64;
|
||||||
|
cargo: float64;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandScienceRemove {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandPlanetRename {
|
||||||
|
number: int64;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandPlanetProduce {
|
||||||
|
number: int64;
|
||||||
|
production: PlanetProduction = UNKNOWN;
|
||||||
|
subject: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandPlanetRouteSet {
|
||||||
|
origin: int64;
|
||||||
|
destination: int64;
|
||||||
|
load_type: PlanetRouteLoadType = UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
table CommandPlanetRouteRemove {
|
||||||
|
origin: int64;
|
||||||
|
load_type: PlanetRouteLoadType = UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
union CommandPayload {
|
||||||
CommandRaceQuit,
|
CommandRaceQuit,
|
||||||
CommandRaceVote,
|
CommandRaceVote,
|
||||||
CommandRaceRelation,
|
CommandRaceRelation,
|
||||||
CommandShipClassCreate
|
CommandShipClassCreate,
|
||||||
}
|
CommandShipClassMerge,
|
||||||
|
CommandShipClassRemove,
|
||||||
struct uuid {
|
CommandShipGroupBreak,
|
||||||
high: int64;
|
CommandShipGroupLoad,
|
||||||
low: int64;
|
CommandShipGroupUnload,
|
||||||
|
CommandShipGroupSend,
|
||||||
|
CommandShipGroupUpgrade,
|
||||||
|
CommandShipGroupMerge,
|
||||||
|
CommandShipGroupDismantle,
|
||||||
|
CommandShipGroupTransfer,
|
||||||
|
CommandShipGroupJoinFleet,
|
||||||
|
CommandFleetMerge,
|
||||||
|
CommandFleetSend,
|
||||||
|
CommandScienceCreate,
|
||||||
|
CommandScienceRemove,
|
||||||
|
CommandPlanetRename,
|
||||||
|
CommandPlanetProduce,
|
||||||
|
CommandPlanetRouteSet,
|
||||||
|
CommandPlanetRouteRemove
|
||||||
}
|
}
|
||||||
|
|
||||||
table CommandItem {
|
table CommandItem {
|
||||||
id: uuid;
|
cmd_id: string;
|
||||||
command: Commands;
|
cmd_applied: bool = null;
|
||||||
|
cmd_error_code: int64 = null;
|
||||||
|
payload: CommandPayload (required);
|
||||||
}
|
}
|
||||||
|
|
||||||
table Order {
|
table Order {
|
||||||
updated_at: uint64; // utc timestamp
|
updated_at: int64;
|
||||||
commands: [CommandItem];
|
commands: [CommandItem];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user