lib/sc2ai/protocol/data_pb.rb in sc2ai-0.1.0 vs lib/sc2ai/protocol/data_pb.rb in sc2ai-0.2.0

- old
+ new

@@ -5,34 +5,13 @@ require 'google/protobuf' require 'sc2ai/protocol/common_pb' -descriptor_data = "\n\x19sc2ai/protocol/data.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\"\xb9\x03\n\x0b\x41\x62ilityData\x12\x12\n\nability_id\x18\x01 \x01(\r\x12\x11\n\tlink_name\x18\x02 \x01(\t\x12\x12\n\nlink_index\x18\x03 \x01(\r\x12\x13\n\x0b\x62utton_name\x18\x04 \x01(\t\x12\x15\n\rfriendly_name\x18\x05 \x01(\t\x12\x0e\n\x06hotkey\x18\x06 \x01(\t\x12\x1c\n\x14remaps_to_ability_id\x18\x07 \x01(\r\x12\x11\n\tavailable\x18\x08 \x01(\x08\x12\'\n\x06target\x18\t \x01(\x0e\x32\x17.Api.AbilityData.Target\x12\x15\n\rallow_minimap\x18\n \x01(\x08\x12\x16\n\x0e\x61llow_autocast\x18\x0b \x01(\x08\x12\x13\n\x0bis_building\x18\x0c \x01(\x08\x12\x18\n\x10\x66ootprint_radius\x18\r \x01(\x02\x12\x1c\n\x14is_instant_placement\x18\x0e \x01(\x08\x12\x12\n\ncast_range\x18\x0f \x01(\x02\"I\n\x06Target\x12\x08\n\x04None\x10\x01\x12\t\n\x05Point\x10\x02\x12\x08\n\x04Unit\x10\x03\x12\x0f\n\x0bPointOrUnit\x10\x04\x12\x0f\n\x0bPointOrNone\x10\x05\"?\n\x0b\x44\x61mageBonus\x12!\n\tattribute\x18\x01 \x01(\x0e\x32\x0e.Api.Attribute\x12\r\n\x05\x62onus\x18\x02 \x01(\x02\"\xc1\x01\n\x06Weapon\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x16.Api.Weapon.TargetType\x12\x0e\n\x06\x64\x61mage\x18\x02 \x01(\x02\x12&\n\x0c\x64\x61mage_bonus\x18\x03 \x03(\x0b\x32\x10.Api.DamageBonus\x12\x0f\n\x07\x61ttacks\x18\x04 \x01(\r\x12\r\n\x05range\x18\x05 \x01(\x02\x12\r\n\x05speed\x18\x06 \x01(\x02\"*\n\nTargetType\x12\n\n\x06Ground\x10\x01\x12\x07\n\x03\x41ir\x10\x02\x12\x07\n\x03\x41ny\x10\x03\"\xf4\x03\n\x0cUnitTypeData\x12\x0f\n\x07unit_id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tavailable\x18\x03 \x01(\x08\x12\x12\n\ncargo_size\x18\x04 \x01(\r\x12\x14\n\x0cmineral_cost\x18\x0c \x01(\r\x12\x14\n\x0cvespene_cost\x18\r \x01(\r\x12\x15\n\rfood_required\x18\x0e \x01(\x02\x12\x15\n\rfood_provided\x18\x12 \x01(\x02\x12\x12\n\nability_id\x18\x0f \x01(\r\x12\x17\n\x04race\x18\x10 \x01(\x0e\x32\t.Api.Race\x12\x12\n\nbuild_time\x18\x11 \x01(\x02\x12\x13\n\x0bhas_vespene\x18\x13 \x01(\x08\x12\x14\n\x0chas_minerals\x18\x14 \x01(\x08\x12\x13\n\x0bsight_range\x18\x19 \x01(\x02\x12\x12\n\ntech_alias\x18\x15 \x03(\r\x12\x12\n\nunit_alias\x18\x16 \x01(\r\x12\x18\n\x10tech_requirement\x18\x17 \x01(\r\x12\x18\n\x10require_attached\x18\x18 \x01(\x08\x12\"\n\nattributes\x18\x08 \x03(\x0e\x32\x0e.Api.Attribute\x12\x16\n\x0emovement_speed\x18\t \x01(\x02\x12\r\n\x05\x61rmor\x18\n \x01(\x02\x12\x1c\n\x07weapons\x18\x0b \x03(\x0b\x32\x0b.Api.Weapon\"\x86\x01\n\x0bUpgradeData\x12\x12\n\nupgrade_id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x0cmineral_cost\x18\x03 \x01(\r\x12\x14\n\x0cvespene_cost\x18\x04 \x01(\r\x12\x15\n\rresearch_time\x18\x05 \x01(\x02\x12\x12\n\nability_id\x18\x06 \x01(\r\")\n\x08\x42uffData\x12\x0f\n\x07\x62uff_id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\"T\n\nEffectData\x12\x11\n\teffect_id\x18\x01 \x01(\r\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rfriendly_name\x18\x03 \x01(\t\x12\x0e\n\x06radius\x18\x04 \x01(\x02*\x9e\x01\n\tAttribute\x12\t\n\x05Light\x10\x01\x12\x0b\n\x07\x41rmored\x10\x02\x12\x0e\n\nBiological\x10\x03\x12\x0e\n\nMechanical\x10\x04\x12\x0b\n\x07Robotic\x10\x05\x12\x0b\n\x07Psionic\x10\x06\x12\x0b\n\x07Massive\x10\x07\x12\r\n\tStructure\x10\x08\x12\t\n\x05Hover\x10\t\x12\n\n\x06Heroic\x10\n\x12\x0c\n\x08Summoned\x10\x0b" +descriptor_data = "\n\x19sc2ai/protocol/data.proto\x12\x03\x41pi\x1a\x1bsc2ai/protocol/common.proto\"\x96\x06\n\x0b\x41\x62ilityData\x12\x17\n\nability_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x16\n\tlink_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nlink_index\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x18\n\x0b\x62utton_name\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rfriendly_name\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x13\n\x06hotkey\x18\x06 \x01(\tH\x05\x88\x01\x01\x12!\n\x14remaps_to_ability_id\x18\x07 \x01(\rH\x06\x88\x01\x01\x12\x16\n\tavailable\x18\x08 \x01(\x08H\x07\x88\x01\x01\x12,\n\x06target\x18\t \x01(\x0e\x32\x17.Api.AbilityData.TargetH\x08\x88\x01\x01\x12\x1a\n\rallow_minimap\x18\n \x01(\x08H\t\x88\x01\x01\x12\x1b\n\x0e\x61llow_autocast\x18\x0b \x01(\x08H\n\x88\x01\x01\x12\x18\n\x0bis_building\x18\x0c \x01(\x08H\x0b\x88\x01\x01\x12\x1d\n\x10\x66ootprint_radius\x18\r \x01(\x02H\x0c\x88\x01\x01\x12!\n\x14is_instant_placement\x18\x0e \x01(\x08H\r\x88\x01\x01\x12\x17\n\ncast_range\x18\x0f \x01(\x02H\x0e\x88\x01\x01\"^\n\x06Target\x12\x13\n\x0f\x45numTargetUnset\x10\x00\x12\x08\n\x04None\x10\x01\x12\t\n\x05Point\x10\x02\x12\x08\n\x04Unit\x10\x03\x12\x0f\n\x0bPointOrUnit\x10\x04\x12\x0f\n\x0bPointOrNone\x10\x05\x42\r\n\x0b_ability_idB\x0c\n\n_link_nameB\r\n\x0b_link_indexB\x0e\n\x0c_button_nameB\x10\n\x0e_friendly_nameB\t\n\x07_hotkeyB\x17\n\x15_remaps_to_ability_idB\x0c\n\n_availableB\t\n\x07_targetB\x10\n\x0e_allow_minimapB\x11\n\x0f_allow_autocastB\x0e\n\x0c_is_buildingB\x13\n\x11_footprint_radiusB\x17\n\x15_is_instant_placementB\r\n\x0b_cast_range\"a\n\x0b\x44\x61mageBonus\x12&\n\tattribute\x18\x01 \x01(\x0e\x32\x0e.Api.AttributeH\x00\x88\x01\x01\x12\x12\n\x05\x62onus\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x0c\n\n_attributeB\x08\n\x06_bonus\"\xa7\x02\n\x06Weapon\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x16.Api.Weapon.TargetTypeH\x00\x88\x01\x01\x12\x13\n\x06\x64\x61mage\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12&\n\x0c\x64\x61mage_bonus\x18\x03 \x03(\x0b\x32\x10.Api.DamageBonus\x12\x14\n\x07\x61ttacks\x18\x04 \x01(\rH\x02\x88\x01\x01\x12\x12\n\x05range\x18\x05 \x01(\x02H\x03\x88\x01\x01\x12\x12\n\x05speed\x18\x06 \x01(\x02H\x04\x88\x01\x01\"C\n\nTargetType\x12\x17\n\x13\x45numTargetTypeUnset\x10\x00\x12\n\n\x06Ground\x10\x01\x12\x07\n\x03\x41ir\x10\x02\x12\x07\n\x03\x41ny\x10\x03\x42\x07\n\x05_typeB\t\n\x07_damageB\n\n\x08_attacksB\x08\n\x06_rangeB\x08\n\x06_speed\"\xf9\x06\n\x0cUnitTypeData\x12\x14\n\x07unit_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x16\n\tavailable\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12\x17\n\ncargo_size\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x19\n\x0cmineral_cost\x18\x0c \x01(\rH\x04\x88\x01\x01\x12\x19\n\x0cvespene_cost\x18\r \x01(\rH\x05\x88\x01\x01\x12\x1a\n\rfood_required\x18\x0e \x01(\x02H\x06\x88\x01\x01\x12\x1a\n\rfood_provided\x18\x12 \x01(\x02H\x07\x88\x01\x01\x12\x17\n\nability_id\x18\x0f \x01(\rH\x08\x88\x01\x01\x12\x1c\n\x04race\x18\x10 \x01(\x0e\x32\t.Api.RaceH\t\x88\x01\x01\x12\x17\n\nbuild_time\x18\x11 \x01(\x02H\n\x88\x01\x01\x12\x18\n\x0bhas_vespene\x18\x13 \x01(\x08H\x0b\x88\x01\x01\x12\x19\n\x0chas_minerals\x18\x14 \x01(\x08H\x0c\x88\x01\x01\x12\x18\n\x0bsight_range\x18\x19 \x01(\x02H\r\x88\x01\x01\x12\x12\n\ntech_alias\x18\x15 \x03(\r\x12\x17\n\nunit_alias\x18\x16 \x01(\rH\x0e\x88\x01\x01\x12\x1d\n\x10tech_requirement\x18\x17 \x01(\rH\x0f\x88\x01\x01\x12\x1d\n\x10require_attached\x18\x18 \x01(\x08H\x10\x88\x01\x01\x12\"\n\nattributes\x18\x08 \x03(\x0e\x32\x0e.Api.Attribute\x12\x1b\n\x0emovement_speed\x18\t \x01(\x02H\x11\x88\x01\x01\x12\x12\n\x05\x61rmor\x18\n \x01(\x02H\x12\x88\x01\x01\x12\x1c\n\x07weapons\x18\x0b \x03(\x0b\x32\x0b.Api.WeaponB\n\n\x08_unit_idB\x07\n\x05_nameB\x0c\n\n_availableB\r\n\x0b_cargo_sizeB\x0f\n\r_mineral_costB\x0f\n\r_vespene_costB\x10\n\x0e_food_requiredB\x10\n\x0e_food_providedB\r\n\x0b_ability_idB\x07\n\x05_raceB\r\n\x0b_build_timeB\x0e\n\x0c_has_vespeneB\x0f\n\r_has_mineralsB\x0e\n\x0c_sight_rangeB\r\n\x0b_unit_aliasB\x13\n\x11_tech_requirementB\x13\n\x11_require_attachedB\x11\n\x0f_movement_speedB\x08\n\x06_armor\"\xff\x01\n\x0bUpgradeData\x12\x17\n\nupgrade_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0cmineral_cost\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x19\n\x0cvespene_cost\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x1a\n\rresearch_time\x18\x05 \x01(\x02H\x04\x88\x01\x01\x12\x17\n\nability_id\x18\x06 \x01(\rH\x05\x88\x01\x01\x42\r\n\x0b_upgrade_idB\x07\n\x05_nameB\x0f\n\r_mineral_costB\x0f\n\r_vespene_costB\x10\n\x0e_research_timeB\r\n\x0b_ability_id\"H\n\x08\x42uffData\x12\x14\n\x07\x62uff_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\n\n\x08_buff_idB\x07\n\x05_name\"\x9c\x01\n\nEffectData\x12\x16\n\teffect_id\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfriendly_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x13\n\x06radius\x18\x04 \x01(\x02H\x03\x88\x01\x01\x42\x0c\n\n_effect_idB\x07\n\x05_nameB\x10\n\x0e_friendly_nameB\t\n\x07_radius*\xb6\x01\n\tAttribute\x12\x16\n\x12\x45numAttributeUnset\x10\x00\x12\t\n\x05Light\x10\x01\x12\x0b\n\x07\x41rmored\x10\x02\x12\x0e\n\nBiological\x10\x03\x12\x0e\n\nMechanical\x10\x04\x12\x0b\n\x07Robotic\x10\x05\x12\x0b\n\x07Psionic\x10\x06\x12\x0b\n\x07Massive\x10\x07\x12\r\n\tStructure\x10\x08\x12\t\n\x05Hover\x10\t\x12\n\n\x06Heroic\x10\n\x12\x0c\n\x08Summoned\x10\x0b\x62\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end +pool.add_serialized_file(descriptor_data) module Api AbilityData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.AbilityData").msgclass AbilityData::Target = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.AbilityData.Target").enummodule DamageBonus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("Api.DamageBonus").msgclass