From 43442ac82940126ae8087037ebd1fb4025d4f0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Fri, 15 Mar 2024 00:21:58 -0500 Subject: [PATCH] feat: start of protobuf --- .../blitzkrieg/tankDefinitions/index.proto | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 src/core/blitzkrieg/tankDefinitions/index.proto diff --git a/src/core/blitzkrieg/tankDefinitions/index.proto b/src/core/blitzkrieg/tankDefinitions/index.proto new file mode 100644 index 000000000..38300fabb --- /dev/null +++ b/src/core/blitzkrieg/tankDefinitions/index.proto @@ -0,0 +1,110 @@ +syntax = "proto3"; + +message TankDefinitions { + map tanks = 1; +} + +message TankDefinition { + enum Nation { + USA = 0; + GERMANY = 1; + USSR = 2; + UK = 3; + JAPAN = 4; + CHINA = 5; + FRANCE = 6; + EUROPEAN = 7; + OTHER = 8; + } + + enum TreeType { + RESEARCHABLE = 0; + PREMIUM = 1; + COLLECTOR = 2; + } + + enum Class { + LIGHT = 0; + MEDIUM = 1; + HEAVY = 2; + TANK_DESTROYER = 3; + } + + message Price { + enum PriceType { + CREDITS = 0; + GOLD = 1; + } + + PriceType type = 1; + uint32 value = 2; + } + + uint32 id = 1; + string name = 2; + optional string nameFull = 3; + uint32 tier = 4; + Nation nation = 5; + TreeType treeType = 6; + Class class = 7; + Price price = 8; + bool testing = 9; + + message Speed { + uint32 forwards = 1; + uint32 backwards = 2; + } + + message Camouflage { + uint32 still = 1; + uint32 moving = 2; + uint32 onFire = 3; + } + + uint32 health = 10; + repeated Crew crew = 11; + uint32 consumables = 12; + uint32 provisions = 13; + Speed speed = 14; + Camouflage camouflage = 15; + uint32 weight = 16; + string equipment = 17; + optional bool fixedCamouflage = 18; + + optional uint32 xp = 19; + repeated uint32 ancestors = 20; + repeated uint32 successors = 21; + repeated Turret turrets = 22; + repeated Engine engines = 23; + repeated Track tracks = 24; +} + +message Turret { + uint32 id = 1; + string name = 2; + uint32 tier = 3; + + uint32 health = 4; + uint32 viewRange = 5; + uint32 traverseSpeed = 6; + uint32 weight = 7; + + optional uint32 xp = 8; + repeated Gun guns = 9; +} + +message Gun {} + +message Crew { + enum CrewType { + COMMANDER = 0; + RADIOMAN = 1; + GUNNER = 2; + DRIVER = 3; + LOADER = 4; + } + + CrewType type = 1; + uint32 count = 2; + repeated CrewType substitute = 3; +}