sc2ai 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/data/sc2ai/protocol/common.proto +1 -1
  3. data/data/sc2ai/protocol/data.proto +4 -1
  4. data/data/sc2ai/protocol/debug.proto +5 -1
  5. data/data/sc2ai/protocol/error.proto +2 -1
  6. data/data/sc2ai/protocol/query.proto +1 -1
  7. data/data/sc2ai/protocol/raw.proto +8 -6
  8. data/data/sc2ai/protocol/sc2api.proto +21 -7
  9. data/data/sc2ai/protocol/score.proto +2 -1
  10. data/data/sc2ai/protocol/spatial.proto +2 -1
  11. data/data/sc2ai/protocol/ui.proto +4 -1
  12. data/lib/docker_build/Dockerfile.ruby +4 -2
  13. data/lib/sc2ai/api/ability_id.rb +6 -1
  14. data/lib/sc2ai/api/data.rb +15 -0
  15. data/lib/sc2ai/api/tech_tree.rb +1 -1
  16. data/lib/sc2ai/api/tech_tree_data.rb +54 -3
  17. data/lib/sc2ai/connection.rb +0 -1
  18. data/lib/sc2ai/overrides/async/process/child.rb +1 -1
  19. data/lib/sc2ai/player/debug.rb +36 -2
  20. data/lib/sc2ai/player/geo.rb +2 -2
  21. data/lib/sc2ai/player/units.rb +25 -1
  22. data/lib/sc2ai/player.rb +2 -7
  23. data/lib/sc2ai/ports.rb +0 -1
  24. data/lib/sc2ai/protocol/_meta_documentation.rb +249 -4
  25. data/lib/sc2ai/protocol/common_pb.rb +2 -23
  26. data/lib/sc2ai/protocol/data_pb.rb +2 -23
  27. data/lib/sc2ai/protocol/debug_pb.rb +2 -24
  28. data/lib/sc2ai/protocol/error_pb.rb +2 -23
  29. data/lib/sc2ai/protocol/extensions/point_2_d.rb +4 -0
  30. data/lib/sc2ai/protocol/extensions/position.rb +1 -1
  31. data/lib/sc2ai/protocol/extensions/unit.rb +44 -3
  32. data/lib/sc2ai/protocol/extensions/unit_type_data.rb +8 -0
  33. data/lib/sc2ai/protocol/query_pb.rb +2 -24
  34. data/lib/sc2ai/protocol/raw_pb.rb +2 -24
  35. data/lib/sc2ai/protocol/sc2api_pb.rb +2 -31
  36. data/lib/sc2ai/protocol/score_pb.rb +2 -23
  37. data/lib/sc2ai/protocol/spatial_pb.rb +2 -24
  38. data/lib/sc2ai/protocol/ui_pb.rb +2 -23
  39. data/lib/sc2ai/unit_group/filter_ext.rb +16 -1
  40. data/lib/sc2ai/version.rb +1 -1
  41. data/lib/templates/new/.ladderignore +15 -5
  42. data/lib/templates/new/my_bot.rb.tt +1 -1
  43. data/sig/minaswan.rbs +10323 -0
  44. data/sig/sc2ai.rbs +376 -34
  45. metadata +12 -12
  46. data/lib/sc2ai/protocol/extensions/unit_type.rb +0 -9
@@ -8,32 +8,10 @@ require 'sc2ai/protocol/common_pb'
8
8
  require 'sc2ai/protocol/error_pb'
9
9
 
10
10
 
11
- descriptor_data = "\n\x1asc2ai/protocol/query.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\x1a\x1asc2ai/protocol/error.proto\"\xcf\x01\n\x0cRequestQuery\x12)\n\x07pathing\x18\x01 \x03(\x0b\x32\x18.Api.RequestQueryPathing\x12\x36\n\tabilities\x18\x02 \x03(\x0b\x32#.Api.RequestQueryAvailableAbilities\x12\x36\n\nplacements\x18\x03 \x03(\x0b\x32\".Api.RequestQueryBuildingPlacement\x12$\n\x1cignore_resource_requirements\x18\x04 \x01(\x08\"\xad\x01\n\rResponseQuery\x12*\n\x07pathing\x18\x01 \x03(\x0b\x32\x19.Api.ResponseQueryPathing\x12\x37\n\tabilities\x18\x02 \x03(\x0b\x32$.Api.ResponseQueryAvailableAbilities\x12\x37\n\nplacements\x18\x03 \x03(\x0b\x32#.Api.ResponseQueryBuildingPlacement\"t\n\x13RequestQueryPathing\x12!\n\tstart_pos\x18\x01 \x01(\x0b\x32\x0c.Api.Point2DH\x00\x12\x12\n\x08unit_tag\x18\x02 \x01(\x04H\x00\x12\x1d\n\x07\x65nd_pos\x18\x03 \x01(\x0b\x32\x0c.Api.Point2DB\x07\n\x05start\"(\n\x14ResponseQueryPathing\x12\x10\n\x08\x64istance\x18\x01 \x01(\x02\"2\n\x1eRequestQueryAvailableAbilities\x12\x10\n\x08unit_tag\x18\x01 \x01(\x04\"s\n\x1fResponseQueryAvailableAbilities\x12(\n\tabilities\x18\x01 \x03(\x0b\x32\x15.Api.AvailableAbility\x12\x10\n\x08unit_tag\x18\x02 \x01(\x04\x12\x14\n\x0cunit_type_id\x18\x03 \x01(\r\"o\n\x1dRequestQueryBuildingPlacement\x12\x12\n\nability_id\x18\x01 \x01(\x05\x12 \n\ntarget_pos\x18\x02 \x01(\x0b\x32\x0c.Api.Point2D\x12\x18\n\x10placing_unit_tag\x18\x03 \x01(\x04\"C\n\x1eResponseQueryBuildingPlacement\x12!\n\x06result\x18\x01 \x01(\x0e\x32\x11.Api.ActionResult"
11
+ descriptor_data = "\n\x1asc2ai/protocol/query.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\x1a\x1asc2ai/protocol/error.proto\"\xf5\x01\n\x0cRequestQuery\x12)\n\x07pathing\x18\x01 \x03(\x0b\x32\x18.Api.RequestQueryPathing\x12\x36\n\tabilities\x18\x02 \x03(\x0b\x32#.Api.RequestQueryAvailableAbilities\x12\x36\n\nplacements\x18\x03 \x03(\x0b\x32\".Api.RequestQueryBuildingPlacement\x12)\n\x1cignore_resource_requirements\x18\x04 \x01(\x08H\x00\x88\x01\x01\x42\x1f\n\x1d_ignore_resource_requirements\"\xad\x01\n\rResponseQuery\x12*\n\x07pathing\x18\x01 \x03(\x0b\x32\x19.Api.ResponseQueryPathing\x12\x37\n\tabilities\x18\x02 \x03(\x0b\x32$.Api.ResponseQueryAvailableAbilities\x12\x37\n\nplacements\x18\x03 \x03(\x0b\x32#.Api.ResponseQueryBuildingPlacement\"\x85\x01\n\x13RequestQueryPathing\x12!\n\tstart_pos\x18\x01 \x01(\x0b\x32\x0c.Api.Point2DH\x00\x12\x12\n\x08unit_tag\x18\x02 \x01(\x04H\x00\x12\"\n\x07\x65nd_pos\x18\x03 \x01(\x0b\x32\x0c.Api.Point2DH\x01\x88\x01\x01\x42\x07\n\x05startB\n\n\x08_end_pos\":\n\x14ResponseQueryPathing\x12\x15\n\x08\x64istance\x18\x01 \x01(\x02H\x00\x88\x01\x01\x42\x0b\n\t_distance\"D\n\x1eRequestQueryAvailableAbilities\x12\x15\n\x08unit_tag\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\x0b\n\t_unit_tag\"\x9b\x01\n\x1fResponseQueryAvailableAbilities\x12(\n\tabilities\x18\x01 \x03(\x0b\x32\x15.Api.AvailableAbility\x12\x15\n\x08unit_tag\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x19\n\x0cunit_type_id\x18\x03 \x01(\rH\x01\x88\x01\x01\x42\x0b\n\t_unit_tagB\x0f\n\r_unit_type_id\"\xb1\x01\n\x1dRequestQueryBuildingPlacement\x12\x17\n\nability_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12%\n\ntarget_pos\x18\x02 \x01(\x0b\x32\x0c.Api.Point2DH\x01\x88\x01\x01\x12\x1d\n\x10placing_unit_tag\x18\x03 \x01(\x04H\x02\x88\x01\x01\x42\r\n\x0b_ability_idB\r\n\x0b_target_posB\x13\n\x11_placing_unit_tag\"S\n\x1eResponseQueryBuildingPlacement\x12&\n\x06result\x18\x01 \x01(\x0e\x32\x11.Api.ActionResultH\x00\x88\x01\x01\x42\t\n\x07_resultb\x06proto3"
12
12
 
13
13
  pool = Google::Protobuf::DescriptorPool.generated_pool
14
-
15
- begin
16
- pool.add_serialized_file(descriptor_data)
17
- rescue TypeError
18
- # Compatibility code: will be removed in the next major version.
19
- require 'google/protobuf/descriptor_pb'
20
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
- parsed.clear_dependency
22
- serialized = parsed.class.encode(parsed)
23
- file = pool.add_serialized_file(serialized)
24
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
- imports = [
26
- ["Api.Point2D", "sc2ai/protocol/common.proto"],
27
- ]
28
- imports.each do |type_name, expected_filename|
29
- import_file = pool.lookup(type_name).file_descriptor
30
- if import_file.name != expected_filename
31
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
32
- end
33
- end
34
- warn "Each proto file must use a consistent fully-qualified name."
35
- warn "This will become an error in the next major version."
36
- end
14
+ pool.add_serialized_file(descriptor_data)
37
15
 
38
16
  module Api
39
17
  RequestQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.RequestQuery").msgclass
@@ -7,32 +7,10 @@ require 'google/protobuf'
7
7
  require 'sc2ai/protocol/common_pb'
8
8
 
9
9
 
