config/game_messages.proto in game_machine-0.0.11 vs config/game_messages.proto in game_machine-1.0.2

- old
+ new

@@ -1,46 +1,108 @@ // Used to by the entity tracking system to attack additional fields to your -// tracking updates. You can change any of the fields in TrackExtra to suit your +// tracking updates. You can change any of the fields in TrackData to suit your // needs, but do NOT remove the message definition! -message TrackExtra { +message TrackData { optional float speed = 1; optional float velocity = 2; optional Vector3 direction = 3; optional string json = 4; + optional string id = 5; + optional float x = 6; + optional float y = 7; + optional float z = 8; + optional string entityType = 9; + optional string neighborEntityType = 11; + optional int32 action = 12; } -message Health { - required int32 health = 1; +message GameMessage { + // Used internally, do not change + optional string playerId = 1; + optional string messageId = 2; + optional int32 destinationId = 3; + optional string destination = 4; + + // User modifiable + optional PlayerItems playerItems = 10; + optional AddPlayerItem addPlayerItem = 11; + optional RemovePlayerItem removePlayerItem = 12; + optional RequestPlayerItems requestPlayerItems = 13; } -message Effect { - optional int32 length = 1; - optional string name = 2; - optional int32 healthDiff = 3; - optional int32 damageDiff = 4; - optional int32 timePeriod = 5; - optional string type = 6; +message GameMessages { + repeated GameMessage gameMessage = 1; } -message EffectList { - repeated Effect effect = 1; +// Inventory messages + +local_persistent_message PlayerItem { + required string id = 1; + required string name = 2; + required int32 quantity = 3; + optional string color = 4; + optional Weapon weapon = 5; + optional Consumable consumable = 6; + optional Cost cost = 8; } -message CombatAbility { - required string name = 1; - required int32 damage = 2; - optional int32 hitChance = 3; - required int32 range = 4; - optional string type = 5; + +local_message Cost { + required float amount = 1; + required string currency = 2; } -message Attack { - required string attacker = 1; - required string target = 2; - optional int32 combatAbilityId = 3; +local_message Consumable { + required string type = 1; + required string size = 2; } -message IsPlayer { - optional bool enabled = 1; +local_message Weapon { + required int32 attack = 1; + required int32 delay = 2; } + +local_message RequestPlayerItems { + optional bool catalog = 1; +} + +message PlayerItems { + optional bool catalog = 1; + repeated PlayerItem playerItem = 2; +} + +local_message AddPlayerItem { + required PlayerItem playerItem = 1; +} + +local_message RemovePlayerItem { + required string id = 1; + required int32 quantity = 2; +} + + + +persistent_message TestObject { + required string id = 12; + optional string optionalString = 1; + required string requiredString = 2; + repeated int32 numbers = 3; + optional bytes bstring = 4; + optional bool bvalue = 5; + optional double dvalue = 6; + optional float fvalue = 7; + optional int64 numbers64 = 8; + repeated Player player = 9; + enum Corpus { + UNIVERSAL = 0; + WEB = 1; + IMAGES = 2; + LOCAL = 3; + NEWS = 4; + PRODUCTS = 5; + VIDEO = 6; + } + optional Corpus corpus = 10; + repeated Corpus corpus2 = 11; +} \ No newline at end of file