10
- descriptor_data = "\n\x18sc2ai/protocol/raw.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\"\xef\x01\n\x08StartRaw\x12\x1e\n\x08map_size\x18\x01 \x01(\x0b\x32\x0c.Api.Size2DI\x12$\n\x0cpathing_grid\x18\x02 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\x0eterrain_height\x18\x03 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\x0eplacement_grid\x18\x04 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\rplayable_area\x18\x05 \x01(\x0b\x32\x0f.Api.RectangleI\x12%\n\x0fstart_locations\x18\x06 \x03(\x0b\x32\x0c.Api.Point2D\"\xc4\x01\n\x0eObservationRaw\x12\x1e\n\x06player\x18\x01 \x01(\x0b\x32\x0e.Api.PlayerRaw\x12\x18\n\x05units\x18\x02 \x03(\x0b\x32\t.Api.Unit\x12 \n\tmap_state\x18\x03 \x01(\x0b\x32\r.Api.MapState\x12\x19\n\x05\x65vent\x18\x04 \x01(\x0b\x32\n.Api.Event\x12\x1c\n\x07\x65\x66\x66\x65\x63ts\x18\x05 \x03(\x0b\x32\x0b.Api.Effect\x12\x1d\n\x05radar\x18\x06 \x03(\x0b\x32\x0e.Api.RadarRing\"4\n\tRadarRing\x12\x17\n\x03pos\x18\x01 \x01(\x0b\x32\n.Api.Point\x12\x0e\n\x06radius\x18\x02 \x01(\x02\"C\n\x0bPowerSource\x12\x17\n\x03pos\x18\x01 \x01(\x0b\x32\n.Api.Point\x12\x0e\n\x06radius\x18\x02 \x01(\x02\x12\x0b\n\x03tag\x18\x03 \x01(\x04\"e\n\tPlayerRaw\x12\'\n\rpower_sources\x18\x01 \x03(\x0b\x32\x10.Api.PowerSource\x12\x1a\n\x06\x63\x61mera\x18\x02 \x01(\x0b\x32\n.Api.Point\x12\x13\n\x0bupgrade_ids\x18\x03 \x03(\r\"\x84\x01\n\tUnitOrder\x12\x12\n\nability_id\x18\x01 \x01(\r\x12,\n\x16target_world_space_pos\x18\x02 \x01(\x0b\x32\n.Api.PointH\x00\x12\x19\n\x0ftarget_unit_tag\x18\x03 \x01(\x04H\x00\x12\x10\n\x08progress\x18\x04 \x01(\x02\x42\x08\n\x06target\"\x9b\x01\n\rPassengerUnit\x12\x0b\n\x03tag\x18\x01 \x01(\x04\x12\x0e\n\x06health\x18\x02 \x01(\x02\x12\x12\n\nhealth_max\x18\x03 \x01(\x02\x12\x0e\n\x06shield\x18\x04 \x01(\x02\x12\x12\n\nshield_max\x18\x07 \x01(\x02\x12\x0e\n\x06\x65nergy\x18\x05 \x01(\x02\x12\x12\n\nenergy_max\x18\x08 \x01(\x02\x12\x11\n\tunit_type\x18\x06 \x01(\r\"5\n\x0bRallyTarget\x12\x19\n\x05point\x18\x01 \x01(\x0b\x32\n.Api.Point\x12\x0b\n\x03tag\x18\x02 \x01(\x04\"\xa8\x08\n\x04Unit\x12&\n\x0c\x64isplay_type\x18\x01 \x01(\x0e\x32\x10.Api.DisplayType\x12\x1f\n\x08\x61lliance\x18\x02 \x01(\x0e\x32\r.Api.Alliance\x12\x0b\n\x03tag\x18\x03 \x01(\x04\x12\x11\n\tunit_type\x18\x04 \x01(\r\x12\r\n\x05owner\x18\x05 \x01(\x05\x12\x17\n\x03pos\x18\x06 \x01(\x0b\x32\n.Api.Point\x12\x0e\n\x06\x66\x61\x63ing\x18\x07 \x01(\x02\x12\x0e\n\x06radius\x18\x08 \x01(\x02\x12\x16\n\x0e\x62uild_progress\x18\t \x01(\x02\x12\x1e\n\x05\x63loak\x18\n \x01(\x0e\x32\x0f.Api.CloakState\x12\x10\n\x08\x62uff_ids\x18\x1b \x03(\r\x12\x14\n\x0c\x64\x65tect_range\x18\x1f \x01(\x02\x12\x13\n\x0bradar_range\x18 \x01(\x02\x12\x13\n\x0bis_selected\x18\x0b \x01(\x08\x12\x14\n\x0cis_on_screen\x18\x0c \x01(\x08\x12\x0f\n\x07is_blip\x18\r \x01(\x08\x12\x12\n\nis_powered\x18# \x01(\x08\x12\x11\n\tis_active\x18\' \x01(\x08\x12\x1c\n\x14\x61ttack_upgrade_level\x18( \x01(\x05\x12\x1b\n\x13\x61rmor_upgrade_level\x18) \x01(\x05\x12\x1c\n\x14shield_upgrade_level\x18* \x01(\x05\x12\x0e\n\x06health\x18\x0e \x01(\x02\x12\x12\n\nhealth_max\x18\x0f \x01(\x02\x12\x0e\n\x06shield\x18\x10 \x01(\x02\x12\x12\n\nshield_max\x18$ \x01(\x02\x12\x0e\n\x06\x65nergy\x18\x11 \x01(\x02\x12\x12\n\nenergy_max\x18% \x01(\x02\x12\x18\n\x10mineral_contents\x18\x12 \x01(\x05\x12\x18\n\x10vespene_contents\x18\x13 \x01(\x05\x12\x11\n\tis_flying\x18\x14 \x01(\x08\x12\x13\n\x0bis_burrowed\x18\x15 \x01(\x08\x12\x18\n\x10is_hallucination\x18& \x01(\x08\x12\x1e\n\x06orders\x18\x16 \x03(\x0b\x32\x0e.Api.UnitOrder\x12\x12\n\nadd_on_tag\x18\x17 \x01(\x04\x12&\n\npassengers\x18\x18 \x03(\x0b\x32\x12.Api.PassengerUnit\x12\x19\n\x11\x63\x61rgo_space_taken\x18\x19 \x01(\x05\x12\x17\n\x0f\x63\x61rgo_space_max\x18\x1a \x01(\x05\x12\x1b\n\x13\x61ssigned_harvesters\x18\x1c \x01(\x05\x12\x18\n\x10ideal_harvesters\x18\x1d \x01(\x05\x12\x17\n\x0fweapon_cooldown\x18\x1e \x01(\x02\x12\x1a\n\x12\x65ngaged_target_tag\x18\" \x01(\x04\x12\x1c\n\x14\x62uff_duration_remain\x18+ \x01(\x05\x12\x19\n\x11\x62uff_duration_max\x18, \x01(\x05\x12\'\n\rrally_targets\x18- \x03(\x0b\x32\x10.Api.RallyTarget\"M\n\x08MapState\x12\"\n\nvisibility\x18\x01 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1d\n\x05\x63reep\x18\x02 \x01(\x0b\x32\x0e.Api.ImageData\"\x1b\n\x05\x45vent\x12\x12\n\ndead_units\x18\x01 \x03(\x04\"v\n\x06\x45\x66\x66\x65\x63t\x12\x11\n\teffect_id\x18\x01 \x01(\r\x12\x19\n\x03pos\x18\x02 \x03(\x0b\x32\x0c.Api.Point2D\x12\x1f\n\x08\x61lliance\x18\x03 \x01(\x0e\x32\r.Api.Alliance\x12\r\n\x05owner\x18\x04 \x01(\x05\x12\x0e\n\x06radius\x18\x05 \x01(\x02\"\xb2\x01\n\tActionRaw\x12\x31\n\x0cunit_command\x18\x01 \x01(\x0b\x32\x19.Api.ActionRawUnitCommandH\x00\x12/\n\x0b\x63\x61mera_move\x18\x02 \x01(\x0b\x32\x18.Api.ActionRawCameraMoveH\x00\x12\x37\n\x0ftoggle_autocast\x18\x03 \x01(\x0b\x32\x1c.Api.ActionRawToggleAutocastH\x00\x42\x08\n\x06\x61\x63tion\"\xa9\x01\n\x14\x41\x63tionRawUnitCommand\x12\x12\n\nability_id\x18\x01 \x01(\x05\x12.\n\x16target_world_space_pos\x18\x02 \x01(\x0b\x32\x0c.Api.Point2DH\x00\x12\x19\n\x0ftarget_unit_tag\x18\x03 \x01(\x04H\x00\x12\x11\n\tunit_tags\x18\x04 \x03(\x04\x12\x15\n\rqueue_command\x18\x05 \x01(\x08\x42\x08\n\x06target\"=\n\x13\x41\x63tionRawCameraMove\x12&\n\x12\x63\x65nter_world_space\x18\x01 \x01(\x0b\x32\n.Api.Point\"@\n\x17\x41\x63tionRawToggleAutocast\x12\x12\n\nability_id\x18\x01 \x01(\x05\x12\x11\n\tunit_tags\x18\x02 \x03(\x04*E\n\x0b\x44isplayType\x12\x0b\n\x07Visible\x10\x01\x12\x0c\n\x08Snapshot\x10\x02\x12\n\n\x06Hidden\x10\x03\x12\x0f\n\x0bPlaceholder\x10\x04*6\n\x08\x41lliance\x12\x08\n\x04Self\x10\x01\x12\x08\n\x04\x41lly\x10\x02\x12\x0b\n\x07Neutral\x10\x03\x12\t\n\x05\x45nemy\x10\x04*e\n\nCloakState\x12\x12\n\x0e\x43loakedUnknown\x10\x00\x12\x0b\n\x07\x43loaked\x10\x01\x12\x13\n\x0f\x43loakedDetected\x10\x02\x12\x0e\n\nNotCloaked\x10\x03\x12\x11\n\rCloakedAllied\x10\x04"
10
+ descriptor_data = "\n\x18sc2ai/protocol/raw.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\"\xf2\x02\n\x08StartRaw\x12\'\n\x08map_size\x18\x01 \x01(\x0b\x32\x0c.Api.Size2DIB\x02x\x01H\x00\x88\x01\x01\x12)\n\x0cpathing_grid\x18\x02 \x01(\x0b\x32\x0e.Api.ImageDataH\x01\x88\x01\x01\x12/\n\x0eterrain_height\x18\x03 \x01(\x0b\x32\x0e.Api.ImageDataB\x02x\x01H\x02\x88\x01\x01\x12/\n\x0eplacement_grid\x18\x04 \x01(\x0b\x32\x0e.Api.ImageDataB\x02x\x01H\x03\x88\x01\x01\x12/\n\rplayable_area\x18\x05 \x01(\x0b\x32\x0f.Api.RectangleIB\x02x\x01H\x04\x88\x01\x01\x12)\n\x0fstart_locations\x18\x06 \x03(\x0b\x32\x0c.Api.Point2DB\x02x\x01\x42\x0b\n\t_map_sizeB\x0f\n\r_pathing_gridB\x11\n\x0f_terrain_heightB\x11\n\x0f_placement_gridB\x10\n\x0e_playable_area\"\xf6\x01\n\x0eObservationRaw\x12#\n\x06player\x18\x01 \x01(\x0b\x32\x0e.Api.PlayerRawH\x00\x88\x01\x01\x12\x18\n\x05units\x18\x02 \x03(\x0b\x32\t.Api.Unit\x12%\n\tmap_state\x18\x03 \x01(\x0b\x32\r.Api.MapStateH\x01\x88\x01\x01\x12\x1e\n\x05\x65vent\x18\x04 \x01(\x0b\x32\n.Api.EventH\x02\x88\x01\x01\x12\x1c\n\x07\x65\x66\x66\x65\x63ts\x18\x05 \x03(\x0b\x32\x0b.Api.Effect\x12\x1d\n\x05radar\x18\x06 \x03(\x0b\x32\x0e.Api.RadarRingB\t\n\x07_playerB\x0c\n\n_map_stateB\x08\n\x06_event\"Q\n\tRadarRing\x12\x1c\n\x03pos\x18\x01 \x01(\x0b\x32\n.Api.PointH\x00\x88\x01\x01\x12\x13\n\x06radius\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x06\n\x04_posB\t\n\x07_radius\"m\n\x0bPowerSource\x12\x1c\n\x03pos\x18\x01 \x01(\x0b\x32\n.Api.PointH\x00\x88\x01\x01\x12\x13\n\x06radius\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x10\n\x03tag\x18\x03 \x01(\x04H\x02\x88\x01\x01\x42\x06\n\x04_posB\t\n\x07_radiusB\x06\n\x04_tag\"u\n\tPlayerRaw\x12\'\n\rpower_sources\x18\x01 \x03(\x0b\x32\x10.Api.PowerSource\x12\x1f\n\x06\x63\x61mera\x18\x02 \x01(\x0b\x32\n.Api.PointH\x00\x88\x01\x01\x12\x13\n\x0bupgrade_ids\x18\x03 \x03(\rB\t\n\x07_camera\"\xaa\x01\n\tUnitOrder\x12\x17\n\nability_id\x18\x01 \x01(\rH\x01\x88\x01\x01\x12,\n\x16target_world_space_pos\x18\x02 \x01(\x0b\x32\n.Api.PointH\x00\x12\x19\n\x0ftarget_unit_tag\x18\x03 \x01(\x04H\x00\x12\x15\n\x08progress\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06targetB\r\n\x0b_ability_idB\x0b\n\t_progress\"\xa7\x02\n\rPassengerUnit\x12\x10\n\x03tag\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x13\n\x06health\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x17\n\nhealth_max\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x13\n\x06shield\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x17\n\nshield_max\x18\x07 \x01(\x02H\x04\x88\x01\x01\x12\x13\n\x06\x65nergy\x18\x05 \x01(\x02H\x05\x88\x01\x01\x12\x17\n\nenergy_max\x18\x08 \x01(\x02H\x06\x88\x01\x01\x12\x16\n\tunit_type\x18\x06 \x01(\rH\x07\x88\x01\x01\x42\x06\n\x04_tagB\t\n\x07_healthB\r\n\x0b_health_maxB\t\n\x07_shieldB\r\n\x0b_shield_maxB\t\n\x07_energyB\r\n\x0b_energy_maxB\x0c\n\n_unit_type\"Q\n\x0bRallyTarget\x12\x1e\n\x05point\x18\x01 \x01(\x0b\x32\n.Api.PointH\x00\x88\x01\x01\x12\x10\n\x03tag\x18\x02 \x01(\x04H\x01\x88\x01\x01\x42\x08\n\x06_pointB\x06\n\x04_tag\"\x89\x0f\n\x04Unit\x12+\n\x0c\x64isplay_type\x18\x01 \x01(\x0e\x32\x10.Api.DisplayTypeH\x00\x88\x01\x01\x12$\n\x08\x61lliance\x18\x02 \x01(\x0e\x32\r.Api.AllianceH\x01\x88\x01\x01\x12\x10\n\x03tag\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x16\n\tunit_type\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x12\n\x05owner\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12\x1c\n\x03pos\x18\x06 \x01(\x0b\x32\n.Api.PointH\x05\x88\x01\x01\x12\x13\n\x06\x66\x61\x63ing\x18\x07 \x01(\x02H\x06\x88\x01\x01\x12\x13\n\x06radius\x18\x08 \x01(\x02H\x07\x88\x01\x01\x12\x1b\n\x0e\x62uild_progress\x18\t \x01(\x02H\x08\x88\x01\x01\x12#\n\x05\x63loak\x18\n \x01(\x0e\x32\x0f.Api.CloakStateH\t\x88\x01\x01\x12\x10\n\x08\x62uff_ids\x18\x1b \x03(\r\x12\x19\n\x0c\x64\x65tect_range\x18\x1f \x01(\x02H\n\x88\x01\x01\x12\x18\n\x0bradar_range\x18 \x01(\x02H\x0b\x88\x01\x01\x12\x18\n\x0bis_selected\x18\x0b \x01(\x08H\x0c\x88\x01\x01\x12\x19\n\x0cis_on_screen\x18\x0c \x01(\x08H\r\x88\x01\x01\x12\x14\n\x07is_blip\x18\r \x01(\x08H\x0e\x88\x01\x01\x12\x17\n\nis_powered\x18# \x01(\x08H\x0f\x88\x01\x01\x12\x16\n\tis_active\x18\' \x01(\x08H\x10\x88\x01\x01\x12!\n\x14\x61ttack_upgrade_level\x18( \x01(\x05H\x11\x88\x01\x01\x12 \n\x13\x61rmor_upgrade_level\x18) \x01(\x05H\x12\x88\x01\x01\x12!\n\x14shield_upgrade_level\x18* \x01(\x05H\x13\x88\x01\x01\x12\x13\n\x06health\x18\x0e \x01(\x02H\x14\x88\x01\x01\x12\x17\n\nhealth_max\x18\x0f \x01(\x02H\x15\x88\x01\x01\x12\x13\n\x06shield\x18\x10 \x01(\x02H\x16\x88\x01\x01\x12\x17\n\nshield_max\x18$ \x01(\x02H\x17\x88\x01\x01\x12\x13\n\x06\x65nergy\x18\x11 \x01(\x02H\x18\x88\x01\x01\x12\x17\n\nenergy_max\x18% \x01(\x02H\x19\x88\x01\x01\x12\x1d\n\x10mineral_contents\x18\x12 \x01(\x05H\x1a\x88\x01\x01\x12\x1d\n\x10vespene_contents\x18\x13 \x01(\x05H\x1b\x88\x01\x01\x12\x16\n\tis_flying\x18\x14 \x01(\x08H\x1c\x88\x01\x01\x12\x18\n\x0bis_burrowed\x18\x15 \x01(\x08H\x1d\x88\x01\x01\x12\x1d\n\x10is_hallucination\x18& \x01(\x08H\x1e\x88\x01\x01\x12\x1e\n\x06orders\x18\x16 \x03(\x0b\x32\x0e.Api.UnitOrder\x12\x17\n\nadd_on_tag\x18\x17 \x01(\x04H\x1f\x88\x01\x01\x12&\n\npassengers\x18\x18 \x03(\x0b\x32\x12.Api.PassengerUnit\x12\x1e\n\x11\x63\x61rgo_space_taken\x18\x19 \x01(\x05H \x88\x01\x01\x12\x1c\n\x0f\x63\x61rgo_space_max\x18\x1a \x01(\x05H!\x88\x01\x01\x12 \n\x13\x61ssigned_harvesters\x18\x1c \x01(\x05H\"\x88\x01\x01\x12\x1d\n\x10ideal_harvesters\x18\x1d \x01(\x05H#\x88\x01\x01\x12\x1c\n\x0fweapon_cooldown\x18\x1e \x01(\x02H$\x88\x01\x01\x12\x1f\n\x12\x65ngaged_target_tag\x18\" \x01(\x04H%\x88\x01\x01\x12!\n\x14\x62uff_duration_remain\x18+ \x01(\x05H&\x88\x01\x01\x12\x1e\n\x11\x62uff_duration_max\x18, \x01(\x05H\'\x88\x01\x01\x12\'\n\rrally_targets\x18- \x03(\x0b\x32\x10.Api.RallyTargetB\x0f\n\r_display_typeB\x0b\n\t_allianceB\x06\n\x04_tagB\x0c\n\n_unit_typeB\x08\n\x06_ownerB\x06\n\x04_posB\t\n\x07_facingB\t\n\x07_radiusB\x11\n\x0f_build_progressB\x08\n\x06_cloakB\x0f\n\r_detect_rangeB\x0e\n\x0c_radar_rangeB\x0e\n\x0c_is_selectedB\x0f\n\r_is_on_screenB\n\n\x08_is_blipB\r\n\x0b_is_poweredB\x0c\n\n_is_activeB\x17\n\x15_attack_upgrade_levelB\x16\n\x14_armor_upgrade_levelB\x17\n\x15_shield_upgrade_levelB\t\n\x07_healthB\r\n\x0b_health_maxB\t\n\x07_shieldB\r\n\x0b_shield_maxB\t\n\x07_energyB\r\n\x0b_energy_maxB\x13\n\x11_mineral_contentsB\x13\n\x11_vespene_contentsB\x0c\n\n_is_flyingB\x0e\n\x0c_is_burrowedB\x13\n\x11_is_hallucinationB\r\n\x0b_add_on_tagB\x14\n\x12_cargo_space_takenB\x12\n\x10_cargo_space_maxB\x16\n\x14_assigned_harvestersB\x13\n\x11_ideal_harvestersB\x12\n\x10_weapon_cooldownB\x15\n\x13_engaged_target_tagB\x17\n\x15_buff_duration_remainB\x14\n\x12_buff_duration_max\"p\n\x08MapState\x12\'\n\nvisibility\x18\x01 \x01(\x0b\x32\x0e.Api.ImageDataH\x00\x88\x01\x01\x12\"\n\x05\x63reep\x18\x02 \x01(\x0b\x32\x0e.Api.ImageDataH\x01\x88\x01\x01\x42\r\n\x0b_visibilityB\x08\n\x06_creep\"\x1b\n\x05\x45vent\x12\x12\n\ndead_units\x18\x01 \x03(\x04\"\xba\x01\n\x06\x45\x66\x66\x65\x63t\x12\x16\n\teffect_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x03pos\x18\x02 \x03(\x0b\x32\x0c.Api.Point2D\x12$\n\x08\x61lliance\x18\x03 \x01(\x0e\x32\r.Api.AllianceH\x01\x88\x01\x01\x12\x12\n\x05owner\x18\x04 \x01(\x05H\x02\x88\x01\x01\x12\x13\n\x06radius\x18\x05 \x01(\x02H\x03\x88\x01\x01\x42\x0c\n\n_effect_idB\x0b\n\t_allianceB\x08\n\x06_ownerB\t\n\x07_radius\"\xb2\x01\n\tActionRaw\x12\x31\n\x0cunit_command\x18\x01 \x01(\x0b\x32\x19.Api.ActionRawUnitCommandH\x00\x12/\n\x0b\x63\x61mera_move\x18\x02 \x01(\x0b\x32\x18.Api.ActionRawCameraMoveH\x00\x12\x37\n\x0ftoggle_autocast\x18\x03 \x01(\x0b\x32\x1c.Api.ActionRawToggleAutocastH\x00\x42\x08\n\x06\x61\x63tion\"\xd4\x01\n\x14\x41\x63tionRawUnitCommand\x12\x17\n\nability_id\x18\x01 \x01(\x05H\x01\x88\x01\x01\x12.\n\x16target_world_space_pos\x18\x02 \x01(\x0b\x32\x0c.Api.Point2DH\x00\x12\x19\n\x0ftarget_unit_tag\x18\x03 \x01(\x04H\x00\x12\x11\n\tunit_tags\x18\x04 \x03(\x04\x12\x1a\n\rqueue_command\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\x08\n\x06targetB\r\n\x0b_ability_idB\x10\n\x0e_queue_command\"Y\n\x13\x41\x63tionRawCameraMove\x12+\n\x12\x63\x65nter_world_space\x18\x01 \x01(\x0b\x32\n.Api.PointH\x00\x88\x01\x01\x42\x15\n\x13_center_world_space\"T\n\x17\x41\x63tionRawToggleAutocast\x12\x17\n\nability_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\tunit_tags\x18\x02 \x03(\x04\x42\r\n\x0b_ability_id*_\n\x0b\x44isplayType\x12\x18\n\x14\x45numDisplayTypeUnset\x10\x00\x12\x0b\n\x07Visible\x10\x01\x12\x0c\n\x08Snapshot\x10\x02\x12\n\n\x06Hidden\x10\x03\x12\x0f\n\x0bPlaceholder\x10\x04*M\n\x08\x41lliance\x12\x15\n\x11\x45numAllianceUnset\x10\x00\x12\x08\n\x04Self\x10\x01\x12\x08\n\x04\x41lly\x10\x02\x12\x0b\n\x07Neutral\x10\x03\x12\t\n\x05\x45nemy\x10\x04*e\n\nCloakState\x12\x12\n\x0e\x43loakedUnknown\x10\x00\x12\x0b\n\x07\x43loaked\x10\x01\x12\x13\n\x0f\x43loakedDetected\x10\x02\x12\x0e\n\nNotCloaked\x10\x03\x12\x11\n\rCloakedAllied\x10\x04\x62\x06proto3"
11
11
 
12
12
  pool = Google::Protobuf::DescriptorPool.generated_pool
13
-
14
- begin
15
- pool.add_serialized_file(descriptor_data)
16
- rescue TypeError
17
- # Compatibility code: will be removed in the next major version.
18
- require 'google/protobuf/descriptor_pb'
19
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
- parsed.clear_dependency
21
- serialized = parsed.class.encode(parsed)
22
- file = pool.add_serialized_file(serialized)
23
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
- imports = [
25
- ["Api.Size2DI", "sc2ai/protocol/common.proto"],
26
- ]
27
- imports.each do |type_name, expected_filename|
28
- import_file = pool.lookup(type_name).file_descriptor
29
- if import_file.name != expected_filename
30
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
- end
32
- end
33
- warn "Each proto file must use a consistent fully-qualified name."
34
- warn "This will become an error in the next major version."
35
- end
13
+ pool.add_serialized_file(descriptor_data)
36
14
 
37
15
  module Api
38
16
  StartRaw = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.StartRaw").msgclass
@@ -15,39 +15,10 @@ require 'sc2ai/protocol/spatial_pb'
15
15
  require 'sc2ai/protocol/ui_pb'
16
16
 
17
17
 
18
- descriptor_data = "\n\x1bsc2ai/protocol/sc2api.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\x1a\x19sc2ai/protocol/data.proto\x1a\x1asc2ai/protocol/debug.proto\x1a\x1asc2ai/protocol/error.proto\x1a\x1asc2ai/protocol/query.proto\x1a\x18sc2ai/protocol/raw.proto\x1a\x1asc2ai/protocol/score.proto\x1a\x1csc2ai/protocol/spatial.proto\x1a\x17sc2ai/protocol/ui.proto\"\xd1\x07\n\x07Request\x12-\n\x0b\x63reate_game\x18\x01 \x01(\x0b\x32\x16.Api.RequestCreateGameH\x00\x12)\n\tjoin_game\x18\x02 \x01(\x0b\x32\x14.Api.RequestJoinGameH\x00\x12/\n\x0crestart_game\x18\x03 \x01(\x0b\x32\x17.Api.RequestRestartGameH\x00\x12/\n\x0cstart_replay\x18\x04 \x01(\x0b\x32\x17.Api.RequestStartReplayH\x00\x12+\n\nleave_game\x18\x05 \x01(\x0b\x32\x15.Api.RequestLeaveGameH\x00\x12+\n\nquick_save\x18\x06 \x01(\x0b\x32\x15.Api.RequestQuickSaveH\x00\x12+\n\nquick_load\x18\x07 \x01(\x0b\x32\x15.Api.RequestQuickLoadH\x00\x12 \n\x04quit\x18\x08 \x01(\x0b\x32\x10.Api.RequestQuitH\x00\x12)\n\tgame_info\x18\t \x01(\x0b\x32\x14.Api.RequestGameInfoH\x00\x12.\n\x0bobservation\x18\n \x01(\x0b\x32\x17.Api.RequestObservationH\x00\x12$\n\x06\x61\x63tion\x18\x0b \x01(\x0b\x32\x12.Api.RequestActionH\x00\x12\x30\n\nobs_action\x18\x15 \x01(\x0b\x32\x1a.Api.RequestObserverActionH\x00\x12 \n\x04step\x18\x0c \x01(\x0b\x32\x10.Api.RequestStepH\x00\x12 \n\x04\x64\x61ta\x18\r \x01(\x0b\x32\x10.Api.RequestDataH\x00\x12\"\n\x05query\x18\x0e \x01(\x0b\x32\x11.Api.RequestQueryH\x00\x12-\n\x0bsave_replay\x18\x0f \x01(\x0b\x32\x16.Api.RequestSaveReplayH\x00\x12-\n\x0bmap_command\x18\x16 \x01(\x0b\x32\x16.Api.RequestMapCommandH\x00\x12-\n\x0breplay_info\x18\x10 \x01(\x0b\x32\x16.Api.RequestReplayInfoH\x00\x12\x33\n\x0e\x61vailable_maps\x18\x11 \x01(\x0b\x32\x19.Api.RequestAvailableMapsH\x00\x12\'\n\x08save_map\x18\x12 \x01(\x0b\x32\x13.Api.RequestSaveMapH\x00\x12 \n\x04ping\x18\x13 \x01(\x0b\x32\x10.Api.RequestPingH\x00\x12\"\n\x05\x64\x65\x62ug\x18\x14 \x01(\x0b\x32\x11.Api.RequestDebugH\x00\x12\n\n\x02id\x18\x61 \x01(\rB\t\n\x07request\"\x95\x08\n\x08Response\x12.\n\x0b\x63reate_game\x18\x01 \x01(\x0b\x32\x17.Api.ResponseCreateGameH\x00\x12*\n\tjoin_game\x18\x02 \x01(\x0b\x32\x15.Api.ResponseJoinGameH\x00\x12\x30\n\x0crestart_game\x18\x03 \x01(\x0b\x32\x18.Api.ResponseRestartGameH\x00\x12\x30\n\x0cstart_replay\x18\x04 \x01(\x0b\x32\x18.Api.ResponseStartReplayH\x00\x12,\n\nleave_game\x18\x05 \x01(\x0b\x32\x16.Api.ResponseLeaveGameH\x00\x12,\n\nquick_save\x18\x06 \x01(\x0b\x32\x16.Api.ResponseQuickSaveH\x00\x12,\n\nquick_load\x18\x07 \x01(\x0b\x32\x16.Api.ResponseQuickLoadH\x00\x12!\n\x04quit\x18\x08 \x01(\x0b\x32\x11.Api.ResponseQuitH\x00\x12*\n\tgame_info\x18\t \x01(\x0b\x32\x15.Api.ResponseGameInfoH\x00\x12/\n\x0bobservation\x18\n \x01(\x0b\x32\x18.Api.ResponseObservationH\x00\x12%\n\x06\x61\x63tion\x18\x0b \x01(\x0b\x32\x13.Api.ResponseActionH\x00\x12\x31\n\nobs_action\x18\x15 \x01(\x0b\x32\x1b.Api.ResponseObserverActionH\x00\x12!\n\x04step\x18\x0c \x01(\x0b\x32\x11.Api.ResponseStepH\x00\x12!\n\x04\x64\x61ta\x18\r \x01(\x0b\x32\x11.Api.ResponseDataH\x00\x12#\n\x05query\x18\x0e \x01(\x0b\x32\x12.Api.ResponseQueryH\x00\x12.\n\x0bsave_replay\x18\x0f \x01(\x0b\x32\x17.Api.ResponseSaveReplayH\x00\x12.\n\x0breplay_info\x18\x10 \x01(\x0b\x32\x17.Api.ResponseReplayInfoH\x00\x12\x34\n\x0e\x61vailable_maps\x18\x11 \x01(\x0b\x32\x1a.Api.ResponseAvailableMapsH\x00\x12(\n\x08save_map\x18\x12 \x01(\x0b\x32\x14.Api.ResponseSaveMapH\x00\x12.\n\x0bmap_command\x18\x16 \x01(\x0b\x32\x17.Api.ResponseMapCommandH\x00\x12!\n\x04ping\x18\x13 \x01(\x0b\x32\x11.Api.ResponsePingH\x00\x12#\n\x05\x64\x65\x62ug\x18\x14 \x01(\x0b\x32\x12.Api.ResponseDebugH\x00\x12\n\n\x02id\x18\x61 \x01(\r\x12\r\n\x05\x65rror\x18\x62 \x03(\t\x12\x1b\n\x06status\x18\x63 \x01(\x0e\x32\x0b.Api.StatusB\n\n\x08response\"\xc0\x01\n\x11RequestCreateGame\x12\"\n\tlocal_map\x18\x01 \x01(\x0b\x32\r.Api.LocalMapH\x00\x12\x1c\n\x12\x62\x61ttlenet_map_name\x18\x02 \x01(\tH\x00\x12&\n\x0cplayer_setup\x18\x03 \x03(\x0b\x32\x10.Api.PlayerSetup\x12\x13\n\x0b\x64isable_fog\x18\x04 \x01(\x08\x12\x13\n\x0brandom_seed\x18\x05 \x01(\r\x12\x10\n\x08realtime\x18\x06 \x01(\x08\x42\x05\n\x03Map\".\n\x08LocalMap\x12\x10\n\x08map_path\x18\x01 \x01(\t\x12\x10\n\x08map_data\x18\x07 \x01(\x0c\"\x91\x02\n\x12ResponseCreateGame\x12,\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1d.Api.ResponseCreateGame.Error\x12\x15\n\rerror_details\x18\x02 \x01(\t\"\xb5\x01\n\x05\x45rror\x12\x0e\n\nMissingMap\x10\x01\x12\x12\n\x0eInvalidMapPath\x10\x02\x12\x12\n\x0eInvalidMapData\x10\x03\x12\x12\n\x0eInvalidMapName\x10\x04\x12\x14\n\x10InvalidMapHandle\x10\x05\x12\x16\n\x12MissingPlayerSetup\x10\x06\x12\x16\n\x12InvalidPlayerSetup\x10\x07\x12\x1a\n\x16MultiplayerUnsupported\x10\x08\"\x86\x02\n\x0fRequestJoinGame\x12\x19\n\x04race\x18\x01 \x01(\x0e\x32\t.Api.RaceH\x00\x12\x1c\n\x12observed_player_id\x18\x02 \x01(\rH\x00\x12&\n\x07options\x18\x03 \x01(\x0b\x32\x15.Api.InterfaceOptions\x12\"\n\x0cserver_ports\x18\x04 \x01(\x0b\x32\x0c.Api.PortSet\x12\"\n\x0c\x63lient_ports\x18\x05 \x03(\x0b\x32\x0c.Api.PortSet\x12\x13\n\x0bshared_port\x18\x06 \x01(\x05\x12\x13\n\x0bplayer_name\x18\x07 \x01(\t\x12\x0f\n\x07host_ip\x18\x08 \x01(\tB\x0f\n\rparticipation\"/\n\x07PortSet\x12\x11\n\tgame_port\x18\x01 \x01(\x05\x12\x11\n\tbase_port\x18\x02 \x01(\x05\"\xf7\x02\n\x10ResponseJoinGame\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12*\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x1b.Api.ResponseJoinGame.Error\x12\x15\n\rerror_details\x18\x03 \x01(\t\"\x8c\x02\n\x05\x45rror\x12\x18\n\x14MissingParticipation\x10\x01\x12\x1b\n\x17InvalidObservedPlayerId\x10\x02\x12\x12\n\x0eMissingOptions\x10\x03\x12\x10\n\x0cMissingPorts\x10\x04\x12\x0c\n\x08GameFull\x10\x05\x12\x0f\n\x0bLaunchError\x10\x06\x12\x16\n\x12\x46\x65\x61tureUnsupported\x10\x07\x12\x12\n\x0eNoSpaceForUser\x10\x08\x12\x13\n\x0fMapDoesNotExist\x10\t\x12\x11\n\rCannotOpenMap\x10\n\x12\x11\n\rChecksumError\x10\x0b\x12\x10\n\x0cNetworkError\x10\x0c\x12\x0e\n\nOtherError\x10\r\"\x14\n\x12RequestRestartGame\"\x8e\x01\n\x13ResponseRestartGame\x12-\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1e.Api.ResponseRestartGame.Error\x12\x15\n\rerror_details\x18\x02 \x01(\t\x12\x17\n\x0fneed_hard_reset\x18\x03 \x01(\x08\"\x18\n\x05\x45rror\x12\x0f\n\x0bLaunchError\x10\x01\"\xe0\x01\n\x12RequestStartReplay\x12\x15\n\x0breplay_path\x18\x01 \x01(\tH\x00\x12\x15\n\x0breplay_data\x18\x05 \x01(\x0cH\x00\x12\x10\n\x08map_data\x18\x06 \x01(\x0c\x12\x1a\n\x12observed_player_id\x18\x02 \x01(\x05\x12&\n\x07options\x18\x03 \x01(\x0b\x32\x15.Api.InterfaceOptions\x12\x13\n\x0b\x64isable_fog\x18\x04 \x01(\x08\x12\x10\n\x08realtime\x18\x07 \x01(\x08\x12\x15\n\rrecord_replay\x18\x08 \x01(\x08\x42\x08\n\x06replay\"\xfc\x01\n\x13ResponseStartReplay\x12-\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1e.Api.ResponseStartReplay.Error\x12\x15\n\rerror_details\x18\x02 \x01(\t\"\x9e\x01\n\x05\x45rror\x12\x11\n\rMissingReplay\x10\x01\x12\x15\n\x11InvalidReplayPath\x10\x02\x12\x15\n\x11InvalidReplayData\x10\x03\x12\x12\n\x0eInvalidMapData\x10\x04\x12\x1b\n\x17InvalidObservedPlayerId\x10\x05\x12\x12\n\x0eMissingOptions\x10\x06\x12\x0f\n\x0bLaunchError\x10\x07\"(\n\x11RequestMapCommand\x12\x13\n\x0btrigger_cmd\x18\x01 \x01(\t\"v\n\x12ResponseMapCommand\x12,\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1d.Api.ResponseMapCommand.Error\x12\x15\n\rerror_details\x18\x02 \x01(\t\"\x1b\n\x05\x45rror\x12\x12\n\x0eNoTriggerError\x10\x01\"\x12\n\x10RequestLeaveGame\"\x13\n\x11ResponseLeaveGame\"\x12\n\x10RequestQuickSave\"\x13\n\x11ResponseQuickSave\"\x12\n\x10RequestQuickLoad\"\x13\n\x11ResponseQuickLoad\"\r\n\x0bRequestQuit\"\x0e\n\x0cResponseQuit\"\x11\n\x0fRequestGameInfo\"\xbf\x01\n\x10ResponseGameInfo\x12\x10\n\x08map_name\x18\x01 \x01(\t\x12\x11\n\tmod_names\x18\x06 \x03(\t\x12\x16\n\x0elocal_map_path\x18\x02 \x01(\t\x12$\n\x0bplayer_info\x18\x03 \x03(\x0b\x32\x0f.Api.PlayerInfo\x12 \n\tstart_raw\x18\x04 \x01(\x0b\x32\r.Api.StartRaw\x12&\n\x07options\x18\x05 \x01(\x0b\x32\x15.Api.InterfaceOptions\"<\n\x12RequestObservation\x12\x13\n\x0b\x64isable_fog\x18\x01 \x01(\x08\x12\x11\n\tgame_loop\x18\x02 \x01(\r\"\xce\x01\n\x13ResponseObservation\x12\x1c\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x0b.Api.Action\x12\'\n\raction_errors\x18\x02 \x03(\x0b\x32\x10.Api.ActionError\x12%\n\x0bobservation\x18\x03 \x01(\x0b\x32\x10.Api.Observation\x12(\n\rplayer_result\x18\x04 \x03(\x0b\x32\x11.Api.PlayerResult\x12\x1f\n\x04\x63hat\x18\x05 \x03(\x0b\x32\x11.Api.ChatReceived\"2\n\x0c\x43hatReceived\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\"-\n\rRequestAction\x12\x1c\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x0b.Api.Action\"3\n\x0eResponseAction\x12!\n\x06result\x18\x01 \x03(\x0e\x32\x11.Api.ActionResult\"=\n\x15RequestObserverAction\x12$\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x13.Api.ObserverAction\"\x18\n\x16ResponseObserverAction\"\x1c\n\x0bRequestStep\x12\r\n\x05\x63ount\x18\x01 \x01(\r\"\'\n\x0cResponseStep\x12\x17\n\x0fsimulation_loop\x18\x01 \x01(\r\"o\n\x0bRequestData\x12\x12\n\nability_id\x18\x01 \x01(\x08\x12\x14\n\x0cunit_type_id\x18\x02 \x01(\x08\x12\x12\n\nupgrade_id\x18\x03 \x01(\x08\x12\x0f\n\x07\x62uff_id\x18\x04 \x01(\x08\x12\x11\n\teffect_id\x18\x05 \x01(\x08\"\xb9\x01\n\x0cResponseData\x12#\n\tabilities\x18\x01 \x03(\x0b\x32\x10.Api.AbilityData\x12 \n\x05units\x18\x02 \x03(\x0b\x32\x11.Api.UnitTypeData\x12\"\n\x08upgrades\x18\x03 \x03(\x0b\x32\x10.Api.UpgradeData\x12\x1c\n\x05\x62uffs\x18\x04 \x03(\x0b\x32\r.Api.BuffData\x12 \n\x07\x65\x66\x66\x65\x63ts\x18\x05 \x03(\x0b\x32\x0f.Api.EffectData\"\x13\n\x11RequestSaveReplay\"\"\n\x12ResponseSaveReplay\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"b\n\x11RequestReplayInfo\x12\x15\n\x0breplay_path\x18\x01 \x01(\tH\x00\x12\x15\n\x0breplay_data\x18\x02 \x01(\x0cH\x00\x12\x15\n\rdownload_data\x18\x03 \x01(\x08\x42\x08\n\x06replay\"\x89\x01\n\x0fPlayerInfoExtra\x12$\n\x0bplayer_info\x18\x01 \x01(\x0b\x32\x0f.Api.PlayerInfo\x12(\n\rplayer_result\x18\x02 \x01(\x0b\x32\x11.Api.PlayerResult\x12\x12\n\nplayer_mmr\x18\x03 \x01(\x05\x12\x12\n\nplayer_apm\x18\x04 \x01(\x05\"\xad\x03\n\x12ResponseReplayInfo\x12\x10\n\x08map_name\x18\x01 \x01(\t\x12\x16\n\x0elocal_map_path\x18\x02 \x01(\t\x12)\n\x0bplayer_info\x18\x03 \x03(\x0b\x32\x14.Api.PlayerInfoExtra\x12\x1b\n\x13game_duration_loops\x18\x04 \x01(\r\x12\x1d\n\x15game_duration_seconds\x18\x05 \x01(\x02\x12\x14\n\x0cgame_version\x18\x06 \x01(\t\x12\x14\n\x0c\x64\x61ta_version\x18\x0b \x01(\t\x12\x12\n\ndata_build\x18\x07 \x01(\r\x12\x12\n\nbase_build\x18\x08 \x01(\r\x12,\n\x05\x65rror\x18\t \x01(\x0e\x32\x1d.Api.ResponseReplayInfo.Error\x12\x15\n\rerror_details\x18\n \x01(\t\"m\n\x05\x45rror\x12\x11\n\rMissingReplay\x10\x01\x12\x15\n\x11InvalidReplayPath\x10\x02\x12\x15\n\x11InvalidReplayData\x10\x03\x12\x10\n\x0cParsingError\x10\x04\x12\x11\n\rDownloadError\x10\x05\"\x16\n\x14RequestAvailableMaps\"M\n\x15ResponseAvailableMaps\x12\x17\n\x0flocal_map_paths\x18\x01 \x03(\t\x12\x1b\n\x13\x62\x61ttlenet_map_names\x18\x02 \x03(\t\"4\n\x0eRequestSaveMap\x12\x10\n\x08map_path\x18\x01 \x01(\t\x12\x10\n\x08map_data\x18\x02 \x01(\x0c\"Y\n\x0fResponseSaveMap\x12)\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1a.Api.ResponseSaveMap.Error\"\x1b\n\x05\x45rror\x12\x12\n\x0eInvalidMapData\x10\x01\"\r\n\x0bRequestPing\"b\n\x0cResponsePing\x12\x14\n\x0cgame_version\x18\x01 \x01(\t\x12\x14\n\x0c\x64\x61ta_version\x18\x02 \x01(\t\x12\x12\n\ndata_build\x18\x03 \x01(\r\x12\x12\n\nbase_build\x18\x04 \x01(\r\"0\n\x0cRequestDebug\x12 \n\x05\x64\x65\x62ug\x18\x01 \x03(\x0b\x32\x11.Api.DebugCommand\"\x0f\n\rResponseDebug\"\x9f\x01\n\x0bPlayerSetup\x12\x1d\n\x04type\x18\x01 \x01(\x0e\x32\x0f.Api.PlayerType\x12\x17\n\x04race\x18\x02 \x01(\x0e\x32\t.Api.Race\x12#\n\ndifficulty\x18\x03 \x01(\x0e\x32\x0f.Api.Difficulty\x12\x13\n\x0bplayer_name\x18\x04 \x01(\t\x12\x1e\n\x08\x61i_build\x18\x05 \x01(\x0e\x32\x0c.Api.AIBuild\"\xad\x01\n\x12SpatialCameraSetup\x12 \n\nresolution\x18\x02 \x01(\x0b\x32\x0c.Api.Size2DI\x12(\n\x12minimap_resolution\x18\x03 \x01(\x0b\x32\x0c.Api.Size2DI\x12\r\n\x05width\x18\x01 \x01(\x02\x12\x1d\n\x15\x63rop_to_playable_area\x18\x04 \x01(\x08\x12\x1d\n\x15\x61llow_cheating_layers\x18\x05 \x01(\x08\"\x99\x02\n\x10InterfaceOptions\x12\x0b\n\x03raw\x18\x01 \x01(\x08\x12\r\n\x05score\x18\x02 \x01(\x08\x12.\n\rfeature_layer\x18\x03 \x01(\x0b\x32\x17.Api.SpatialCameraSetup\x12\'\n\x06render\x18\x04 \x01(\x0b\x32\x17.Api.SpatialCameraSetup\x12\x14\n\x0cshow_cloaked\x18\x05 \x01(\x08\x12\x1d\n\x15show_burrowed_shadows\x18\t \x01(\x08\x12\x19\n\x11show_placeholders\x18\x08 \x01(\x08\x12\x1d\n\x15raw_affects_selection\x18\x06 \x01(\x08\x12!\n\x19raw_crop_to_playable_area\x18\x07 \x01(\x08\"\xdb\x01\n\nPlayerInfo\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12\x1d\n\x04type\x18\x02 \x01(\x0e\x32\x0f.Api.PlayerType\x12!\n\x0erace_requested\x18\x03 \x01(\x0e\x32\t.Api.Race\x12\x1e\n\x0brace_actual\x18\x04 \x01(\x0e\x32\t.Api.Race\x12#\n\ndifficulty\x18\x05 \x01(\x0e\x32\x0f.Api.Difficulty\x12\x1e\n\x08\x61i_build\x18\x07 \x01(\x0e\x32\x0c.Api.AIBuild\x12\x13\n\x0bplayer_name\x18\x06 \x01(\t\"\xef\x01\n\x0cPlayerCommon\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12\x10\n\x08minerals\x18\x02 \x01(\r\x12\x0f\n\x07vespene\x18\x03 \x01(\r\x12\x10\n\x08\x66ood_cap\x18\x04 \x01(\r\x12\x11\n\tfood_used\x18\x05 \x01(\r\x12\x11\n\tfood_army\x18\x06 \x01(\r\x12\x14\n\x0c\x66ood_workers\x18\x07 \x01(\r\x12\x19\n\x11idle_worker_count\x18\x08 \x01(\r\x12\x12\n\narmy_count\x18\t \x01(\r\x12\x17\n\x0fwarp_gate_count\x18\n \x01(\r\x12\x13\n\x0blarva_count\x18\x0b \x01(\r\"\xde\x02\n\x0bObservation\x12\x11\n\tgame_loop\x18\t \x01(\r\x12(\n\rplayer_common\x18\x01 \x01(\x0b\x32\x11.Api.PlayerCommon\x12\x1a\n\x06\x61lerts\x18\n \x03(\x0e\x32\n.Api.Alert\x12(\n\tabilities\x18\x03 \x03(\x0b\x32\x15.Api.AvailableAbility\x12\x19\n\x05score\x18\x04 \x01(\x0b\x32\n.Api.Score\x12%\n\x08raw_data\x18\x05 \x01(\x0b\x32\x13.Api.ObservationRaw\x12\x38\n\x12\x66\x65\x61ture_layer_data\x18\x06 \x01(\x0b\x32\x1c.Api.ObservationFeatureLayer\x12+\n\x0brender_data\x18\x07 \x01(\x0b\x32\x16.Api.ObservationRender\x12#\n\x07ui_data\x18\x08 \x01(\x0b\x32\x12.Api.ObservationUI\"\xe4\x01\n\x06\x41\x63tion\x12\"\n\naction_raw\x18\x01 \x01(\x0b\x32\x0e.Api.ActionRaw\x12\x30\n\x14\x61\x63tion_feature_layer\x18\x02 \x01(\x0b\x32\x12.Api.ActionSpatial\x12)\n\raction_render\x18\x03 \x01(\x0b\x32\x12.Api.ActionSpatial\x12 \n\taction_ui\x18\x04 \x01(\x0b\x32\r.Api.ActionUI\x12$\n\x0b\x61\x63tion_chat\x18\x06 \x01(\x0b\x32\x0f.Api.ActionChat\x12\x11\n\tgame_loop\x18\x07 \x01(\r\"k\n\nActionChat\x12(\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x17.Api.ActionChat.Channel\x12\x0f\n\x07message\x18\x02 \x01(\t\"\"\n\x07\x43hannel\x12\r\n\tBroadcast\x10\x01\x12\x08\n\x04Team\x10\x02\"V\n\x0b\x41\x63tionError\x12\x10\n\x08unit_tag\x18\x01 \x01(\x04\x12\x12\n\nability_id\x18\x02 \x01(\x04\x12!\n\x06result\x18\x03 \x01(\x0e\x32\x11.Api.ActionResult\"\xa0\x02\n\x0eObserverAction\x12\x42\n\x12player_perspective\x18\x01 \x01(\x0b\x32$.Api.ActionObserverPlayerPerspectiveH\x00\x12\x34\n\x0b\x63\x61mera_move\x18\x02 \x01(\x0b\x32\x1d.Api.ActionObserverCameraMoveH\x00\x12\x45\n\x14\x63\x61mera_follow_player\x18\x03 \x01(\x0b\x32%.Api.ActionObserverCameraFollowPlayerH\x00\x12\x43\n\x13\x63\x61mera_follow_units\x18\x04 \x01(\x0b\x32$.Api.ActionObserverCameraFollowUnitsH\x00\x42\x08\n\x06\x61\x63tion\"4\n\x1f\x41\x63tionObserverPlayerPerspective\x12\x11\n\tplayer_id\x18\x01 \x01(\r\"M\n\x18\x41\x63tionObserverCameraMove\x12\x1f\n\tworld_pos\x18\x01 \x01(\x0b\x32\x0c.Api.Point2D\x12\x10\n\x08\x64istance\x18\x02 \x01(\x02\"5\n ActionObserverCameraFollowPlayer\x12\x11\n\tplayer_id\x18\x01 \x01(\r\"4\n\x1f\x41\x63tionObserverCameraFollowUnits\x12\x11\n\tunit_tags\x18\x01 \x03(\x04\">\n\x0cPlayerResult\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12\x1b\n\x06result\x18\x02 \x01(\x0e\x32\x0b.Api.Result*c\n\x06Status\x12\x0c\n\x08launched\x10\x01\x12\r\n\tinit_game\x10\x02\x12\x0b\n\x07in_game\x10\x03\x12\r\n\tin_replay\x10\x04\x12\t\n\x05\x65nded\x10\x05\x12\x08\n\x04quit\x10\x06\x12\x0b\n\x07unknown\x10\x63*\x96\x01\n\nDifficulty\x12\x0c\n\x08VeryEasy\x10\x01\x12\x08\n\x04\x45\x61sy\x10\x02\x12\n\n\x06Medium\x10\x03\x12\x0e\n\nMediumHard\x10\x04\x12\x08\n\x04Hard\x10\x05\x12\n\n\x06Harder\x10\x06\x12\x0c\n\x08VeryHard\x10\x07\x12\x0f\n\x0b\x43heatVision\x10\x08\x12\x0e\n\nCheatMoney\x10\t\x12\x0f\n\x0b\x43heatInsane\x10\n*9\n\nPlayerType\x12\x0f\n\x0bParticipant\x10\x01\x12\x0c\n\x08\x43omputer\x10\x02\x12\x0c\n\x08Observer\x10\x03*O\n\x07\x41IBuild\x12\x0f\n\x0bRandomBuild\x10\x01\x12\x08\n\x04Rush\x10\x02\x12\n\n\x06Timing\x10\x03\x12\t\n\x05Power\x10\x04\x12\t\n\x05Macro\x10\x05\x12\x07\n\x03\x41ir\x10\x06*\xdb\x03\n\x05\x41lert\x12\x0e\n\nAlertError\x10\x03\x12\x11\n\rAddOnComplete\x10\x04\x12\x14\n\x10\x42uildingComplete\x10\x05\x12\x17\n\x13\x42uildingUnderAttack\x10\x06\x12\x10\n\x0cLarvaHatched\x10\x07\x12\x11\n\rMergeComplete\x10\x08\x12\x15\n\x11MineralsExhausted\x10\t\x12\x11\n\rMorphComplete\x10\n\x12\x16\n\x12MothershipComplete\x10\x0b\x12\x0f\n\x0bMULEExpired\x10\x0c\x12\x19\n\x15NuclearLaunchDetected\x10\x01\x12\x10\n\x0cNukeComplete\x10\r\x12\x15\n\x11NydusWormDetected\x10\x02\x12\x14\n\x10ResearchComplete\x10\x0e\x12\x0e\n\nTrainError\x10\x0f\x12\x15\n\x11TrainUnitComplete\x10\x10\x12\x17\n\x13TrainWorkerComplete\x10\x11\x12\x1a\n\x16TransformationComplete\x10\x12\x12\x13\n\x0fUnitUnderAttack\x10\x13\x12\x13\n\x0fUpgradeComplete\x10\x14\x12\x14\n\x10VespeneExhausted\x10\x15\x12\x12\n\x0eWarpInComplete\x10\x16*9\n\x06Result\x12\x0b\n\x07Victory\x10\x01\x12\n\n\x06\x44\x65\x66\x65\x61t\x10\x02\x12\x07\n\x03Tie\x10\x03\x12\r\n\tUndecided\x10\x04"
18
+ descriptor_data = "\n\x1bsc2ai/protocol/sc2api.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\x1a\x19sc2ai/protocol/data.proto\x1a\x1asc2ai/protocol/debug.proto\x1a\x1asc2ai/protocol/error.proto\x1a\x1asc2ai/protocol/query.proto\x1a\x18sc2ai/protocol/raw.proto\x1a\x1asc2ai/protocol/score.proto\x1a\x1csc2ai/protocol/spatial.proto\x1a\x17sc2ai/protocol/ui.proto\"\xdd\x07\n\x07Request\x12-\n\x0b\x63reate_game\x18\x01 \x01(\x0b\x32\x16.Api.RequestCreateGameH\x00\x12)\n\tjoin_game\x18\x02 \x01(\x0b\x32\x14.Api.RequestJoinGameH\x00\x12/\n\x0crestart_game\x18\x03 \x01(\x0b\x32\x17.Api.RequestRestartGameH\x00\x12/\n\x0cstart_replay\x18\x04 \x01(\x0b\x32\x17.Api.RequestStartReplayH\x00\x12+\n\nleave_game\x18\x05 \x01(\x0b\x32\x15.Api.RequestLeaveGameH\x00\x12+\n\nquick_save\x18\x06 \x01(\x0b\x32\x15.Api.RequestQuickSaveH\x00\x12+\n\nquick_load\x18\x07 \x01(\x0b\x32\x15.Api.RequestQuickLoadH\x00\x12 \n\x04quit\x18\x08 \x01(\x0b\x32\x10.Api.RequestQuitH\x00\x12)\n\tgame_info\x18\t \x01(\x0b\x32\x14.Api.RequestGameInfoH\x00\x12.\n\x0bobservation\x18\n \x01(\x0b\x32\x17.Api.RequestObservationH\x00\x12$\n\x06\x61\x63tion\x18\x0b \x01(\x0b\x32\x12.Api.RequestActionH\x00\x12\x30\n\nobs_action\x18\x15 \x01(\x0b\x32\x1a.Api.RequestObserverActionH\x00\x12 \n\x04step\x18\x0c \x01(\x0b\x32\x10.Api.RequestStepH\x00\x12 \n\x04\x64\x61ta\x18\r \x01(\x0b\x32\x10.Api.RequestDataH\x00\x12\"\n\x05query\x18\x0e \x01(\x0b\x32\x11.Api.RequestQueryH\x00\x12-\n\x0bsave_replay\x18\x0f \x01(\x0b\x32\x16.Api.RequestSaveReplayH\x00\x12-\n\x0bmap_command\x18\x16 \x01(\x0b\x32\x16.Api.RequestMapCommandH\x00\x12-\n\x0breplay_info\x18\x10 \x01(\x0b\x32\x16.Api.RequestReplayInfoH\x00\x12\x33\n\x0e\x61vailable_maps\x18\x11 \x01(\x0b\x32\x19.Api.RequestAvailableMapsH\x00\x12\'\n\x08save_map\x18\x12 \x01(\x0b\x32\x13.Api.RequestSaveMapH\x00\x12 \n\x04ping\x18\x13 \x01(\x0b\x32\x10.Api.RequestPingH\x00\x12\"\n\x05\x64\x65\x62ug\x18\x14 \x01(\x0b\x32\x11.Api.RequestDebugH\x00\x12\x0f\n\x02id\x18\x61 \x01(\rH\x01\x88\x01\x01\x42\t\n\x07requestB\x05\n\x03_id\"\xb1\x08\n\x08Response\x12.\n\x0b\x63reate_game\x18\x01 \x01(\x0b\x32\x17.Api.ResponseCreateGameH\x00\x12*\n\tjoin_game\x18\x02 \x01(\x0b\x32\x15.Api.ResponseJoinGameH\x00\x12\x30\n\x0crestart_game\x18\x03 \x01(\x0b\x32\x18.Api.ResponseRestartGameH\x00\x12\x30\n\x0cstart_replay\x18\x04 \x01(\x0b\x32\x18.Api.ResponseStartReplayH\x00\x12,\n\nleave_game\x18\x05 \x01(\x0b\x32\x16.Api.ResponseLeaveGameH\x00\x12,\n\nquick_save\x18\x06 \x01(\x0b\x32\x16.Api.ResponseQuickSaveH\x00\x12,\n\nquick_load\x18\x07 \x01(\x0b\x32\x16.Api.ResponseQuickLoadH\x00\x12!\n\x04quit\x18\x08 \x01(\x0b\x32\x11.Api.ResponseQuitH\x00\x12*\n\tgame_info\x18\t \x01(\x0b\x32\x15.Api.ResponseGameInfoH\x00\x12/\n\x0bobservation\x18\n \x01(\x0b\x32\x18.Api.ResponseObservationH\x00\x12%\n\x06\x61\x63tion\x18\x0b \x01(\x0b\x32\x13.Api.ResponseActionH\x00\x12\x31\n\nobs_action\x18\x15 \x01(\x0b\x32\x1b.Api.ResponseObserverActionH\x00\x12!\n\x04step\x18\x0c \x01(\x0b\x32\x11.Api.ResponseStepH\x00\x12!\n\x04\x64\x61ta\x18\r \x01(\x0b\x32\x11.Api.ResponseDataH\x00\x12#\n\x05query\x18\x0e \x01(\x0b\x32\x12.Api.ResponseQueryH\x00\x12.\n\x0bsave_replay\x18\x0f \x01(\x0b\x32\x17.Api.ResponseSaveReplayH\x00\x12.\n\x0breplay_info\x18\x10 \x01(\x0b\x32\x17.Api.ResponseReplayInfoH\x00\x12\x34\n\x0e\x61vailable_maps\x18\x11 \x01(\x0b\x32\x1a.Api.ResponseAvailableMapsH\x00\x12(\n\x08save_map\x18\x12 \x01(\x0b\x32\x14.Api.ResponseSaveMapH\x00\x12.\n\x0bmap_command\x18\x16 \x01(\x0b\x32\x17.Api.ResponseMapCommandH\x00\x12!\n\x04ping\x18\x13 \x01(\x0b\x32\x11.Api.ResponsePingH\x00\x12#\n\x05\x64\x65\x62ug\x18\x14 \x01(\x0b\x32\x12.Api.ResponseDebugH\x00\x12\x0f\n\x02id\x18\x61 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05\x65rror\x18\x62 \x03(\t\x12 \n\x06status\x18\x63 \x01(\x0e\x32\x0b.Api.StatusH\x02\x88\x01\x01\x42\n\n\x08responseB\x05\n\x03_idB\t\n\x07_status\"\xfc\x01\n\x11RequestCreateGame\x12\"\n\tlocal_map\x18\x01 \x01(\x0b\x32\r.Api.LocalMapH\x00\x12\x1c\n\x12\x62\x61ttlenet_map_name\x18\x02 \x01(\tH\x00\x12&\n\x0cplayer_setup\x18\x03 \x03(\x0b\x32\x10.Api.PlayerSetup\x12\x18\n\x0b\x64isable_fog\x18\x04 \x01(\x08H\x01\x88\x01\x01\x12\x18\n\x0brandom_seed\x18\x05 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x08realtime\x18\x06 \x01(\x08H\x03\x88\x01\x01\x42\x05\n\x03MapB\x0e\n\x0c_disable_fogB\x0e\n\x0c_random_seedB\x0b\n\t_realtime\"R\n\x08LocalMap\x12\x15\n\x08map_path\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08map_data\x18\x07 \x01(\x0cH\x01\x88\x01\x01\x42\x0b\n\t_map_pathB\x0b\n\t_map_data\"\xdd\x02\n\x12ResponseCreateGame\x12\x31\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1d.Api.ResponseCreateGame.ErrorH\x00\x88\x01\x01\x12\x1a\n\rerror_details\x18\x02 \x01(\tH\x01\x88\x01\x01\"\xdb\x01\n\x05\x45rror\x12$\n EnumResponseCreateGameErrorUnset\x10\x00\x12\x0e\n\nMissingMap\x10\x01\x12\x12\n\x0eInvalidMapPath\x10\x02\x12\x12\n\x0eInvalidMapData\x10\x03\x12\x12\n\x0eInvalidMapName\x10\x04\x12\x14\n\x10InvalidMapHandle\x10\x05\x12\x16\n\x12MissingPlayerSetup\x10\x06\x12\x16\n\x12InvalidPlayerSetup\x10\x07\x12\x1a\n\x16MultiplayerUnsupported\x10\x08\x42\x08\n\x06_errorB\x10\n\x0e_error_details\"\xe8\x02\n\x0fRequestJoinGame\x12\x19\n\x04race\x18\x01 \x01(\x0e\x32\t.Api.RaceH\x00\x12\x1c\n\x12observed_player_id\x18\x02 \x01(\rH\x00\x12+\n\x07options\x18\x03 \x01(\x0b\x32\x15.Api.InterfaceOptionsH\x01\x88\x01\x01\x12\'\n\x0cserver_ports\x18\x04 \x01(\x0b\x32\x0c.Api.PortSetH\x02\x88\x01\x01\x12\"\n\x0c\x63lient_ports\x18\x05 \x03(\x0b\x32\x0c.Api.PortSet\x12\x18\n\x0bshared_port\x18\x06 \x01(\x05H\x03\x88\x01\x01\x12\x18\n\x0bplayer_name\x18\x07 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x07host_ip\x18\x08 \x01(\tH\x05\x88\x01\x01\x42\x0f\n\rparticipationB\n\n\x08_optionsB\x0f\n\r_server_portsB\x0e\n\x0c_shared_portB\x0e\n\x0c_player_nameB\n\n\x08_host_ip\"U\n\x07PortSet\x12\x16\n\tgame_port\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x16\n\tbase_port\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\x0c\n\n_game_portB\x0c\n\n_base_port\"\xd4\x03\n\x10ResponseJoinGame\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12/\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x1b.Api.ResponseJoinGame.ErrorH\x01\x88\x01\x01\x12\x1a\n\rerror_details\x18\x03 \x01(\tH\x02\x88\x01\x01\"\xb0\x02\n\x05\x45rror\x12\"\n\x1e\x45numResponseJoinGameErrorUnset\x10\x00\x12\x18\n\x14MissingParticipation\x10\x01\x12\x1b\n\x17InvalidObservedPlayerId\x10\x02\x12\x12\n\x0eMissingOptions\x10\x03\x12\x10\n\x0cMissingPorts\x10\x04\x12\x0c\n\x08GameFull\x10\x05\x12\x0f\n\x0bLaunchError\x10\x06\x12\x16\n\x12\x46\x65\x61tureUnsupported\x10\x07\x12\x12\n\x0eNoSpaceForUser\x10\x08\x12\x13\n\x0fMapDoesNotExist\x10\t\x12\x11\n\rCannotOpenMap\x10\n\x12\x11\n\rChecksumError\x10\x0b\x12\x10\n\x0cNetworkError\x10\x0c\x12\x0e\n\nOtherError\x10\rB\x0c\n\n_player_idB\x08\n\x06_errorB\x10\n\x0e_error_details\"\x14\n\x12RequestRestartGame\"\xf4\x01\n\x13ResponseRestartGame\x12\x32\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1e.Api.ResponseRestartGame.ErrorH\x00\x88\x01\x01\x12\x1a\n\rerror_details\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fneed_hard_reset\x18\x03 \x01(\x08H\x02\x88\x01\x01\"?\n\x05\x45rror\x12%\n!EnumResponseRestartGameErrorUnset\x10\x00\x12\x0f\n\x0bLaunchError\x10\x01\x42\x08\n\x06_errorB\x10\n\x0e_error_detailsB\x12\n\x10_need_hard_reset\"\xdd\x02\n\x12RequestStartReplay\x12\x15\n\x0breplay_path\x18\x01 \x01(\tH\x00\x12\x15\n\x0breplay_data\x18\x05 \x01(\x0cH\x00\x12\x15\n\x08map_data\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12\x1f\n\x12observed_player_id\x18\x02 \x01(\x05H\x02\x88\x01\x01\x12+\n\x07options\x18\x03 \x01(\x0b\x32\x15.Api.InterfaceOptionsH\x03\x88\x01\x01\x12\x18\n\x0b\x64isable_fog\x18\x04 \x01(\x08H\x04\x88\x01\x01\x12\x15\n\x08realtime\x18\x07 \x01(\x08H\x05\x88\x01\x01\x12\x1a\n\rrecord_replay\x18\x08 \x01(\x08H\x06\x88\x01\x01\x42\x08\n\x06replayB\x0b\n\t_map_dataB\x15\n\x13_observed_player_idB\n\n\x08_optionsB\x0e\n\x0c_disable_fogB\x0b\n\t_realtimeB\x10\n\x0e_record_replay\"\xc9\x02\n\x13ResponseStartReplay\x12\x32\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1e.Api.ResponseStartReplay.ErrorH\x00\x88\x01\x01\x12\x1a\n\rerror_details\x18\x02 \x01(\tH\x01\x88\x01\x01\"\xc5\x01\n\x05\x45rror\x12%\n!EnumResponseStartReplayErrorUnset\x10\x00\x12\x11\n\rMissingReplay\x10\x01\x12\x15\n\x11InvalidReplayPath\x10\x02\x12\x15\n\x11InvalidReplayData\x10\x03\x12\x12\n\x0eInvalidMapData\x10\x04\x12\x1b\n\x17InvalidObservedPlayerId\x10\x05\x12\x12\n\x0eMissingOptions\x10\x06\x12\x0f\n\x0bLaunchError\x10\x07\x42\x08\n\x06_errorB\x10\n\x0e_error_details\"=\n\x11RequestMapCommand\x12\x18\n\x0btrigger_cmd\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_trigger_cmd\"\xc2\x01\n\x12ResponseMapCommand\x12\x31\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1d.Api.ResponseMapCommand.ErrorH\x00\x88\x01\x01\x12\x1a\n\rerror_details\x18\x02 \x01(\tH\x01\x88\x01\x01\"A\n\x05\x45rror\x12$\n EnumResponseMapCommandErrorUnset\x10\x00\x12\x12\n\x0eNoTriggerError\x10\x01\x42\x08\n\x06_errorB\x10\n\x0e_error_details\"\x12\n\x10RequestLeaveGame\"\x13\n\x11ResponseLeaveGame\"\x12\n\x10RequestQuickSave\"\x13\n\x11ResponseQuickSave\"\x12\n\x10RequestQuickLoad\"\x13\n\x11ResponseQuickLoad\"\r\n\x0bRequestQuit\"\x0e\n\x0cResponseQuit\"\x11\n\x0fRequestGameInfo\"\x95\x02\n\x10ResponseGameInfo\x12\x15\n\x08map_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0elocal_map_path\x18\x02 \x01(\tH\x01\x88\x01\x01\x12(\n\x0bplayer_info\x18\x03 \x03(\x0b\x32\x0f.Api.PlayerInfoB\x02x\x01\x12%\n\tstart_raw\x18\x04 \x01(\x0b\x32\r.Api.StartRawH\x02\x88\x01\x01\x12/\n\x07options\x18\x05 \x01(\x0b\x32\x15.Api.InterfaceOptionsB\x02x\x01H\x03\x88\x01\x01\x12\x11\n\tmod_names\x18\x06 \x03(\tB\x0b\n\t_map_nameB\x11\n\x0f_local_map_pathB\x0c\n\n_start_rawB\n\n\x08_options\"d\n\x12RequestObservation\x12\x18\n\x0b\x64isable_fog\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x16\n\tgame_loop\x18\x02 \x01(\rH\x01\x88\x01\x01\x42\x0e\n\x0c_disable_fogB\x0c\n\n_game_loop\"\xe7\x01\n\x13ResponseObservation\x12\x1c\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x0b.Api.Action\x12\'\n\raction_errors\x18\x02 \x03(\x0b\x32\x10.Api.ActionError\x12*\n\x0bobservation\x18\x03 \x01(\x0b\x32\x10.Api.ObservationH\x00\x88\x01\x01\x12,\n\rplayer_result\x18\x04 \x03(\x0b\x32\x11.Api.PlayerResultB\x02x\x01\x12\x1f\n\x04\x63hat\x18\x05 \x03(\x0b\x32\x11.Api.ChatReceivedB\x0e\n\x0c_observation\"V\n\x0c\x43hatReceived\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0c\n\n_player_idB\n\n\x08_message\"-\n\rRequestAction\x12\x1c\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x0b.Api.Action\"3\n\x0eResponseAction\x12!\n\x06result\x18\x01 \x03(\x0e\x32\x11.Api.ActionResult\"=\n\x15RequestObserverAction\x12$\n\x07\x61\x63tions\x18\x01 \x03(\x0b\x32\x13.Api.ObserverAction\"\x18\n\x16ResponseObserverAction\"+\n\x0bRequestStep\x12\x12\n\x05\x63ount\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x08\n\x06_count\"@\n\x0cResponseStep\x12\x1c\n\x0fsimulation_loop\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x12\n\x10_simulation_loop\"\xd1\x01\n\x0bRequestData\x12\x17\n\nability_id\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0cunit_type_id\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x17\n\nupgrade_id\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x14\n\x07\x62uff_id\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x16\n\teffect_id\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\r\n\x0b_ability_idB\x0f\n\r_unit_type_idB\r\n\x0b_upgrade_idB\n\n\x08_buff_idB\x0c\n\n_effect_id\"\xb9\x01\n\x0cResponseData\x12#\n\tabilities\x18\x01 \x03(\x0b\x32\x10.Api.AbilityData\x12 \n\x05units\x18\x02 \x03(\x0b\x32\x11.Api.UnitTypeData\x12\"\n\x08upgrades\x18\x03 \x03(\x0b\x32\x10.Api.UpgradeData\x12\x1c\n\x05\x62uffs\x18\x04 \x03(\x0b\x32\r.Api.BuffData\x12 \n\x07\x65\x66\x66\x65\x63ts\x18\x05 \x03(\x0b\x32\x0f.Api.EffectData\"\x13\n\x11RequestSaveReplay\"0\n\x12ResponseSaveReplay\x12\x11\n\x04\x64\x61ta\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x07\n\x05_data\"y\n\x11RequestReplayInfo\x12\x15\n\x0breplay_path\x18\x01 \x01(\tH\x00\x12\x15\n\x0breplay_data\x18\x02 \x01(\x0cH\x00\x12\x1a\n\rdownload_data\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x08\n\x06replayB\x10\n\x0e_download_data\"\xdd\x01\n\x0fPlayerInfoExtra\x12)\n\x0bplayer_info\x18\x01 \x01(\x0b\x32\x0f.Api.PlayerInfoH\x00\x88\x01\x01\x12-\n\rplayer_result\x18\x02 \x01(\x0b\x32\x11.Api.PlayerResultH\x01\x88\x01\x01\x12\x17\n\nplayer_mmr\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x17\n\nplayer_apm\x18\x04 \x01(\x05H\x03\x88\x01\x01\x42\x0e\n\x0c_player_infoB\x10\n\x0e_player_resultB\r\n\x0b_player_mmrB\r\n\x0b_player_apm\"\xb4\x05\n\x12ResponseReplayInfo\x12\x15\n\x08map_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0elocal_map_path\x18\x02 \x01(\tH\x01\x88\x01\x01\x12)\n\x0bplayer_info\x18\x03 \x03(\x0b\x32\x14.Api.PlayerInfoExtra\x12 \n\x13game_duration_loops\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\"\n\x15game_duration_seconds\x18\x05 \x01(\x02H\x03\x88\x01\x01\x12\x19\n\x0cgame_version\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x19\n\x0c\x64\x61ta_version\x18\x0b \x01(\tH\x05\x88\x01\x01\x12\x17\n\ndata_build\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x17\n\nbase_build\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x31\n\x05\x65rror\x18\t \x01(\x0e\x32\x1d.Api.ResponseReplayInfo.ErrorH\x08\x88\x01\x01\x12\x1a\n\rerror_details\x18\n \x01(\tH\t\x88\x01\x01\"\x93\x01\n\x05\x45rror\x12$\n EnumResponseReplayInfoErrorUnset\x10\x00\x12\x11\n\rMissingReplay\x10\x01\x12\x15\n\x11InvalidReplayPath\x10\x02\x12\x15\n\x11InvalidReplayData\x10\x03\x12\x10\n\x0cParsingError\x10\x04\x12\x11\n\rDownloadError\x10\x05\x42\x0b\n\t_map_nameB\x11\n\x0f_local_map_pathB\x16\n\x14_game_duration_loopsB\x18\n\x16_game_duration_secondsB\x0f\n\r_game_versionB\x0f\n\r_data_versionB\r\n\x0b_data_buildB\r\n\x0b_base_buildB\x08\n\x06_errorB\x10\n\x0e_error_details\"\x16\n\x14RequestAvailableMaps\"M\n\x15ResponseAvailableMaps\x12\x17\n\x0flocal_map_paths\x18\x01 \x03(\t\x12\x1b\n\x13\x62\x61ttlenet_map_names\x18\x02 \x03(\t\"X\n\x0eRequestSaveMap\x12\x15\n\x08map_path\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08map_data\x18\x02 \x01(\x0cH\x01\x88\x01\x01\x42\x0b\n\t_map_pathB\x0b\n\t_map_data\"\x8b\x01\n\x0fResponseSaveMap\x12.\n\x05\x65rror\x18\x01 \x01(\x0e\x32\x1a.Api.ResponseSaveMap.ErrorH\x00\x88\x01\x01\">\n\x05\x45rror\x12!\n\x1d\x45numResponseSaveMapErrorUnset\x10\x00\x12\x12\n\x0eInvalidMapData\x10\x01\x42\x08\n\x06_error\"\r\n\x0bRequestPing\"\xb6\x01\n\x0cResponsePing\x12\x19\n\x0cgame_version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x64\x61ta_version\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ndata_build\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x17\n\nbase_build\x18\x04 \x01(\rH\x03\x88\x01\x01\x42\x0f\n\r_game_versionB\x0f\n\r_data_versionB\r\n\x0b_data_buildB\r\n\x0b_base_build\"0\n\x0cRequestDebug\x12 \n\x05\x64\x65\x62ug\x18\x01 \x03(\x0b\x32\x11.Api.DebugCommand\"\x0f\n\rResponseDebug\"\xf6\x01\n\x0bPlayerSetup\x12\"\n\x04type\x18\x01 \x01(\x0e\x32\x0f.Api.PlayerTypeH\x00\x88\x01\x01\x12\x1c\n\x04race\x18\x02 \x01(\x0e\x32\t.Api.RaceH\x01\x88\x01\x01\x12(\n\ndifficulty\x18\x03 \x01(\x0e\x32\x0f.Api.DifficultyH\x02\x88\x01\x01\x12\x18\n\x0bplayer_name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12#\n\x08\x61i_build\x18\x05 \x01(\x0e\x32\x0c.Api.AIBuildH\x04\x88\x01\x01\x42\x07\n\x05_typeB\x07\n\x05_raceB\r\n\x0b_difficultyB\x0e\n\x0c_player_nameB\x0b\n\t_ai_build\"\xaa\x02\n\x12SpatialCameraSetup\x12%\n\nresolution\x18\x02 \x01(\x0b\x32\x0c.Api.Size2DIH\x00\x88\x01\x01\x12-\n\x12minimap_resolution\x18\x03 \x01(\x0b\x32\x0c.Api.Size2DIH\x01\x88\x01\x01\x12\x12\n\x05width\x18\x01 \x01(\x02H\x02\x88\x01\x01\x12\"\n\x15\x63rop_to_playable_area\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\"\n\x15\x61llow_cheating_layers\x18\x05 \x01(\x08H\x04\x88\x01\x01\x42\r\n\x0b_resolutionB\x15\n\x13_minimap_resolutionB\x08\n\x06_widthB\x18\n\x16_crop_to_playable_areaB\x18\n\x16_allow_cheating_layers\"\xee\x03\n\x10InterfaceOptions\x12\x10\n\x03raw\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x05score\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x33\n\rfeature_layer\x18\x03 \x01(\x0b\x32\x17.Api.SpatialCameraSetupH\x02\x88\x01\x01\x12,\n\x06render\x18\x04 \x01(\x0b\x32\x17.Api.SpatialCameraSetupH\x03\x88\x01\x01\x12\x19\n\x0cshow_cloaked\x18\x05 \x01(\x08H\x04\x88\x01\x01\x12\"\n\x15show_burrowed_shadows\x18\t \x01(\x08H\x05\x88\x01\x01\x12\x1e\n\x11show_placeholders\x18\x08 \x01(\x08H\x06\x88\x01\x01\x12\"\n\x15raw_affects_selection\x18\x06 \x01(\x08H\x07\x88\x01\x01\x12&\n\x19raw_crop_to_playable_area\x18\x07 \x01(\x08H\x08\x88\x01\x01\x42\x06\n\x04_rawB\x08\n\x06_scoreB\x10\n\x0e_feature_layerB\t\n\x07_renderB\x0f\n\r_show_cloakedB\x18\n\x16_show_burrowed_shadowsB\x14\n\x12_show_placeholdersB\x18\n\x16_raw_affects_selectionB\x1c\n\x1a_raw_crop_to_playable_area\"\xe4\x02\n\nPlayerInfo\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\"\n\x04type\x18\x02 \x01(\x0e\x32\x0f.Api.PlayerTypeH\x01\x88\x01\x01\x12&\n\x0erace_requested\x18\x03 \x01(\x0e\x32\t.Api.RaceH\x02\x88\x01\x01\x12#\n\x0brace_actual\x18\x04 \x01(\x0e\x32\t.Api.RaceH\x03\x88\x01\x01\x12(\n\ndifficulty\x18\x05 \x01(\x0e\x32\x0f.Api.DifficultyH\x04\x88\x01\x01\x12#\n\x08\x61i_build\x18\x07 \x01(\x0e\x32\x0c.Api.AIBuildH\x05\x88\x01\x01\x12\x18\n\x0bplayer_name\x18\x06 \x01(\tH\x06\x88\x01\x01\x42\x0c\n\n_player_idB\x07\n\x05_typeB\x11\n\x0f_race_requestedB\x0e\n\x0c_race_actualB\r\n\x0b_difficultyB\x0b\n\t_ai_buildB\x0e\n\x0c_player_name\"\xd0\x03\n\x0cPlayerCommon\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08minerals\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x14\n\x07vespene\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x08\x66ood_cap\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x16\n\tfood_used\x18\x05 \x01(\rH\x04\x88\x01\x01\x12\x16\n\tfood_army\x18\x06 \x01(\rH\x05\x88\x01\x01\x12\x19\n\x0c\x66ood_workers\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x1e\n\x11idle_worker_count\x18\x08 \x01(\rH\x07\x88\x01\x01\x12\x17\n\narmy_count\x18\t \x01(\rH\x08\x88\x01\x01\x12\x1c\n\x0fwarp_gate_count\x18\n \x01(\rH\t\x88\x01\x01\x12\x18\n\x0blarva_count\x18\x0b \x01(\rH\n\x88\x01\x01\x42\x0c\n\n_player_idB\x0b\n\t_mineralsB\n\n\x08_vespeneB\x0b\n\t_food_capB\x0c\n\n_food_usedB\x0c\n\n_food_armyB\x0f\n\r_food_workersB\x14\n\x12_idle_worker_countB\r\n\x0b_army_countB\x12\n\x10_warp_gate_countB\x0e\n\x0c_larva_count\"\xf3\x03\n\x0bObservation\x12\x16\n\tgame_loop\x18\t \x01(\rH\x00\x88\x01\x01\x12-\n\rplayer_common\x18\x01 \x01(\x0b\x32\x11.Api.PlayerCommonH\x01\x88\x01\x01\x12\x1a\n\x06\x61lerts\x18\n \x03(\x0e\x32\n.Api.Alert\x12(\n\tabilities\x18\x03 \x03(\x0b\x32\x15.Api.AvailableAbility\x12\"\n\x05score\x18\x04 \x01(\x0b\x32\n.Api.ScoreB\x02x\x01H\x02\x88\x01\x01\x12*\n\x08raw_data\x18\x05 \x01(\x0b\x32\x13.Api.ObservationRawH\x03\x88\x01\x01\x12=\n\x12\x66\x65\x61ture_layer_data\x18\x06 \x01(\x0b\x32\x1c.Api.ObservationFeatureLayerH\x04\x88\x01\x01\x12\x34\n\x0brender_data\x18\x07 \x01(\x0b\x32\x16.Api.ObservationRenderB\x02x\x01H\x05\x88\x01\x01\x12(\n\x07ui_data\x18\x08 \x01(\x0b\x32\x12.Api.ObservationUIH\x06\x88\x01\x01\x42\x0c\n\n_game_loopB\x10\n\x0e_player_commonB\x08\n\x06_scoreB\x0b\n\t_raw_dataB\x15\n\x13_feature_layer_dataB\x0e\n\x0c_render_dataB\n\n\x08_ui_data\"\xe8\x02\n\x06\x41\x63tion\x12\'\n\naction_raw\x18\x01 \x01(\x0b\x32\x0e.Api.ActionRawH\x00\x88\x01\x01\x12\x35\n\x14\x61\x63tion_feature_layer\x18\x02 \x01(\x0b\x32\x12.Api.ActionSpatialH\x01\x88\x01\x01\x12.\n\raction_render\x18\x03 \x01(\x0b\x32\x12.Api.ActionSpatialH\x02\x88\x01\x01\x12%\n\taction_ui\x18\x04 \x01(\x0b\x32\r.Api.ActionUIH\x03\x88\x01\x01\x12)\n\x0b\x61\x63tion_chat\x18\x06 \x01(\x0b\x32\x0f.Api.ActionChatH\x04\x88\x01\x01\x12\x16\n\tgame_loop\x18\x07 \x01(\rH\x05\x88\x01\x01\x42\r\n\x0b_action_rawB\x17\n\x15_action_feature_layerB\x10\n\x0e_action_renderB\x0c\n\n_action_uiB\x0e\n\x0c_action_chatB\x0c\n\n_game_loop\"\xa3\x01\n\nActionChat\x12-\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x17.Api.ActionChat.ChannelH\x00\x88\x01\x01\x12\x14\n\x07message\x18\x02 \x01(\tH\x01\x88\x01\x01\"8\n\x07\x43hannel\x12\x14\n\x10\x45numChannelUnset\x10\x00\x12\r\n\tBroadcast\x10\x01\x12\x08\n\x04Team\x10\x02\x42\n\n\x08_channelB\n\n\x08_message\"\x8c\x01\n\x0b\x41\x63tionError\x12\x15\n\x08unit_tag\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x17\n\nability_id\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12&\n\x06result\x18\x03 \x01(\x0e\x32\x11.Api.ActionResultH\x02\x88\x01\x01\x42\x0b\n\t_unit_tagB\r\n\x0b_ability_idB\t\n\x07_result\"\xa0\x02\n\x0eObserverAction\x12\x42\n\x12player_perspective\x18\x01 \x01(\x0b\x32$.Api.ActionObserverPlayerPerspectiveH\x00\x12\x34\n\x0b\x63\x61mera_move\x18\x02 \x01(\x0b\x32\x1d.Api.ActionObserverCameraMoveH\x00\x12\x45\n\x14\x63\x61mera_follow_player\x18\x03 \x01(\x0b\x32%.Api.ActionObserverCameraFollowPlayerH\x00\x12\x43\n\x13\x63\x61mera_follow_units\x18\x04 \x01(\x0b\x32$.Api.ActionObserverCameraFollowUnitsH\x00\x42\x08\n\x06\x61\x63tion\"G\n\x1f\x41\x63tionObserverPlayerPerspective\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_player_id\"r\n\x18\x41\x63tionObserverCameraMove\x12$\n\tworld_pos\x18\x01 \x01(\x0b\x32\x0c.Api.Point2DH\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x0c\n\n_world_posB\x0b\n\t_distance\"H\n ActionObserverCameraFollowPlayer\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_player_id\"4\n\x1f\x41\x63tionObserverCameraFollowUnits\x12\x11\n\tunit_tags\x18\x01 \x03(\x04\"a\n\x0cPlayerResult\x12\x16\n\tplayer_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12 \n\x06result\x18\x02 \x01(\x0e\x32\x0b.Api.ResultH\x01\x88\x01\x01\x42\x0c\n\n_player_idB\t\n\x07_result*x\n\x06Status\x12\x13\n\x0f\x45numStatusUnset\x10\x00\x12\x0c\n\x08launched\x10\x01\x12\r\n\tinit_game\x10\x02\x12\x0b\n\x07in_game\x10\x03\x12\r\n\tin_replay\x10\x04\x12\t\n\x05\x65nded\x10\x05\x12\x08\n\x04quit\x10\x06\x12\x0b\n\x07unknown\x10\x63*\xaf\x01\n\nDifficulty\x12\x17\n\x13\x45numDifficultyUnset\x10\x00\x12\x0c\n\x08VeryEasy\x10\x01\x12\x08\n\x04\x45\x61sy\x10\x02\x12\n\n\x06Medium\x10\x03\x12\x0e\n\nMediumHard\x10\x04\x12\x08\n\x04Hard\x10\x05\x12\n\n\x06Harder\x10\x06\x12\x0c\n\x08VeryHard\x10\x07\x12\x0f\n\x0b\x43heatVision\x10\x08\x12\x0e\n\nCheatMoney\x10\t\x12\x0f\n\x0b\x43heatInsane\x10\n*R\n\nPlayerType\x12\x17\n\x13\x45numPlayerTypeUnset\x10\x00\x12\x0f\n\x0bParticipant\x10\x01\x12\x0c\n\x08\x43omputer\x10\x02\x12\x0c\n\x08Observer\x10\x03*e\n\x07\x41IBuild\x12\x14\n\x10\x45numAIBuildUnset\x10\x00\x12\x0f\n\x0bRandomBuild\x10\x01\x12\x08\n\x04Rush\x10\x02\x12\n\n\x06Timing\x10\x03\x12\t\n\x05Power\x10\x04\x12\t\n\x05Macro\x10\x05\x12\x07\n\x03\x41ir\x10\x06*\xef\x03\n\x05\x41lert\x12\x12\n\x0e\x45numAlertUnset\x10\x00\x12\x0e\n\nAlertError\x10\x03\x12\x11\n\rAddOnComplete\x10\x04\x12\x14\n\x10\x42uildingComplete\x10\x05\x12\x17\n\x13\x42uildingUnderAttack\x10\x06\x12\x10\n\x0cLarvaHatched\x10\x07\x12\x11\n\rMergeComplete\x10\x08\x12\x15\n\x11MineralsExhausted\x10\t\x12\x11\n\rMorphComplete\x10\n\x12\x16\n\x12MothershipComplete\x10\x0b\x12\x0f\n\x0bMULEExpired\x10\x0c\x12\x19\n\x15NuclearLaunchDetected\x10\x01\x12\x10\n\x0cNukeComplete\x10\r\x12\x15\n\x11NydusWormDetected\x10\x02\x12\x14\n\x10ResearchComplete\x10\x0e\x12\x0e\n\nTrainError\x10\x0f\x12\x15\n\x11TrainUnitComplete\x10\x10\x12\x17\n\x13TrainWorkerComplete\x10\x11\x12\x1a\n\x16TransformationComplete\x10\x12\x12\x13\n\x0fUnitUnderAttack\x10\x13\x12\x13\n\x0fUpgradeComplete\x10\x14\x12\x14\n\x10VespeneExhausted\x10\x15\x12\x12\n\x0eWarpInComplete\x10\x16*N\n\x06Result\x12\x13\n\x0f\x45numResultUnset\x10\x00\x12\x0b\n\x07Victory\x10\x01\x12\n\n\x06\x44\x65\x66\x65\x61t\x10\x02\x12\x07\n\x03Tie\x10\x03\x12\r\n\tUndecided\x10\x04\x62\x06proto3"
19
19
 
20
20
  pool = Google::Protobuf::DescriptorPool.generated_pool
21
-
22
- begin
23
- pool.add_serialized_file(descriptor_data)
24
- rescue TypeError
25
- # Compatibility code: will be removed in the next major version.
26
- require 'google/protobuf/descriptor_pb'
27
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
28
- parsed.clear_dependency
29
- serialized = parsed.class.encode(parsed)
30
- file = pool.add_serialized_file(serialized)
31
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
32
- imports = [
33
- ["Api.RequestQuery", "sc2ai/protocol/query.proto"],
34
- ["Api.StartRaw", "sc2ai/protocol/raw.proto"],
35
- ["Api.AbilityData", "sc2ai/protocol/data.proto"],
36
- ["Api.DebugCommand", "sc2ai/protocol/debug.proto"],
37
- ["Api.Size2DI", "sc2ai/protocol/common.proto"],
38
- ["Api.Score", "sc2ai/protocol/score.proto"],
39
- ["Api.ObservationFeatureLayer", "sc2ai/protocol/spatial.proto"],
40
- ["Api.ObservationUI", "sc2ai/protocol/ui.proto"],
41
- ]
42
- imports.each do |type_name, expected_filename|
43
- import_file = pool.lookup(type_name).file_descriptor
44
- if import_file.name != expected_filename
45
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
46
- end
47
- end
48
- warn "Each proto file must use a consistent fully-qualified name."
49
- warn "This will become an error in the next major version."
50
- end
21
+ pool.add_serialized_file(descriptor_data)
51
22
 
52
23
  module Api
53
24
  Request = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.Request").msgclass
@@ -5,31 +5,10 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
 
8
- descriptor_data = "\n\x1asc2ai/protocol/score.proto\x12\x03\x41pi\"\x92\x01\n\x05Score\x12(\n\nscore_type\x18\x06 \x01(\x0e\x32\x14.Api.Score.ScoreType\x12\r\n\x05score\x18\x07 \x01(\x05\x12(\n\rscore_details\x18\x08 \x01(\x0b\x32\x11.Api.ScoreDetails\"&\n\tScoreType\x12\x0e\n\nCurriculum\x10\x01\x12\t\n\x05Melee\x10\x02\"h\n\x14\x43\x61tegoryScoreDetails\x12\x0c\n\x04none\x18\x01 \x01(\x02\x12\x0c\n\x04\x61rmy\x18\x02 \x01(\x02\x12\x0f\n\x07\x65\x63onomy\x18\x03 \x01(\x02\x12\x12\n\ntechnology\x18\x04 \x01(\x02\x12\x0f\n\x07upgrade\x18\x05 \x01(\x02\"B\n\x11VitalScoreDetails\x12\x0c\n\x04life\x18\x01 \x01(\x02\x12\x0f\n\x07shields\x18\x02 \x01(\x02\x12\x0e\n\x06\x65nergy\x18\x03 \x01(\x02\"\xf0\x08\n\x0cScoreDetails\x12\x1c\n\x14idle_production_time\x18\x01 \x01(\x02\x12\x18\n\x10idle_worker_time\x18\x02 \x01(\x02\x12\x19\n\x11total_value_units\x18\x03 \x01(\x02\x12\x1e\n\x16total_value_structures\x18\x04 \x01(\x02\x12\x1a\n\x12killed_value_units\x18\x05 \x01(\x02\x12\x1f\n\x17killed_value_structures\x18\x06 \x01(\x02\x12\x1a\n\x12\x63ollected_minerals\x18\x07 \x01(\x02\x12\x19\n\x11\x63ollected_vespene\x18\x08 \x01(\x02\x12 \n\x18\x63ollection_rate_minerals\x18\t \x01(\x02\x12\x1f\n\x17\x63ollection_rate_vespene\x18\n \x01(\x02\x12\x16\n\x0espent_minerals\x18\x0b \x01(\x02\x12\x15\n\rspent_vespene\x18\x0c \x01(\x02\x12,\n\tfood_used\x18\r \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x32\n\x0fkilled_minerals\x18\x0e \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x31\n\x0ekilled_vespene\x18\x0f \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x30\n\rlost_minerals\x18\x10 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12/\n\x0clost_vespene\x18\x11 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x39\n\x16\x66riendly_fire_minerals\x18\x12 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x38\n\x15\x66riendly_fire_vespene\x18\x13 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x30\n\rused_minerals\x18\x14 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12/\n\x0cused_vespene\x18\x15 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x36\n\x13total_used_minerals\x18\x16 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x35\n\x12total_used_vespene\x18\x17 \x01(\x0b\x32\x19.Api.CategoryScoreDetails\x12\x32\n\x12total_damage_dealt\x18\x18 \x01(\x0b\x32\x16.Api.VitalScoreDetails\x12\x32\n\x12total_damage_taken\x18\x19 \x01(\x0b\x32\x16.Api.VitalScoreDetails\x12,\n\x0ctotal_healed\x18\x1a \x01(\x0b\x32\x16.Api.VitalScoreDetails\x12\x13\n\x0b\x63urrent_apm\x18\x1b \x01(\x02\x12\x1d\n\x15\x63urrent_effective_apm\x18\x1c \x01(\x02"
8
+ descriptor_data = "\n\x1asc2ai/protocol/score.proto\x12\x03\x41pi\"\xe4\x01\n\x05Score\x12-\n\nscore_type\x18\x06 \x01(\x0e\x32\x14.Api.Score.ScoreTypeH\x00\x88\x01\x01\x12\x12\n\x05score\x18\x07 \x01(\x05H\x01\x88\x01\x01\x12-\n\rscore_details\x18\x08 \x01(\x0b\x32\x11.Api.ScoreDetailsH\x02\x88\x01\x01\">\n\tScoreType\x12\x16\n\x12\x45numScoreTypeUnset\x10\x00\x12\x0e\n\nCurriculum\x10\x01\x12\t\n\x05Melee\x10\x02\x42\r\n\x0b_score_typeB\x08\n\x06_scoreB\x10\n\x0e_score_details\"\xba\x01\n\x14\x43\x61tegoryScoreDetails\x12\x11\n\x04none\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x11\n\x04\x61rmy\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x14\n\x07\x65\x63onomy\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x17\n\ntechnology\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x14\n\x07upgrade\x18\x05 \x01(\x02H\x04\x88\x01\x01\x42\x07\n\x05_noneB\x07\n\x05_armyB\n\n\x08_economyB\r\n\x0b_technologyB\n\n\x08_upgrade\"q\n\x11VitalScoreDetails\x12\x11\n\x04life\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x14\n\x07shields\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x13\n\x06\x65nergy\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\x07\n\x05_lifeB\n\n\x08_shieldsB\t\n\x07_energy\"\xe1\x0e\n\x0cScoreDetails\x12!\n\x14idle_production_time\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x1d\n\x10idle_worker_time\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x1e\n\x11total_value_units\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12#\n\x16total_value_structures\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x1f\n\x12killed_value_units\x18\x05 \x01(\x02H\x04\x88\x01\x01\x12$\n\x17killed_value_structures\x18\x06 \x01(\x02H\x05\x88\x01\x01\x12\x1f\n\x12\x63ollected_minerals\x18\x07 \x01(\x02H\x06\x88\x01\x01\x12\x1e\n\x11\x63ollected_vespene\x18\x08 \x01(\x02H\x07\x88\x01\x01\x12%\n\x18\x63ollection_rate_minerals\x18\t \x01(\x02H\x08\x88\x01\x01\x12$\n\x17\x63ollection_rate_vespene\x18\n \x01(\x02H\t\x88\x01\x01\x12\x1b\n\x0espent_minerals\x18\x0b \x01(\x02H\n\x88\x01\x01\x12\x1a\n\rspent_vespene\x18\x0c \x01(\x02H\x0b\x88\x01\x01\x12\x31\n\tfood_used\x18\r \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x0c\x88\x01\x01\x12\x37\n\x0fkilled_minerals\x18\x0e \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\r\x88\x01\x01\x12\x36\n\x0ekilled_vespene\x18\x0f \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x0e\x88\x01\x01\x12\x35\n\rlost_minerals\x18\x10 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x0f\x88\x01\x01\x12\x34\n\x0clost_vespene\x18\x11 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x10\x88\x01\x01\x12>\n\x16\x66riendly_fire_minerals\x18\x12 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x11\x88\x01\x01\x12=\n\x15\x66riendly_fire_vespene\x18\x13 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x12\x88\x01\x01\x12\x35\n\rused_minerals\x18\x14 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x13\x88\x01\x01\x12\x34\n\x0cused_vespene\x18\x15 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x14\x88\x01\x01\x12;\n\x13total_used_minerals\x18\x16 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x15\x88\x01\x01\x12:\n\x12total_used_vespene\x18\x17 \x01(\x0b\x32\x19.Api.CategoryScoreDetailsH\x16\x88\x01\x01\x12\x37\n\x12total_damage_dealt\x18\x18 \x01(\x0b\x32\x16.Api.VitalScoreDetailsH\x17\x88\x01\x01\x12\x37\n\x12total_damage_taken\x18\x19 \x01(\x0b\x32\x16.Api.VitalScoreDetailsH\x18\x88\x01\x01\x12\x31\n\x0ctotal_healed\x18\x1a \x01(\x0b\x32\x16.Api.VitalScoreDetailsH\x19\x88\x01\x01\x12\x18\n\x0b\x63urrent_apm\x18\x1b \x01(\x02H\x1a\x88\x01\x01\x12\"\n\x15\x63urrent_effective_apm\x18\x1c \x01(\x02H\x1b\x88\x01\x01\x42\x17\n\x15_idle_production_timeB\x13\n\x11_idle_worker_timeB\x14\n\x12_total_value_unitsB\x19\n\x17_total_value_structuresB\x15\n\x13_killed_value_unitsB\x1a\n\x18_killed_value_structuresB\x15\n\x13_collected_mineralsB\x14\n\x12_collected_vespeneB\x1b\n\x19_collection_rate_mineralsB\x1a\n\x18_collection_rate_vespeneB\x11\n\x0f_spent_mineralsB\x10\n\x0e_spent_vespeneB\x0c\n\n_food_usedB\x12\n\x10_killed_mineralsB\x11\n\x0f_killed_vespeneB\x10\n\x0e_lost_mineralsB\x0f\n\r_lost_vespeneB\x19\n\x17_friendly_fire_mineralsB\x18\n\x16_friendly_fire_vespeneB\x10\n\x0e_used_mineralsB\x0f\n\r_used_vespeneB\x16\n\x14_total_used_mineralsB\x15\n\x13_total_used_vespeneB\x15\n\x13_total_damage_dealtB\x15\n\x13_total_damage_takenB\x0f\n\r_total_healedB\x0e\n\x0c_current_apmB\x18\n\x16_current_effective_apmb\x06proto3"
9
9
 
10
10
  pool = Google::Protobuf::DescriptorPool.generated_pool
11
-
12
- begin
13
- pool.add_serialized_file(descriptor_data)
14
- rescue TypeError
15
- # Compatibility code: will be removed in the next major version.
16
- require 'google/protobuf/descriptor_pb'
17
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
- parsed.clear_dependency
19
- serialized = parsed.class.encode(parsed)
20
- file = pool.add_serialized_file(serialized)
21
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
- imports = [
23
- ]
24
- imports.each do |type_name, expected_filename|
25
- import_file = pool.lookup(type_name).file_descriptor
26
- if import_file.name != expected_filename
27
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
- end
29
- end
30
- warn "Each proto file must use a consistent fully-qualified name."
31
- warn "This will become an error in the next major version."
32
- end
11
+ pool.add_serialized_file(descriptor_data)
33
12
 
34
13
  module Api
35
14
  Score = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.Score").msgclass
@@ -7,32 +7,10 @@ require 'google/protobuf'
7
7
  require 'sc2ai/protocol/common_pb'
8
8
 
9
9
 
10
- descriptor_data = "\n\x1csc2ai/protocol/spatial.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\"r\n\x17ObservationFeatureLayer\x12#\n\x07renders\x18\x01 \x01(\x0b\x32\x12.Api.FeatureLayers\x12\x32\n\x0fminimap_renders\x18\x02 \x01(\x0b\x32\x19.Api.FeatureLayersMinimap\"\xf3\x07\n\rFeatureLayers\x12\"\n\nheight_map\x18\x01 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\x0evisibility_map\x18\x02 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1d\n\x05\x63reep\x18\x03 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1d\n\x05power\x18\x04 \x01(\x0b\x32\x0e.Api.ImageData\x12!\n\tplayer_id\x18\x05 \x01(\x0b\x32\x0e.Api.ImageData\x12!\n\tunit_type\x18\x06 \x01(\x0b\x32\x0e.Api.ImageData\x12 \n\x08selected\x18\x07 \x01(\x0b\x32\x0e.Api.ImageData\x12\'\n\x0funit_hit_points\x18\x08 \x01(\x0b\x32\x0e.Api.ImageData\x12-\n\x15unit_hit_points_ratio\x18\x11 \x01(\x0b\x32\x0e.Api.ImageData\x12#\n\x0bunit_energy\x18\t \x01(\x0b\x32\x0e.Api.ImageData\x12)\n\x11unit_energy_ratio\x18\x12 \x01(\x0b\x32\x0e.Api.ImageData\x12$\n\x0cunit_shields\x18\n \x01(\x0b\x32\x0e.Api.ImageData\x12*\n\x12unit_shields_ratio\x18\x13 \x01(\x0b\x32\x0e.Api.ImageData\x12\'\n\x0fplayer_relative\x18\x0b \x01(\x0b\x32\x0e.Api.ImageData\x12\'\n\x0funit_density_aa\x18\x0e \x01(\x0b\x32\x0e.Api.ImageData\x12$\n\x0cunit_density\x18\x0f \x01(\x0b\x32\x0e.Api.ImageData\x12\x1f\n\x07\x65\x66\x66\x65\x63ts\x18\x14 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\x0ehallucinations\x18\x15 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1f\n\x07\x63loaked\x18\x16 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1c\n\x04\x62lip\x18\x17 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1d\n\x05\x62uffs\x18\x18 \x01(\x0b\x32\x0e.Api.ImageData\x12%\n\rbuff_duration\x18\x1a \x01(\x0b\x32\x0e.Api.ImageData\x12\x1e\n\x06\x61\x63tive\x18\x19 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\x0e\x62uild_progress\x18\x1b \x01(\x0b\x32\x0e.Api.ImageData\x12!\n\tbuildable\x18\x1c \x01(\x0b\x32\x0e.Api.ImageData\x12 \n\x08pathable\x18\x1d \x01(\x0b\x32\x0e.Api.ImageData\x12#\n\x0bplaceholder\x18\x1e \x01(\x0b\x32\x0e.Api.ImageData\"\x97\x03\n\x14\x46\x65\x61tureLayersMinimap\x12\"\n\nheight_map\x18\x01 \x01(\x0b\x32\x0e.Api.ImageData\x12&\n\x0evisibility_map\x18\x02 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1d\n\x05\x63reep\x18\x03 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1e\n\x06\x63\x61mera\x18\x04 \x01(\x0b\x32\x0e.Api.ImageData\x12!\n\tplayer_id\x18\x05 \x01(\x0b\x32\x0e.Api.ImageData\x12\'\n\x0fplayer_relative\x18\x06 \x01(\x0b\x32\x0e.Api.ImageData\x12 \n\x08selected\x18\x07 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1e\n\x06\x61lerts\x18\t \x01(\x0b\x32\x0e.Api.ImageData\x12!\n\tbuildable\x18\n \x01(\x0b\x32\x0e.Api.ImageData\x12 \n\x08pathable\x18\x0b \x01(\x0b\x32\x0e.Api.ImageData\x12!\n\tunit_type\x18\x08 \x01(\x0b\x32\x0e.Api.ImageData\"Q\n\x11ObservationRender\x12\x1b\n\x03map\x18\x01 \x01(\x0b\x32\x0e.Api.ImageData\x12\x1f\n\x07minimap\x18\x02 \x01(\x0b\x32\x0e.Api.ImageData\"\x8f\x02\n\rActionSpatial\x12\x35\n\x0cunit_command\x18\x01 \x01(\x0b\x32\x1d.Api.ActionSpatialUnitCommandH\x00\x12\x33\n\x0b\x63\x61mera_move\x18\x02 \x01(\x0b\x32\x1c.Api.ActionSpatialCameraMoveH\x00\x12\x44\n\x14unit_selection_point\x18\x03 \x01(\x0b\x32$.Api.ActionSpatialUnitSelectionPointH\x00\x12\x42\n\x13unit_selection_rect\x18\x04 \x01(\x0b\x32#.Api.ActionSpatialUnitSelectionRectH\x00\x42\x08\n\x06\x61\x63tion\"\xa8\x01\n\x18\x41\x63tionSpatialUnitCommand\x12\x12\n\nability_id\x18\x01 \x01(\x05\x12*\n\x13target_screen_coord\x18\x02 \x01(\x0b\x32\x0b.Api.PointIH\x00\x12+\n\x14target_minimap_coord\x18\x03 \x01(\x0b\x32\x0b.Api.PointIH\x00\x12\x15\n\rqueue_command\x18\x04 \x01(\x08\x42\x08\n\x06target\">\n\x17\x41\x63tionSpatialCameraMove\x12#\n\x0e\x63\x65nter_minimap\x18\x01 \x01(\x0b\x32\x0b.Api.PointI\"\xc4\x01\n\x1f\x41\x63tionSpatialUnitSelectionPoint\x12+\n\x16selection_screen_coord\x18\x01 \x01(\x0b\x32\x0b.Api.PointI\x12\x37\n\x04type\x18\x02 \x01(\x0e\x32).Api.ActionSpatialUnitSelectionPoint.Type\";\n\x04Type\x12\n\n\x06Select\x10\x01\x12\n\n\x06Toggle\x10\x02\x12\x0b\n\x07\x41llType\x10\x03\x12\x0e\n\nAddAllType\x10\x04\"h\n\x1e\x41\x63tionSpatialUnitSelectionRect\x12/\n\x16selection_screen_coord\x18\x01 \x03(\x0b\x32\x0f.Api.RectangleI\x12\x15\n\rselection_add\x18\x02 \x01(\x08"
10
+ descriptor_data = "\n\x1csc2ai/protocol/spatial.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\"\x9c\x01\n\x17ObservationFeatureLayer\x12(\n\x07renders\x18\x01 \x01(\x0b\x32\x12.Api.FeatureLayersH\x00\x88\x01\x01\x12\x37\n\x0fminimap_renders\x18\x02 \x01(\x0b\x32\x19.Api.FeatureLayersMinimapH\x01\x88\x01\x01\x42\n\n\x08_rendersB\x12\n\x10_minimap_renders\"\xa7\x0c\n\rFeatureLayers\x12\'\n\nheight_map\x18\x01 \x01(\x0b\x32\x0e.Api.ImageDataH\x00\x88\x01\x01\x12+\n\x0evisibility_map\x18\x02 \x01(\x0b\x32\x0e.Api.ImageDataH\x01\x88\x01\x01\x12\"\n\x05\x63reep\x18\x03 \x01(\x0b\x32\x0e.Api.ImageDataH\x02\x88\x01\x01\x12\"\n\x05power\x18\x04 \x01(\x0b\x32\x0e.Api.ImageDataH\x03\x88\x01\x01\x12&\n\tplayer_id\x18\x05 \x01(\x0b\x32\x0e.Api.ImageDataH\x04\x88\x01\x01\x12&\n\tunit_type\x18\x06 \x01(\x0b\x32\x0e.Api.ImageDataH\x05\x88\x01\x01\x12%\n\x08selected\x18\x07 \x01(\x0b\x32\x0e.Api.ImageDataH\x06\x88\x01\x01\x12,\n\x0funit_hit_points\x18\x08 \x01(\x0b\x32\x0e.Api.ImageDataH\x07\x88\x01\x01\x12\x32\n\x15unit_hit_points_ratio\x18\x11 \x01(\x0b\x32\x0e.Api.ImageDataH\x08\x88\x01\x01\x12(\n\x0bunit_energy\x18\t \x01(\x0b\x32\x0e.Api.ImageDataH\t\x88\x01\x01\x12.\n\x11unit_energy_ratio\x18\x12 \x01(\x0b\x32\x0e.Api.ImageDataH\n\x88\x01\x01\x12)\n\x0cunit_shields\x18\n \x01(\x0b\x32\x0e.Api.ImageDataH\x0b\x88\x01\x01\x12/\n\x12unit_shields_ratio\x18\x13 \x01(\x0b\x32\x0e.Api.ImageDataH\x0c\x88\x01\x01\x12,\n\x0fplayer_relative\x18\x0b \x01(\x0b\x32\x0e.Api.ImageDataH\r\x88\x01\x01\x12,\n\x0funit_density_aa\x18\x0e \x01(\x0b\x32\x0e.Api.ImageDataH\x0e\x88\x01\x01\x12)\n\x0cunit_density\x18\x0f \x01(\x0b\x32\x0e.Api.ImageDataH\x0f\x88\x01\x01\x12$\n\x07\x65\x66\x66\x65\x63ts\x18\x14 \x01(\x0b\x32\x0e.Api.ImageDataH\x10\x88\x01\x01\x12+\n\x0ehallucinations\x18\x15 \x01(\x0b\x32\x0e.Api.ImageDataH\x11\x88\x01\x01\x12$\n\x07\x63loaked\x18\x16 \x01(\x0b\x32\x0e.Api.ImageDataH\x12\x88\x01\x01\x12!\n\x04\x62lip\x18\x17 \x01(\x0b\x32\x0e.Api.ImageDataH\x13\x88\x01\x01\x12\"\n\x05\x62uffs\x18\x18 \x01(\x0b\x32\x0e.Api.ImageDataH\x14\x88\x01\x01\x12*\n\rbuff_duration\x18\x1a \x01(\x0b\x32\x0e.Api.ImageDataH\x15\x88\x01\x01\x12#\n\x06\x61\x63tive\x18\x19 \x01(\x0b\x32\x0e.Api.ImageDataH\x16\x88\x01\x01\x12+\n\x0e\x62uild_progress\x18\x1b \x01(\x0b\x32\x0e.Api.ImageDataH\x17\x88\x01\x01\x12&\n\tbuildable\x18\x1c \x01(\x0b\x32\x0e.Api.ImageDataH\x18\x88\x01\x01\x12%\n\x08pathable\x18\x1d \x01(\x0b\x32\x0e.Api.ImageDataH\x19\x88\x01\x01\x12(\n\x0bplaceholder\x18\x1e \x01(\x0b\x32\x0e.Api.ImageDataH\x1a\x88\x01\x01\x42\r\n\x0b_height_mapB\x11\n\x0f_visibility_mapB\x08\n\x06_creepB\x08\n\x06_powerB\x0c\n\n_player_idB\x0c\n\n_unit_typeB\x0b\n\t_selectedB\x12\n\x10_unit_hit_pointsB\x18\n\x16_unit_hit_points_ratioB\x0e\n\x0c_unit_energyB\x14\n\x12_unit_energy_ratioB\x0f\n\r_unit_shieldsB\x15\n\x13_unit_shields_ratioB\x12\n\x10_player_relativeB\x12\n\x10_unit_density_aaB\x0f\n\r_unit_densityB\n\n\x08_effectsB\x11\n\x0f_hallucinationsB\n\n\x08_cloakedB\x07\n\x05_blipB\x08\n\x06_buffsB\x10\n\x0e_buff_durationB\t\n\x07_activeB\x11\n\x0f_build_progressB\x0c\n\n_buildableB\x0b\n\t_pathableB\x0e\n\x0c_placeholder\"\xe8\x04\n\x14\x46\x65\x61tureLayersMinimap\x12\'\n\nheight_map\x18\x01 \x01(\x0b\x32\x0e.Api.ImageDataH\x00\x88\x01\x01\x12+\n\x0evisibility_map\x18\x02 \x01(\x0b\x32\x0e.Api.ImageDataH\x01\x88\x01\x01\x12\"\n\x05\x63reep\x18\x03 \x01(\x0b\x32\x0e.Api.ImageDataH\x02\x88\x01\x01\x12#\n\x06\x63\x61mera\x18\x04 \x01(\x0b\x32\x0e.Api.ImageDataH\x03\x88\x01\x01\x12&\n\tplayer_id\x18\x05 \x01(\x0b\x32\x0e.Api.ImageDataH\x04\x88\x01\x01\x12,\n\x0fplayer_relative\x18\x06 \x01(\x0b\x32\x0e.Api.ImageDataH\x05\x88\x01\x01\x12%\n\x08selected\x18\x07 \x01(\x0b\x32\x0e.Api.ImageDataH\x06\x88\x01\x01\x12#\n\x06\x61lerts\x18\t \x01(\x0b\x32\x0e.Api.ImageDataH\x07\x88\x01\x01\x12&\n\tbuildable\x18\n \x01(\x0b\x32\x0e.Api.ImageDataH\x08\x88\x01\x01\x12%\n\x08pathable\x18\x0b \x01(\x0b\x32\x0e.Api.ImageDataH\t\x88\x01\x01\x12&\n\tunit_type\x18\x08 \x01(\x0b\x32\x0e.Api.ImageDataH\n\x88\x01\x01\x42\r\n\x0b_height_mapB\x11\n\x0f_visibility_mapB\x08\n\x06_creepB\t\n\x07_cameraB\x0c\n\n_player_idB\x12\n\x10_player_relativeB\x0b\n\t_selectedB\t\n\x07_alertsB\x0c\n\n_buildableB\x0b\n\t_pathableB\x0c\n\n_unit_type\"o\n\x11ObservationRender\x12 \n\x03map\x18\x01 \x01(\x0b\x32\x0e.Api.ImageDataH\x00\x88\x01\x01\x12$\n\x07minimap\x18\x02 \x01(\x0b\x32\x0e.Api.ImageDataH\x01\x88\x01\x01\x42\x06\n\x04_mapB\n\n\x08_minimap\"\x8f\x02\n\rActionSpatial\x12\x35\n\x0cunit_command\x18\x01 \x01(\x0b\x32\x1d.Api.ActionSpatialUnitCommandH\x00\x12\x33\n\x0b\x63\x61mera_move\x18\x02 \x01(\x0b\x32\x1c.Api.ActionSpatialCameraMoveH\x00\x12\x44\n\x14unit_selection_point\x18\x03 \x01(\x0b\x32$.Api.ActionSpatialUnitSelectionPointH\x00\x12\x42\n\x13unit_selection_rect\x18\x04 \x01(\x0b\x32#.Api.ActionSpatialUnitSelectionRectH\x00\x42\x08\n\x06\x61\x63tion\"\xd3\x01\n\x18\x41\x63tionSpatialUnitCommand\x12\x17\n\nability_id\x18\x01 \x01(\x05H\x01\x88\x01\x01\x12*\n\x13target_screen_coord\x18\x02 \x01(\x0b\x32\x0b.Api.PointIH\x00\x12+\n\x14target_minimap_coord\x18\x03 \x01(\x0b\x32\x0b.Api.PointIH\x00\x12\x1a\n\rqueue_command\x18\x04 \x01(\x08H\x02\x88\x01\x01\x42\x08\n\x06targetB\r\n\x0b_ability_idB\x10\n\x0e_queue_command\"V\n\x17\x41\x63tionSpatialCameraMove\x12(\n\x0e\x63\x65nter_minimap\x18\x01 \x01(\x0b\x32\x0b.Api.PointIH\x00\x88\x01\x01\x42\x11\n\x0f_center_minimap\"\xa4\x02\n\x1f\x41\x63tionSpatialUnitSelectionPoint\x12\x30\n\x16selection_screen_coord\x18\x01 \x01(\x0b\x32\x0b.Api.PointIH\x00\x88\x01\x01\x12<\n\x04type\x18\x02 \x01(\x0e\x32).Api.ActionSpatialUnitSelectionPoint.TypeH\x01\x88\x01\x01\"m\n\x04Type\x12\x30\n,EnumActionSpatialUnitSelectionPointTypeUnset\x10\x00\x12\n\n\x06Select\x10\x01\x12\n\n\x06Toggle\x10\x02\x12\x0b\n\x07\x41llType\x10\x03\x12\x0e\n\nAddAllType\x10\x04\x42\x19\n\x17_selection_screen_coordB\x07\n\x05_type\"\x7f\n\x1e\x41\x63tionSpatialUnitSelectionRect\x12/\n\x16selection_screen_coord\x18\x01 \x03(\x0b\x32\x0f.Api.RectangleI\x12\x1a\n\rselection_add\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_selection_addb\x06proto3"
11
11
 
12
12
  pool = Google::Protobuf::DescriptorPool.generated_pool
13
-
14
- begin
15
- pool.add_serialized_file(descriptor_data)
16
- rescue TypeError
17
- # Compatibility code: will be removed in the next major version.
18
- require 'google/protobuf/descriptor_pb'
19
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
- parsed.clear_dependency
21
- serialized = parsed.class.encode(parsed)
22
- file = pool.add_serialized_file(serialized)
23
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
- imports = [
25
- ["Api.ImageData", "sc2ai/protocol/common.proto"],
26
- ]
27
- imports.each do |type_name, expected_filename|
28
- import_file = pool.lookup(type_name).file_descriptor
29
- if import_file.name != expected_filename
30
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
- end
32
- end
33
- warn "Each proto file must use a consistent fully-qualified name."
34
- warn "This will become an error in the next major version."
35
- end
13
+ pool.add_serialized_file(descriptor_data)
36
14
 
37
15
  module Api
38
16
  ObservationFeatureLayer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.ObservationFeatureLayer").msgclass
@@ -5,31 +5,10 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
 
8
- descriptor_data = "\n\x17sc2ai/protocol/ui.proto\x12\x03\x41pi\"\xcf\x01\n\rObservationUI\x12!\n\x06groups\x18\x01 \x03(\x0b\x32\x11.Api.ControlGroup\x12\"\n\x06single\x18\x02 \x01(\x0b\x32\x10.Api.SinglePanelH\x00\x12 \n\x05multi\x18\x03 \x01(\x0b\x32\x0f.Api.MultiPanelH\x00\x12 \n\x05\x63\x61rgo\x18\x04 \x01(\x0b\x32\x0f.Api.CargoPanelH\x00\x12*\n\nproduction\x18\x05 \x01(\x0b\x32\x14.Api.ProductionPanelH\x00\x42\x07\n\x05panel\"T\n\x0c\x43ontrolGroup\x12\x1b\n\x13\x63ontrol_group_index\x18\x01 \x01(\r\x12\x18\n\x10leader_unit_type\x18\x02 \x01(\r\x12\r\n\x05\x63ount\x18\x03 \x01(\r\"\xfa\x01\n\x08UnitInfo\x12\x11\n\tunit_type\x18\x01 \x01(\r\x12\x17\n\x0fplayer_relative\x18\x02 \x01(\r\x12\x0e\n\x06health\x18\x03 \x01(\x05\x12\x0f\n\x07shields\x18\x04 \x01(\x05\x12\x0e\n\x06\x65nergy\x18\x05 \x01(\x05\x12\x1d\n\x15transport_slots_taken\x18\x06 \x01(\x05\x12\x16\n\x0e\x62uild_progress\x18\x07 \x01(\x02\x12\x1d\n\x06\x61\x64\x64_on\x18\x08 \x01(\x0b\x32\r.Api.UnitInfo\x12\x12\n\nmax_health\x18\t \x01(\x05\x12\x13\n\x0bmax_shields\x18\n \x01(\x05\x12\x12\n\nmax_energy\x18\x0b \x01(\x05\"\x92\x01\n\x0bSinglePanel\x12\x1b\n\x04unit\x18\x01 \x01(\x0b\x32\r.Api.UnitInfo\x12\x1c\n\x14\x61ttack_upgrade_level\x18\x02 \x01(\x05\x12\x1b\n\x13\x61rmor_upgrade_level\x18\x03 \x01(\x05\x12\x1c\n\x14shield_upgrade_level\x18\x04 \x01(\x05\x12\r\n\x05\x62uffs\x18\x05 \x03(\x05\"*\n\nMultiPanel\x12\x1c\n\x05units\x18\x01 \x03(\x0b\x32\r.Api.UnitInfo\"e\n\nCargoPanel\x12\x1b\n\x04unit\x18\x01 \x01(\x0b\x32\r.Api.UnitInfo\x12!\n\npassengers\x18\x02 \x03(\x0b\x32\r.Api.UnitInfo\x12\x17\n\x0fslots_available\x18\x03 \x01(\x05\"7\n\tBuildItem\x12\x12\n\nability_id\x18\x01 \x01(\r\x12\x16\n\x0e\x62uild_progress\x18\x02 \x01(\x02\"|\n\x0fProductionPanel\x12\x1b\n\x04unit\x18\x01 \x01(\x0b\x32\r.Api.UnitInfo\x12\"\n\x0b\x62uild_queue\x18\x02 \x03(\x0b\x32\r.Api.UnitInfo\x12(\n\x10production_queue\x18\x03 \x03(\x0b\x32\x0e.Api.BuildItem\"\xf7\x03\n\x08\x41\x63tionUI\x12\x30\n\rcontrol_group\x18\x01 \x01(\x0b\x32\x17.Api.ActionControlGroupH\x00\x12,\n\x0bselect_army\x18\x02 \x01(\x0b\x32\x15.Api.ActionSelectArmyH\x00\x12\x37\n\x11select_warp_gates\x18\x03 \x01(\x0b\x32\x1a.Api.ActionSelectWarpGatesH\x00\x12.\n\x0cselect_larva\x18\x04 \x01(\x0b\x32\x16.Api.ActionSelectLarvaH\x00\x12\x39\n\x12select_idle_worker\x18\x05 \x01(\x0b\x32\x1b.Api.ActionSelectIdleWorkerH\x00\x12,\n\x0bmulti_panel\x18\x06 \x01(\x0b\x32\x15.Api.ActionMultiPanelH\x00\x12\x32\n\x0b\x63\x61rgo_panel\x18\x07 \x01(\x0b\x32\x1b.Api.ActionCargoPanelUnloadH\x00\x12\x45\n\x10production_panel\x18\x08 \x01(\x0b\x32).Api.ActionProductionPanelRemoveFromQueueH\x00\x12\x34\n\x0ftoggle_autocast\x18\t \x01(\x0b\x32\x19.Api.ActionToggleAutocastH\x00\x42\x08\n\x06\x61\x63tion\"\xc9\x01\n\x12\x41\x63tionControlGroup\x12:\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32*.Api.ActionControlGroup.ControlGroupAction\x12\x1b\n\x13\x63ontrol_group_index\x18\x02 \x01(\r\"Z\n\x12\x43ontrolGroupAction\x12\n\n\x06Recall\x10\x01\x12\x07\n\x03Set\x10\x02\x12\n\n\x06\x41ppend\x10\x03\x12\x0f\n\x0bSetAndSteal\x10\x04\x12\x12\n\x0e\x41ppendAndSteal\x10\x05\")\n\x10\x41\x63tionSelectArmy\x12\x15\n\rselection_add\x18\x01 \x01(\x08\".\n\x15\x41\x63tionSelectWarpGates\x12\x15\n\rselection_add\x18\x01 \x01(\x08\"\x13\n\x11\x41\x63tionSelectLarva\"w\n\x16\x41\x63tionSelectIdleWorker\x12.\n\x04type\x18\x01 \x01(\x0e\x32 .Api.ActionSelectIdleWorker.Type\"-\n\x04Type\x12\x07\n\x03Set\x10\x01\x12\x07\n\x03\x41\x64\x64\x10\x02\x12\x07\n\x03\x41ll\x10\x03\x12\n\n\x06\x41\x64\x64\x41ll\x10\x04\"\xa8\x01\n\x10\x41\x63tionMultiPanel\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.Api.ActionMultiPanel.Type\x12\x12\n\nunit_index\x18\x02 \x01(\x05\"V\n\x04Type\x12\x10\n\x0cSingleSelect\x10\x01\x12\x10\n\x0c\x44\x65selectUnit\x10\x02\x12\x13\n\x0fSelectAllOfType\x10\x03\x12\x15\n\x11\x44\x65selectAllOfType\x10\x04\",\n\x16\x41\x63tionCargoPanelUnload\x12\x12\n\nunit_index\x18\x01 \x01(\x05\":\n$ActionProductionPanelRemoveFromQueue\x12\x12\n\nunit_index\x18\x01 \x01(\x05\"*\n\x14\x41\x63tionToggleAutocast\x12\x12\n\nability_id\x18\x01 \x01(\x05"
8
+ descriptor_data = "\n\x17sc2ai/protocol/ui.proto\x12\x03\x41pi\"\xcf\x01\n\rObservationUI\x12!\n\x06groups\x18\x01 \x03(\x0b\x32\x11.Api.ControlGroup\x12\"\n\x06single\x18\x02 \x01(\x0b\x32\x10.Api.SinglePanelH\x00\x12 \n\x05multi\x18\x03 \x01(\x0b\x32\x0f.Api.MultiPanelH\x00\x12 \n\x05\x63\x61rgo\x18\x04 \x01(\x0b\x32\x0f.Api.CargoPanelH\x00\x12*\n\nproduction\x18\x05 \x01(\x0b\x32\x14.Api.ProductionPanelH\x00\x42\x07\n\x05panel\"\x9a\x01\n\x0c\x43ontrolGroup\x12 \n\x13\x63ontrol_group_index\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1d\n\x10leader_unit_type\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x02\x88\x01\x01\x42\x16\n\x14_control_group_indexB\x13\n\x11_leader_unit_typeB\x08\n\x06_count\"\xdb\x03\n\x08UnitInfo\x12\x16\n\tunit_type\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0fplayer_relative\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x13\n\x06health\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12\x14\n\x07shields\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\x13\n\x06\x65nergy\x18\x05 \x01(\x05H\x04\x88\x01\x01\x12\"\n\x15transport_slots_taken\x18\x06 \x01(\x05H\x05\x88\x01\x01\x12\x1b\n\x0e\x62uild_progress\x18\x07 \x01(\x02H\x06\x88\x01\x01\x12\"\n\x06\x61\x64\x64_on\x18\x08 \x01(\x0b\x32\r.Api.UnitInfoH\x07\x88\x01\x01\x12\x17\n\nmax_health\x18\t \x01(\x05H\x08\x88\x01\x01\x12\x18\n\x0bmax_shields\x18\n \x01(\x05H\t\x88\x01\x01\x12\x17\n\nmax_energy\x18\x0b \x01(\x05H\n\x88\x01\x01\x42\x0c\n\n_unit_typeB\x12\n\x10_player_relativeB\t\n\x07_healthB\n\n\x08_shieldsB\t\n\x07_energyB\x18\n\x16_transport_slots_takenB\x11\n\x0f_build_progressB\t\n\x07_add_onB\r\n\x0b_max_healthB\x0e\n\x0c_max_shieldsB\r\n\x0b_max_energy\"\xf9\x01\n\x0bSinglePanel\x12 \n\x04unit\x18\x01 \x01(\x0b\x32\r.Api.UnitInfoH\x00\x88\x01\x01\x12!\n\x14\x61ttack_upgrade_level\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12 \n\x13\x61rmor_upgrade_level\x18\x03 \x01(\x05H\x02\x88\x01\x01\x12!\n\x14shield_upgrade_level\x18\x04 \x01(\x05H\x03\x88\x01\x01\x12\r\n\x05\x62uffs\x18\x05 \x03(\x05\x42\x07\n\x05_unitB\x17\n\x15_attack_upgrade_levelB\x16\n\x14_armor_upgrade_levelB\x17\n\x15_shield_upgrade_level\"*\n\nMultiPanel\x12\x1c\n\x05units\x18\x01 \x03(\x0b\x32\r.Api.UnitInfo\"\x8c\x01\n\nCargoPanel\x12 \n\x04unit\x18\x01 \x01(\x0b\x32\r.Api.UnitInfoH\x00\x88\x01\x01\x12!\n\npassengers\x18\x02 \x03(\x0b\x32\r.Api.UnitInfo\x12\x1c\n\x0fslots_available\x18\x03 \x01(\x05H\x01\x88\x01\x01\x42\x07\n\x05_unitB\x12\n\x10_slots_available\"c\n\tBuildItem\x12\x17\n\nability_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x1b\n\x0e\x62uild_progress\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\r\n\x0b_ability_idB\x11\n\x0f_build_progress\"\x8a\x01\n\x0fProductionPanel\x12 \n\x04unit\x18\x01 \x01(\x0b\x32\r.Api.UnitInfoH\x00\x88\x01\x01\x12\"\n\x0b\x62uild_queue\x18\x02 \x03(\x0b\x32\r.Api.UnitInfo\x12(\n\x10production_queue\x18\x03 \x03(\x0b\x32\x0e.Api.BuildItemB\x07\n\x05_unit\"\xf7\x03\n\x08\x41\x63tionUI\x12\x30\n\rcontrol_group\x18\x01 \x01(\x0b\x32\x17.Api.ActionControlGroupH\x00\x12,\n\x0bselect_army\x18\x02 \x01(\x0b\x32\x15.Api.ActionSelectArmyH\x00\x12\x37\n\x11select_warp_gates\x18\x03 \x01(\x0b\x32\x1a.Api.ActionSelectWarpGatesH\x00\x12.\n\x0cselect_larva\x18\x04 \x01(\x0b\x32\x16.Api.ActionSelectLarvaH\x00\x12\x39\n\x12select_idle_worker\x18\x05 \x01(\x0b\x32\x1b.Api.ActionSelectIdleWorkerH\x00\x12,\n\x0bmulti_panel\x18\x06 \x01(\x0b\x32\x15.Api.ActionMultiPanelH\x00\x12\x32\n\x0b\x63\x61rgo_panel\x18\x07 \x01(\x0b\x32\x1b.Api.ActionCargoPanelUnloadH\x00\x12\x45\n\x10production_panel\x18\x08 \x01(\x0b\x32).Api.ActionProductionPanelRemoveFromQueueH\x00\x12\x34\n\x0ftoggle_autocast\x18\t \x01(\x0b\x32\x19.Api.ActionToggleAutocastH\x00\x42\x08\n\x06\x61\x63tion\"\x97\x02\n\x12\x41\x63tionControlGroup\x12?\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32*.Api.ActionControlGroup.ControlGroupActionH\x00\x88\x01\x01\x12 \n\x13\x63ontrol_group_index\x18\x02 \x01(\rH\x01\x88\x01\x01\"{\n\x12\x43ontrolGroupAction\x12\x1f\n\x1b\x45numControlGroupActionUnset\x10\x00\x12\n\n\x06Recall\x10\x01\x12\x07\n\x03Set\x10\x02\x12\n\n\x06\x41ppend\x10\x03\x12\x0f\n\x0bSetAndSteal\x10\x04\x12\x12\n\x0e\x41ppendAndSteal\x10\x05\x42\t\n\x07_actionB\x16\n\x14_control_group_index\"@\n\x10\x41\x63tionSelectArmy\x12\x1a\n\rselection_add\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_selection_add\"E\n\x15\x41\x63tionSelectWarpGates\x12\x1a\n\rselection_add\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x10\n\x0e_selection_add\"\x13\n\x11\x41\x63tionSelectLarva\"\xae\x01\n\x16\x41\x63tionSelectIdleWorker\x12\x33\n\x04type\x18\x01 \x01(\x0e\x32 .Api.ActionSelectIdleWorker.TypeH\x00\x88\x01\x01\"V\n\x04Type\x12\'\n#EnumActionSelectIdleWorkerTypeUnset\x10\x00\x12\x07\n\x03Set\x10\x01\x12\x07\n\x03\x41\x64\x64\x10\x02\x12\x07\n\x03\x41ll\x10\x03\x12\n\n\x06\x41\x64\x64\x41ll\x10\x04\x42\x07\n\x05_type\"\xed\x01\n\x10\x41\x63tionMultiPanel\x12-\n\x04type\x18\x01 \x01(\x0e\x32\x1a.Api.ActionMultiPanel.TypeH\x00\x88\x01\x01\x12\x17\n\nunit_index\x18\x02 \x01(\x05H\x01\x88\x01\x01\"y\n\x04Type\x12!\n\x1d\x45numActionMultiPanelTypeUnset\x10\x00\x12\x10\n\x0cSingleSelect\x10\x01\x12\x10\n\x0c\x44\x65selectUnit\x10\x02\x12\x13\n\x0fSelectAllOfType\x10\x03\x12\x15\n\x11\x44\x65selectAllOfType\x10\x04\x42\x07\n\x05_typeB\r\n\x0b_unit_index\"@\n\x16\x41\x63tionCargoPanelUnload\x12\x17\n\nunit_index\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_unit_index\"N\n$ActionProductionPanelRemoveFromQueue\x12\x17\n\nunit_index\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_unit_index\">\n\x14\x41\x63tionToggleAutocast\x12\x17\n\nability_id\x18\x01 \x01(\x05H\x00\x88\x01\x01\x42\r\n\x0b_ability_idb\x06proto3"
9
9
 
10
10
  pool = Google::Protobuf::DescriptorPool.generated_pool
11
-
12
- begin
13
- pool.add_serialized_file(descriptor_data)
14
- rescue TypeError
15
- # Compatibility code: will be removed in the next major version.
16
- require 'google/protobuf/descriptor_pb'
17
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
- parsed.clear_dependency
19
- serialized = parsed.class.encode(parsed)
20
- file = pool.add_serialized_file(serialized)
21
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
- imports = [
23
- ]
24
- imports.each do |type_name, expected_filename|
25
- import_file = pool.lookup(type_name).file_descriptor
26
- if import_file.name != expected_filename
27
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
- end
29
- end
30
- warn "Each proto file must use a consistent fully-qualified name."
31
- warn "This will become an error in the next major version."
32
- end
11
+ pool.add_serialized_file(descriptor_data)
33
12
 
34
13
  module Api
35
14
  ObservationUI = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.ObservationUI").msgclass
@@ -188,6 +188,15 @@ module Sc2
188
188
 
189
189
  # GENERICS ---
190
190
 
191
+ # Selects units you own
192
+ # i.e. @bot.all_units.owned # => Units you own
193
+ # @return [Sc2::UnitGroup] workers
194
+ def owned
195
+ cached("#{__method__}:Self") do
196
+ select { |unit| unit.alliance == :Self }
197
+ end
198
+ end
199
+
191
200
  # Selects worker units
192
201
  # @return [Sc2::UnitGroup] workers
193
202
  def workers
@@ -261,7 +270,7 @@ module Sc2
261
270
  select(&:is_idle?)
262
271
  end
263
272
 
264
- # Selects units which have this ability available\
273
+ # Selects units which have this ability available
265
274
  # Queries API if necessary
266
275
  # @param [Integer] ability_id
267
276
  # @return [UnitGroup] units which have the ability available
@@ -269,6 +278,12 @@ module Sc2
269
278
  select { |unit| unit.ability_available?(ability_id) }
270
279
  end
271
280
 
281
+ # Checks whether any unit's first order matches these abilities
282
+ # @param ability_ids [Integer, Array<Integer>] accepts one or an array of Api::AbilityId
283
+ def is_performing_ability?(ability_ids)
284
+ any? { |unit| unit.is_performing_ability?(ability_ids) }
285
+ end
286
+
272
287
  # NEUTRAL ------------------------------------------
273
288
 
274
289
  # Selects mineral fields
data/lib/sc2ai/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Sc2
4
4
  # gem version
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
@@ -5,16 +5,26 @@
5
5
  *.proto
6
6
  *.zip
7
7
 
8
-
9
8
  # Gem-specific ignores
10
9
  .build/
11
10
  data/debug_observation.json
11
+ run_example_match.rb
12
12
 
13
- # Other
14
- .idea/
15
- vendor/bundle
13
+ # Generic ruby gitignores
14
+ *.gem
15
+ *.rbc
16
+ .config
17
+ coverage/
18
+ pkg/
16
19
  spec/
17
20
  test/
21
+ tmp/
22
+ .byebug_history
23
+ .bundle/
24
+ vendor/bundle
25
+ lib/bundler/man/
18
26
 
19
- # My ignores
27
+ # Other
28
+ .idea/
29
+ .vscode/
20
30
 
@@ -5,7 +5,7 @@ class <%= @classname %> < Sc2::Player::Bot
5
5
  def configure
6
6
  @realtime = false # Step-mode vs Bot, Realtime vs Humans
7
7
  @step_count = 2 # 2s/22.4 = ~89.29ms step cycle time allowance
8
- @enable_feature_layer = false; # Enables ui_ and spatial_ actions. Advanced, and has performance cost.
8
+ @enable_feature_layer = false # Enables ui_ and spatial_ actions. Advanced, and has performance cost.
9
9
  end
10
10
 
11
11
  def on_step