diff --git a/.protolint.yaml b/.protolint.yaml new file mode 100644 index 0000000000..ff9f13d7a0 --- /dev/null +++ b/.protolint.yaml @@ -0,0 +1,172 @@ +--- +# Lint directives. +lint: + # Linter files to ignore. + ignores: + - id: MESSAGE_NAMES_UPPER_CAMEL_CASE + files: + # NOTE: UNIX paths will be properly accepted by both UNIX and Windows. + - _example/proto/simple.proto + - id: ENUM_NAMES_UPPER_CAMEL_CASE + files: + - path/to/foo.proto + + # Linter files to walk. + files: + # The specific files to exclude. + exclude: + # NOTE: UNIX paths will be properly accepted by both UNIX and Windows. + - path/to/file + + # Linter directories to walk. + directories: + # The specific directories to exclude. + exclude: + # NOTE: UNIX paths will be properly accepted by both UNIX and Windows. + - path/to/dir + + # Linter rules. + # Run `protolint list` to see all available rules. + rules: + # Determines whether or not to include the default set of linters. + no_default: true + + + + # The specific linters to add. + add: + - FIELD_NAMES_LOWER_SNAKE_CASE + - MESSAGE_NAMES_UPPER_CAMEL_CASE + - INDENT + - FILE_NAMES_LOWER_SNAKE_CASE + - IMPORTS_SORTED + - PACKAGE_NAME_LOWER_CASE + - ORDER + - PROTO3_FIELDS_AVOID_REQUIRED + - PROTO3_GROUPS_AVOID + - SYNTAX_CONSISTENT + - QUOTE_CONSISTENT + # - REPEATED_FIELD_NAMES_PLURALIZED + # - ENUMS_HAVE_COMMENT + # - ENUM_FIELDS_HAVE_COMMENT + # - RPC_NAMES_CASE + # - FILE_HAS_COMMENT + # - MAX_LINE_LENGTH + # - SERVICE_NAMES_END_WITH + # - FIELD_NAMES_EXCLUDE_PREPOSITIONS + # - MESSAGE_NAMES_EXCLUDE_PREPOSITIONS + # - MESSAGES_HAVE_COMMENT + # - SERVICES_HAVE_COMMENT + # - RPCS_HAVE_COMMENT + # - FIELDS_HAVE_COMMENT + + # The specific linters to remove. + remove: + - RPC_NAMES_UPPER_CAMEL_CASE + + # Linter rules option. + rules_option: + # MAX_LINE_LENGTH rule option. + max_line_length: + # Enforces a maximum line length + max_chars: 120 + # Specifies the character count for tab characters + tab_chars: 2 + + # INDENT rule option. + indent: + # Available styles are 4(4-spaces), 2(2-spaces) or tab. + style: 4 + # Specifies if it should stop considering and inserting new lines at the appropriate positions + # when the inner elements are on the same line. Default is false. + not_insert_newline: true + + # FILE_NAMES_LOWER_SNAKE_CASE rule option. + file_names_lower_snake_case: + excludes: + - ../proto/invalidFileName.proto + + # QUOTE_CONSISTENT rule option. + quote_consistent: + # Available quote are "double" or "single". + quote: double + + # ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH rule option. + enum_field_names_zero_value_end_with: + suffix: INVALID + + # SERVICE_NAMES_END_WITH rule option. + service_names_end_with: + text: Service + + # FIELD_NAMES_EXCLUDE_PREPOSITIONS rule option. + field_names_exclude_prepositions: + # The specific prepositions to determine if the field name includes. + prepositions: + - for + - at + - of + # The specific keywords including prepositions to ignore. E.g. end_of_support is a term you would like to use, and skip checking. + excludes: + - end_of_support + + # REPEATED_FIELD_NAMES_PLURALIZED rule option. + ## The spec for each rules follows the implementation of https://github.com/gertd/go-pluralize. + ## Plus, you can refer to this rule's test code. + repeated_field_names_pluralized: + uncountable_rules: + - paper + irregular_rules: + Irregular: Regular + + # MESSAGE_NAMES_EXCLUDE_PREPOSITIONS rule option. + message_names_exclude_prepositions: + # The specific prepositions to determine if the message name includes. + prepositions: + - With + - For + - Of + # The specific keywords including prepositions to ignore. E.g. EndOfSupport is a term you would like to use, and skip checking. + excludes: + - EndOfSupport + - + # RPC_NAMES_CASE rule option. + rpc_names_case: + # The specific convention the name should conforms to. + ## Available conventions are "lower_camel_case", "upper_snake_case", or "lower_snake_case". + convention: upper_snake_case + + # MESSAGES_HAVE_COMMENT rule option. + messages_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # SERVICES_HAVE_COMMENT rule option. + services_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # RPCS_HAVE_COMMENT rule option. + rpcs_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # FIELDS_HAVE_COMMENT rule option. + fields_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # ENUMS_HAVE_COMMENT rule option. + enums_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # ENUM_FIELDS_HAVE_COMMENT rule option. + enum_fields_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # SYNTAX_CONSISTENT rule option. + syntax_consistent: + # Default is proto3. + version: proto3 diff --git a/src/main/protobuf/net/eagle0/common/common_unit.proto b/src/main/protobuf/net/eagle0/common/common_unit.proto index d3a02f40d8..e598bb0005 100644 --- a/src/main/protobuf/net/eagle0/common/common_unit.proto +++ b/src/main/protobuf/net/eagle0/common/common_unit.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.common; + +import "google/protobuf/wrappers.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.common"; option java_outer_classname = "Unit"; option objc_class_prefix = "E0G"; -package net.eagle0.common; - -import "google/protobuf/wrappers.proto"; - message CommonUnit { int32 eagle_player_id = 1; CommonHero hero = 2; diff --git a/src/main/protobuf/net/eagle0/common/game_setup_info.proto b/src/main/protobuf/net/eagle0/common/game_setup_info.proto index 1fb70f0193..c3062f5282 100644 --- a/src/main/protobuf/net/eagle0/common/game_setup_info.proto +++ b/src/main/protobuf/net/eagle0/common/game_setup_info.proto @@ -4,27 +4,27 @@ syntax = "proto3"; +package net.eagle0.common; + +import "src/main/protobuf/net/eagle0/common/player_info.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.common"; option java_outer_classname = "GameSetupInfo"; option objc_class_prefix = "E0G"; -package net.eagle0.common; - -import "src/main/protobuf/net/eagle0/common/player_info.proto"; - message GameSetupInfo { - int32 known_result_count = 1; - bytes current_game_state = 2; - NewGameRequest new_game_request = 3; + int32 known_result_count = 1; + bytes current_game_state = 2; + NewGameRequest new_game_request = 3; } message NewGameRequest { - string game_id = 1; - string hex_map_name = 2; - int32 month = 4; - bytes custom_map_bytes = 5; + string game_id = 1; + string hex_map_name = 2; + int32 month = 4; + bytes custom_map_bytes = 5; - repeated PlayerSetupInfo user_infos = 3; - int64 eagle_game_id = 6; -} \ No newline at end of file + repeated PlayerSetupInfo user_infos = 3; + int64 eagle_game_id = 6; +} diff --git a/src/main/protobuf/net/eagle0/common/hostility.proto b/src/main/protobuf/net/eagle0/common/hostility.proto index 2d13f301da..76a610c9a0 100644 --- a/src/main/protobuf/net/eagle0/common/hostility.proto +++ b/src/main/protobuf/net/eagle0/common/hostility.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.common; + option java_multiple_files = true; option java_package = "net.eagle0.common"; option java_outer_classname = "Hostility"; option objc_class_prefix = "E0G"; -package net.eagle0.common; - enum Hostility { UNKNOWN_HOSTILITY = 0; SELF_HOSTILITY = 1; ALLIED_HOSTILITY = 2; UNCONTROLLED_HOSTILITY = 3; ENEMY_HOSTILITY = 4; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/common/player_info.proto b/src/main/protobuf/net/eagle0/common/player_info.proto index 17e5db91ee..b38a61824f 100644 --- a/src/main/protobuf/net/eagle0/common/player_info.proto +++ b/src/main/protobuf/net/eagle0/common/player_info.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.common"; -option java_outer_classname = "PlayerInfo"; -option objc_class_prefix = "E0G"; - package net.eagle0.common; import "src/main/protobuf/net/eagle0/common/common_unit.proto"; import "src/main/protobuf/net/eagle0/common/victory_condition.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.common"; +option java_outer_classname = "PlayerInfo"; +option objc_class_prefix = "E0G"; + message PlayerSetupInfo { enum PlayerType { UNKNOWN = 0; @@ -41,4 +41,4 @@ message PlayerResolutionInfo { int32 eagle_faction_id = 1; repeated .net.eagle0.common.ResolvedUnit units = 2; .net.eagle0.common.EndGameCondition end_game_condition = 3; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/common/random_units.proto b/src/main/protobuf/net/eagle0/common/random_units.proto index c91f6efcb8..5a89b65301 100644 --- a/src/main/protobuf/net/eagle0/common/random_units.proto +++ b/src/main/protobuf/net/eagle0/common/random_units.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.common; + +import "src/main/protobuf/net/eagle0/common/common_unit.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.common"; option java_outer_classname = "RandomUnits"; option objc_class_prefix = "E0G"; -package net.eagle0.common; - -import "src/main/protobuf/net/eagle0/common/common_unit.proto"; - message RandomUnits { repeated CommonUnit units = 1; } diff --git a/src/main/protobuf/net/eagle0/common/shardok_internal_interface.proto b/src/main/protobuf/net/eagle0/common/shardok_internal_interface.proto index 2989581290..2703254ed6 100644 --- a/src/main/protobuf/net/eagle0/common/shardok_internal_interface.proto +++ b/src/main/protobuf/net/eagle0/common/shardok_internal_interface.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.common"; -option java_outer_classname = "EagleInterface"; -option objc_class_prefix = "E0G"; - package net.eagle0.common; import "src/main/protobuf/net/eagle0/common/game_setup_info.proto"; @@ -19,6 +14,11 @@ import "src/main/protobuf/net/eagle0/shardok/api/placement_command.proto"; import "src/main/protobuf/net/eagle0/shardok/common/hex_map.proto"; import "src/main/protobuf/net/eagle0/shardok/storage/action_result.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.common"; +option java_outer_classname = "EagleInterface"; +option objc_class_prefix = "E0G"; + service ShardokInternalInterface { rpc PostCommand(PostCommandRequest) returns (GameStatusResponse) {} rpc PostPlacementCommands(PlacementCommandsRequest) returns (GameStatusResponse) {} @@ -90,4 +90,4 @@ message HexMapRequest { message HexMapResponse { .net.eagle0.shardok.common.HexMap map = 1; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/common/victory_condition.proto b/src/main/protobuf/net/eagle0/common/victory_condition.proto index 5375a4c964..eadec0250d 100644 --- a/src/main/protobuf/net/eagle0/common/victory_condition.proto +++ b/src/main/protobuf/net/eagle0/common/victory_condition.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.common; + option java_multiple_files = true; option java_package = "net.eagle0.common"; option java_outer_classname = "VictoryCondition"; option objc_class_prefix = "E0G"; -package net.eagle0.common; - message EndGameCondition { oneof condition { VictoryCondition victory = 1; @@ -48,4 +48,3 @@ enum DrawType { DRAW_AFTER_MAX_ROUNDS = 1; } - diff --git a/src/main/protobuf/net/eagle0/eagle/api/action_result_view.proto b/src/main/protobuf/net/eagle0/eagle/api/action_result_view.proto index e9dc6efc5e..d5539debd8 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/action_result_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/action_result_view.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "ActionResultView"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; @@ -16,6 +11,11 @@ import "src/main/protobuf/net/eagle0/eagle/api/game_state_view.proto"; import "src/main/protobuf/net/eagle0/eagle/common/action_result_notification_details.proto"; import "src/main/protobuf/net/eagle0/eagle/common/action_result_type.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "ActionResultView"; +option objc_class_prefix = "E0G"; + message ActionResultView { .net.eagle0.eagle.common.ActionResultType type = 1; .google.protobuf.Int32Value player = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/army_view.proto b/src/main/protobuf/net/eagle0/eagle/api/army_view.proto index f8c8f0a6e6..d1520bed47 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/army_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/army_view.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.api; + +import "src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api"; option java_outer_classname = "ArmyView"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api; - -import "src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto"; - message ArmyView { int32 faction_id = 1; repeated .net.eagle0.eagle.common.CombatUnit units = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/available_command.proto b/src/main/protobuf/net/eagle0/eagle/api/available_command.proto index 4afdde0178..6c73c14809 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/available_command.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/available_command.proto @@ -4,15 +4,9 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "AvailableCommand"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; -import "src/main/protobuf/net/eagle0/eagle/api/hero_view.proto"; import "src/main/protobuf/net/eagle0/eagle/api/command/util/appropriate_battalions.proto"; import "src/main/protobuf/net/eagle0/eagle/api/command/util/army_stats.proto"; import "src/main/protobuf/net/eagle0/eagle/api/command/util/attack_decision_type.proto"; @@ -24,6 +18,7 @@ import "src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_combat_unit import "src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_unaffiliated_hero.proto"; import "src/main/protobuf/net/eagle0/eagle/api/command/util/improvement_type.proto"; import "src/main/protobuf/net/eagle0/eagle/api/command/util/province_orders.proto"; +import "src/main/protobuf/net/eagle0/eagle/api/hero_view.proto"; import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; import "src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto"; import "src/main/protobuf/net/eagle0/eagle/common/invitation.proto"; @@ -31,6 +26,11 @@ import "src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto"; import "src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto"; import "src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "AvailableCommand"; +option objc_class_prefix = "E0G"; + message AvailableCommand { // These values must be kept in sync with the corresponding values in selected_command.proto oneof sealed_value { @@ -325,8 +325,8 @@ message TributeAndFaction { int32 demanding_faction_id = 1; .net.eagle0.eagle.common.TributeAmount tribute_demanded = 2; - int32 heroCount = 3; - int32 troopCount = 4; + int32 hero_count = 3; + int32 troop_count = 4; } message ResolveTributeAvailableCommand { diff --git a/src/main/protobuf/net/eagle0/eagle/api/battalion_view.proto b/src/main/protobuf/net/eagle0/eagle/api/battalion_view.proto index fc32ad570c..6c43a550bc 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/battalion_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/battalion_view.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "BattalionView"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "BattalionView"; +option objc_class_prefix = "E0G"; + message BattalionView { int32 id = 1; .net.eagle0.eagle.common.BattalionTypeId type = 2; @@ -33,4 +33,4 @@ message BattalionViewDiff { .google.protobuf.DoubleValue new_morale = 3; .google.protobuf.DoubleValue new_training = 4; .google.protobuf.DoubleValue new_armament = 5; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/command.proto b/src/main/protobuf/net/eagle0/eagle/api/command.proto index d788c27c17..6e30dd4906 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command.proto @@ -4,23 +4,23 @@ syntax = "proto3"; +package net.eagle0.eagle.api; + +import "src/main/protobuf/net/eagle0/eagle/api/available_command.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api"; option java_outer_classname = "Command"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api; - -import "src/main/protobuf/net/eagle0/eagle/api/available_command.proto"; - message OneProvinceAvailableCommands { - int32 province_id = 1; - repeated AvailableCommand commands = 2; - int32 suggested_command_index = 3; + int32 province_id = 1; + repeated AvailableCommand commands = 2; + int32 suggested_command_index = 3; } message AvailableCommands { - int64 token = 1; - map commands_by_province = 2; - int32 suggested_province_id = 3; + int64 token = 1; + map commands_by_province = 2; + int32 suggested_province_id = 3; } diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/appropriate_battalions.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/appropriate_battalions.proto index 3c9288ba33..2e41c3a9f0 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/appropriate_battalions.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/appropriate_battalions.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "AppropriateBattalions"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - message SuitableBattalions { enum SuitabilityLevel { UNKNOWN = 0; diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/armed_battalion.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/armed_battalion.proto index 7650b2f130..17f47b2431 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/armed_battalion.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/armed_battalion.proto @@ -4,14 +4,14 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "ArmedBattalion"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - message ArmedBattalion { - int32 id = 1; - int32 new_armament = 2; -} \ No newline at end of file + int32 id = 1; + int32 new_armament = 2; +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/army_stats.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/army_stats.proto index 519989dba8..a2d1e07f1f 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/army_stats.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/army_stats.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + +import "src/main/protobuf/net/eagle0/common/hostility.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "ArmyStats"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - -import "src/main/protobuf/net/eagle0/common/hostility.proto"; - message ArmyStats { int32 faction_id = 1; int32 hero_count = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/attack_decision_type.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/attack_decision_type.proto index 154ec848d0..22b15b0a29 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/attack_decision_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/attack_decision_type.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "AttackDecisionTypes"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - enum AttackDecisionType { UNKNOWN_ATTACK_DECISION = 0; ADVANCE_DECISION = 1; diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/battalion_with_food_cost.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/battalion_with_food_cost.proto index 30ce77f5b8..817090635f 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/battalion_with_food_cost.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/battalion_with_food_cost.proto @@ -4,14 +4,14 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "BattalionWithFoodCost"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - message BattalionWithFoodCost { int32 battalion_id = 1; double monthly_food = 2; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/captured_hero_option.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/captured_hero_option.proto index 22c2ef9f01..23b233a096 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/captured_hero_option.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/captured_hero_option.proto @@ -4,18 +4,18 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "CapturedHeroOption"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - enum CapturedHeroOption { - UNKNOWN_CAPTURED_HERO_OPTION = 0; - RECRUIT_CAPTURED_HERO_OPTION = 1; - IMPRISON_CAPTURED_HERO_OPTION = 2; - EXILE_CAPTURED_HERO_OPTION = 3; - EXECUTE_CAPTURED_HERO_OPTION = 4; - RETURN_CAPTURED_HERO_OPTION = 5; -} \ No newline at end of file + UNKNOWN_CAPTURED_HERO_OPTION = 0; + RECRUIT_CAPTURED_HERO_OPTION = 1; + IMPRISON_CAPTURED_HERO_OPTION = 2; + EXILE_CAPTURED_HERO_OPTION = 3; + EXECUTE_CAPTURED_HERO_OPTION = 4; + RETURN_CAPTURED_HERO_OPTION = 5; +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/control_weather_type.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/control_weather_type.proto index 5fd07cce9d..e1ea4a433e 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/control_weather_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/control_weather_type.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "ControlWeatherType"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - enum ControlWeatherType { - CONTROL_WEATHER_UNKNOWN = 0; - CONTROL_WEATHER_START_BLIZZARD = 1; - CONTROL_WEATHER_END_BLIZZARD = 2; - CONTROL_WEATHER_START_DROUGHT = 3; - CONTROL_WEATHER_END_DROUGHT = 4; + CONTROL_WEATHER_UNKNOWN = 0; + CONTROL_WEATHER_START_BLIZZARD = 1; + CONTROL_WEATHER_END_BLIZZARD = 2; + CONTROL_WEATHER_START_DROUGHT = 3; + CONTROL_WEATHER_END_DROUGHT = 4; } diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/diplomacy_option_type.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/diplomacy_option_type.proto index 65426b3a09..eb5e453e1f 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/diplomacy_option_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/diplomacy_option_type.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "DiplomacyOptionType"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - enum DiplomacyOptionType { - UNKNOWN_DIPLOMACY_OPTION = 0; - TREATY_OPTION = 1; - INVITATION_OPTION = 2; + UNKNOWN_DIPLOMACY_OPTION = 0; + TREATY_OPTION = 1; + INVITATION_OPTION = 2; } diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_combat_unit.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_combat_unit.proto index de675040b8..f931046a8e 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_combat_unit.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_combat_unit.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api.command.util"; -option java_outer_classname = "ExpandedCombatUnit"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api.command.util; import "src/main/protobuf/net/eagle0/eagle/api/battalion_view.proto"; import "src/main/protobuf/net/eagle0/eagle/api/hero_view.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api.command.util"; +option java_outer_classname = "ExpandedCombatUnit"; +option objc_class_prefix = "E0G"; + message ExpandedCombatUnit { .net.eagle0.eagle.api.HeroView hero = 1; .net.eagle0.eagle.api.BattalionView battalion = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_unaffiliated_hero.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_unaffiliated_hero.proto index 4ad1720e10..0c63e339c3 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_unaffiliated_hero.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/expanded_unaffiliated_hero.proto @@ -4,17 +4,17 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api.command.util"; -option java_outer_classname = "ExpandedUnaffiliatedHero"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api.command.util; import "src/main/protobuf/net/eagle0/eagle/api/hero_view.proto"; import "src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero.proto"; import "src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api.command.util"; +option java_outer_classname = "ExpandedUnaffiliatedHero"; +option objc_class_prefix = "E0G"; + message ExpandedUnaffiliatedHero { .net.eagle0.eagle.api.HeroView hero = 1; .net.eagle0.eagle.common.UnaffiliatedHero.Type type = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/improvement_type.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/improvement_type.proto index c3c3d6e2dc..65e3eeaf08 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/improvement_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/improvement_type.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "ImprovementType"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - enum ImprovementType { - UNKNOWN = 0; - ECONOMY = 1; - AGRICULTURE = 2; - INFRASTRUCTURE = 3; - DEVASTATION = 4; -} \ No newline at end of file + UNKNOWN = 0; + ECONOMY = 1; + AGRICULTURE = 2; + INFRASTRUCTURE = 3; + DEVASTATION = 4; +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/command/util/province_orders.proto b/src/main/protobuf/net/eagle0/eagle/api/command/util/province_orders.proto index 6d40c83047..c7e017611b 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/command/util/province_orders.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/command/util/province_orders.proto @@ -4,16 +4,16 @@ syntax = "proto3"; +package net.eagle0.eagle.api.command.util; + +import "src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api.command.util"; option java_outer_classname = "ProvinceOrders"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api.command.util; - -import "src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto"; - message ProvinceOrders { - int32 province_id = 1; - .net.eagle0.eagle.common.ProvinceOrderType orders = 2; -} \ No newline at end of file + int32 province_id = 1; + .net.eagle0.eagle.common.ProvinceOrderType orders = 2; +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/eagle.proto b/src/main/protobuf/net/eagle0/eagle/api/eagle.proto index 38c833fa4a..9bbf58c46a 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/eagle.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/eagle.proto @@ -4,23 +4,23 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "EagleProto"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; +import "google/protobuf/wrappers.proto"; +import "src/main/protobuf/net/eagle0/common/game_setup_info.proto"; import "src/main/protobuf/net/eagle0/eagle/api/action_result_view.proto"; import "src/main/protobuf/net/eagle0/eagle/api/command.proto"; -import "src/main/protobuf/net/eagle0/eagle/api/selected_command.proto"; import "src/main/protobuf/net/eagle0/eagle/api/game_state_view.proto"; +import "src/main/protobuf/net/eagle0/eagle/api/selected_command.proto"; import "src/main/protobuf/net/eagle0/eagle/common/profession.proto"; import "src/main/protobuf/net/eagle0/shardok/api/action_result_view.proto"; import "src/main/protobuf/net/eagle0/shardok/api/command_descriptor.proto"; import "src/main/protobuf/net/eagle0/shardok/common/hex_map.proto"; -import "src/main/protobuf/net/eagle0/common/game_setup_info.proto"; -import "google/protobuf/wrappers.proto"; + +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "EagleProto"; +option objc_class_prefix = "E0G"; service Eagle { rpc EnterLobby (GamesRequest) returns (stream GamesReply) {} diff --git a/src/main/protobuf/net/eagle0/eagle/api/faction_view.proto b/src/main/protobuf/net/eagle0/eagle/api/faction_view.proto index 3850f1ddff..48e4580a62 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/faction_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/faction_view.proto @@ -4,17 +4,17 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "FactionView"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/eagle/common/treaty.proto"; import "src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "FactionView"; +option objc_class_prefix = "E0G"; + message FactionView { int32 id = 1; int32 faction_head_id = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/game_state_view.proto b/src/main/protobuf/net/eagle0/eagle/api/game_state_view.proto index c68ac47285..dfcea9e234 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/game_state_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/game_state_view.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "GameStateView"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; @@ -22,6 +17,11 @@ import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; import "src/main/protobuf/net/eagle0/eagle/common/round_phase.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "GameStateView"; +option objc_class_prefix = "E0G"; + message GameStateView { int32 current_round_id = 1; .net.eagle0.eagle.common.RoundPhase current_phase = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/hero_view.proto b/src/main/protobuf/net/eagle0/eagle/api/hero_view.proto index e2a2d55af2..5da7509a97 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/hero_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/hero_view.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.eagle.api; + +import "google/protobuf/wrappers.proto"; +import "src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto"; +import "src/main/protobuf/net/eagle0/eagle/common/profession.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api"; option java_outer_classname = "HeroView"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api; - -import "google/protobuf/wrappers.proto"; -import "src/main/protobuf/net/eagle0/eagle/common/profession.proto"; -import "src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto"; - message HeroView { int32 id = 1; .google.protobuf.Int32Value faction_id = 2; @@ -97,4 +97,4 @@ message HeroViewDiff { .google.protobuf.BoolValue new_start_fire_capable = 26; .google.protobuf.StringValue new_image_path = 27; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/incoming_army_view.proto b/src/main/protobuf/net/eagle0/eagle/api/incoming_army_view.proto index 64ca294a21..a8217eedf8 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/incoming_army_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/incoming_army_view.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.api; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api"; option java_outer_classname = "UnderAttackInfo"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api; - message IncomingArmyView { int32 faction_id = 1; int32 hero_count = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/province_view.proto b/src/main/protobuf/net/eagle0/eagle/api/province_view.proto index 8a370be233..7d9f27a433 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/province_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/province_view.proto @@ -4,18 +4,13 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "ProvinceView"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/eagle/api/army_view.proto"; import "src/main/protobuf/net/eagle0/eagle/api/battalion_view.proto"; -import "src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto"; import "src/main/protobuf/net/eagle0/eagle/api/incoming_army_view.proto"; +import "src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto"; import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; import "src/main/protobuf/net/eagle0/eagle/common/profession.proto"; import "src/main/protobuf/net/eagle0/eagle/common/province_event.proto"; @@ -23,6 +18,11 @@ import "src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto"; import "src/main/protobuf/net/eagle0/eagle/common/recruitment_info.proto"; import "src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "ProvinceView"; +option objc_class_prefix = "E0G"; + message ProvinceView { int32 id = 1; string name = 6; @@ -67,7 +67,7 @@ message FullProvinceInfo { StatWithCondition support = 13; - bool rulerIsTraveling = 15; + bool ruler_is_traveling = 15; int32 food_consumption = 16; @@ -146,4 +146,4 @@ message FullProvinceInfoDiff { repeated UnaffiliatedHeroBasics added_unaffiliated_heroes = 34; repeated int32 removed_unaffiliated_hero_ids = 35; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/api/selected_command.proto b/src/main/protobuf/net/eagle0/eagle/api/selected_command.proto index 6de26db47e..5cac064fe3 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/selected_command.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/selected_command.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "AvailableCommand"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; @@ -24,204 +19,209 @@ import "src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto"; import "src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto"; import "src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "AvailableCommand"; +option objc_class_prefix = "E0G"; + message SelectedCommand { - // These values must be kept in sync with the corresponding values in available_command.proto - oneof sealed_value { - AlmsSelectedCommand alms_command = 1; - ApprehendOutlawSelectedCommand apprehend_outlaw_selected_command = 2; - ArmTroopsSelectedCommand arm_troops_command = 3; - AttackDecisionSelectedCommand attack_decision_command = 4; - ControlWeatherSelectedCommand control_weather_selected_command = 5; - DefendSelectedCommand defend_command = 6; - DiplomacySelectedCommand diplomacy_command = 7; - DivineSelectedCommand divine_command = 8; - ExileVassalSelectedCommand exile_vassal_command = 9; - FeastSelectedCommand feast_command = 10; - FreeForAllDecisionSelectedCommand free_for_all_decision_command = 11; - HandleCapturedHeroSelectedCommand handle_captured_hero_command = 12; - HandleRiotCrackDownSelectedCommand handle_riot_crack_down_selected_command = 13; - HandleRiotDoNothingSelectedCommand handle_riot_do_nothing_selected_command = 14; - HandleRiotGiveSelectedCommand handle_riot_give_selected_command = 15; - HeroGiftSelectedCommand hero_gift_command = 16; - ImproveSelectedCommand improve_command = 17; - IssueOrdersSelectedCommand issue_orders_command = 18; - JailbreakSelectedCommand jailbreak_command = 19; - MarchSelectedCommand march_command = 20; - OrganizeTroopsSelectedCommand organize_troops_command = 21; - PleaseRecruitMeSelectedCommand please_recruit_me_command = 22; - ReconSelectedCommand recon_selected_command = 23; - RecruitHeroesSelectedCommand recruit_heroes_command = 24; - ResolveInvitationSelectedCommand resolve_invitation_command = 25; - ResolveTreatyOfferSelectedCommand resolve_treaty_offer_command = 26; - ResolveTributeSelectedCommand resolve_tribute_command = 27; - RestSelectedCommand rest_selected_command = 28; - ReturnSelectedCommand return_selected_command = 29; - SendSuppliesSelectedCommand send_supplies_command = 30; - StartEpidemicSelectedCommand start_epidemic_selected_command = 31; - SuppressBrigandsSelectedCommand suppress_brigands_command = 32; - SwearBrotherhoodSelectedCommand swear_brotherhood_command = 33; - TradeSelectedCommand trade_command = 34; - TrainSelectedCommand train_command = 35; - TravelSelectedCommand travel_command = 36; - } + // These values must be kept in sync with the corresponding values in available_command.proto + oneof sealed_value { + AlmsSelectedCommand alms_command = 1; + ApprehendOutlawSelectedCommand apprehend_outlaw_selected_command = 2; + ArmTroopsSelectedCommand arm_troops_command = 3; + AttackDecisionSelectedCommand attack_decision_command = 4; + ControlWeatherSelectedCommand control_weather_selected_command = 5; + DefendSelectedCommand defend_command = 6; + DiplomacySelectedCommand diplomacy_command = 7; + DivineSelectedCommand divine_command = 8; + ExileVassalSelectedCommand exile_vassal_command = 9; + FeastSelectedCommand feast_command = 10; + FreeForAllDecisionSelectedCommand free_for_all_decision_command = 11; + HandleCapturedHeroSelectedCommand handle_captured_hero_command = 12; + HandleRiotCrackDownSelectedCommand handle_riot_crack_down_selected_command = 13; + HandleRiotDoNothingSelectedCommand handle_riot_do_nothing_selected_command = 14; + HandleRiotGiveSelectedCommand handle_riot_give_selected_command = 15; + HeroGiftSelectedCommand hero_gift_command = 16; + ImproveSelectedCommand improve_command = 17; + IssueOrdersSelectedCommand issue_orders_command = 18; + JailbreakSelectedCommand jailbreak_command = 19; + MarchSelectedCommand march_command = 20; + OrganizeTroopsSelectedCommand organize_troops_command = 21; + PleaseRecruitMeSelectedCommand please_recruit_me_command = 22; + ReconSelectedCommand recon_selected_command = 23; + RecruitHeroesSelectedCommand recruit_heroes_command = 24; + ResolveInvitationSelectedCommand resolve_invitation_command = 25; + ResolveTreatyOfferSelectedCommand resolve_treaty_offer_command = 26; + ResolveTributeSelectedCommand resolve_tribute_command = 27; + RestSelectedCommand rest_selected_command = 28; + ReturnSelectedCommand return_selected_command = 29; + SendSuppliesSelectedCommand send_supplies_command = 30; + StartEpidemicSelectedCommand start_epidemic_selected_command = 31; + SuppressBrigandsSelectedCommand suppress_brigands_command = 32; + SwearBrotherhoodSelectedCommand swear_brotherhood_command = 33; + TradeSelectedCommand trade_command = 34; + TrainSelectedCommand train_command = 35; + TravelSelectedCommand travel_command = 36; + } } message AlmsSelectedCommand { - int32 amount = 1; - int32 acting_hero_id = 2; + int32 amount = 1; + int32 acting_hero_id = 2; } message ApprehendOutlawSelectedCommand { - int32 hero_id_to_apprehend = 1; - .google.protobuf.Int32Value battalion_id = 2; - int32 acting_hero_id = 3; + int32 hero_id_to_apprehend = 1; + .google.protobuf.Int32Value battalion_id = 2; + int32 acting_hero_id = 3; } message ArmTroopsSelectedCommand { - repeated .net.eagle0.eagle.api.command.util.ArmedBattalion armed_battalions = 1; + repeated .net.eagle0.eagle.api.command.util.ArmedBattalion armed_battalions = 1; } message AttackDecisionSelectedCommand { - .net.eagle0.eagle.api.command.util.AttackDecisionType decision = 1; - .net.eagle0.eagle.common.TributeAmount tribute = 2; + .net.eagle0.eagle.api.command.util.AttackDecisionType decision = 1; + .net.eagle0.eagle.common.TributeAmount tribute = 2; } message ControlWeatherSelectedCommand { - .net.eagle0.eagle.api.command.util.ControlWeatherType selected_type = 1; - int32 selected_province_id = 2; - int32 acting_hero_id = 3; + .net.eagle0.eagle.api.command.util.ControlWeatherType selected_type = 1; + int32 selected_province_id = 2; + int32 acting_hero_id = 3; } message DefendSelectedCommand { - int32 flee_province_id = 1; - repeated .net.eagle0.eagle.common.CombatUnit defending_units = 2; + int32 flee_province_id = 1; + repeated .net.eagle0.eagle.common.CombatUnit defending_units = 2; } message DiplomacySelectedCommand { - .net.eagle0.eagle.api.command.util.DiplomacyOptionType type = 1; - int32 target_faction_id = 2; - int32 sent_hero_id = 3; + .net.eagle0.eagle.api.command.util.DiplomacyOptionType type = 1; + int32 target_faction_id = 2; + int32 sent_hero_id = 3; } message DivineSelectedCommand { - repeated int32 hero_ids = 1; + repeated int32 hero_ids = 1; } message ExileVassalSelectedCommand { - int32 exiled_hero_id = 1; + int32 exiled_hero_id = 1; } message FeastSelectedCommand { } message FreeForAllDecisionSelectedCommand { - int32 province_id = 1; - .net.eagle0.eagle.api.command.util.AttackDecisionType decision = 2; + int32 province_id = 1; + .net.eagle0.eagle.api.command.util.AttackDecisionType decision = 2; } message HandleCapturedHeroSelectedCommand { - int32 hero_id = 1; - .net.eagle0.eagle.api.command.util.CapturedHeroOption selected_option = 2; + int32 hero_id = 1; + .net.eagle0.eagle.api.command.util.CapturedHeroOption selected_option = 2; } message HandleRiotCrackDownSelectedCommand { - int32 hero_id = 1; - .google.protobuf.Int32Value battalion_id = 2; - int32 acting_hero_id = 3; + int32 hero_id = 1; + .google.protobuf.Int32Value battalion_id = 2; + int32 acting_hero_id = 3; } message HandleRiotDoNothingSelectedCommand { } message HandleRiotGiveSelectedCommand { - int32 food_amount = 1; - int32 gold_amount = 2; + int32 food_amount = 1; + int32 gold_amount = 2; } message HeroGiftSelectedCommand { - int32 recipient_hero_id = 1; - int32 amount = 2; + int32 recipient_hero_id = 1; + int32 amount = 2; } message ImproveSelectedCommand { - .net.eagle0.eagle.api.command.util.ImprovementType improvement_type = 1; - int32 acting_hero_id = 2; + .net.eagle0.eagle.api.command.util.ImprovementType improvement_type = 1; + int32 acting_hero_id = 2; } message JailbreakSelectedCommand { - int32 gold = 1; - repeated int32 hero_ids = 2; - int32 destination_province_id = 3; + int32 gold = 1; + repeated int32 hero_ids = 2; + int32 destination_province_id = 3; } message MarchSelectedCommand { - int32 gold = 1; - int32 food = 2; - int32 origin_province = 3; - int32 destination_province_id = 4; + int32 gold = 1; + int32 food = 2; + int32 origin_province = 3; + int32 destination_province_id = 4; - repeated .net.eagle0.eagle.common.CombatUnit marching_units = 5; + repeated .net.eagle0.eagle.common.CombatUnit marching_units = 5; } message IssueOrdersSelectedCommand { - repeated .net.eagle0.eagle.api.command.util.ProvinceOrders new_orders = 1; - // Clears the focus province if not set - .google.protobuf.Int32Value new_focus_province = 2; + repeated .net.eagle0.eagle.api.command.util.ProvinceOrders new_orders = 1; + // Clears the focus province if not set + .google.protobuf.Int32Value new_focus_province = 2; } message OrganizeTroopsSelectedCommand { - message TroopsFromOtherBattalion { - int32 from_battalion_id = 1; - int32 count_moved = 2; - } + message TroopsFromOtherBattalion { + int32 from_battalion_id = 1; + int32 count_moved = 2; + } - message ChangedBattalion { - int32 id = 1; + message ChangedBattalion { + int32 id = 1; - repeated TroopsFromOtherBattalion troops_from_other_battalion = 2; - int32 new_troops = 3; - int32 dismissed_troops = 4; - } + repeated TroopsFromOtherBattalion troops_from_other_battalion = 2; + int32 new_troops = 3; + int32 dismissed_troops = 4; + } - message NewBattalion { - .net.eagle0.eagle.common.BattalionTypeId type = 1; + message NewBattalion { + .net.eagle0.eagle.common.BattalionTypeId type = 1; - repeated TroopsFromOtherBattalion troops_from_other_battalion = 2; - int32 new_troops = 3; - } + repeated TroopsFromOtherBattalion troops_from_other_battalion = 2; + int32 new_troops = 3; + } - repeated ChangedBattalion changed_battalions = 1; - repeated NewBattalion new_battalions = 2; + repeated ChangedBattalion changed_battalions = 1; + repeated NewBattalion new_battalions = 2; } message PleaseRecruitMeSelectedCommand { - int32 province_id = 1; - int32 hero_id = 2; - bool accept = 3; + int32 province_id = 1; + int32 hero_id = 2; + bool accept = 3; } message ReconSelectedCommand { - int32 acting_hero_id = 1; - int32 target_province_id = 2; + int32 acting_hero_id = 1; + int32 target_province_id = 2; } message RecruitHeroesSelectedCommand { - repeated int32 hero_ids = 1; + repeated int32 hero_ids = 1; } message ResolveInvitationSelectedCommand { - int32 originating_faction_id = 1; - net.eagle0.eagle.common.DiplomacyOfferStatus resolution = 2; + int32 originating_faction_id = 1; + net.eagle0.eagle.common.DiplomacyOfferStatus resolution = 2; } message ResolveTreatyOfferSelectedCommand { - int32 originating_faction_id = 1; - net.eagle0.eagle.common.DiplomacyOfferStatus resolution = 2; + int32 originating_faction_id = 1; + net.eagle0.eagle.common.DiplomacyOfferStatus resolution = 2; } message ResolveTributeSelectedCommand { - int32 demanding_faction_id = 1; - bool paid = 2; + int32 demanding_faction_id = 1; + bool paid = 2; } message RestSelectedCommand { @@ -231,39 +231,39 @@ message ReturnSelectedCommand { } message SendSuppliesSelectedCommand { - int32 gold = 1; - int32 food = 2; - int32 acting_hero_id = 3; - int32 destination_province_id = 4; + int32 gold = 1; + int32 food = 2; + int32 acting_hero_id = 3; + int32 destination_province_id = 4; } message StartEpidemicSelectedCommand { - int32 selected_province_id = 1; - int32 acting_hero_id = 2; + int32 selected_province_id = 1; + int32 acting_hero_id = 2; } message SuppressBrigandsSelectedCommand { - int32 hero_id = 1; - .google.protobuf.Int32Value battalion_id = 2; + int32 hero_id = 1; + .google.protobuf.Int32Value battalion_id = 2; } message SwearBrotherhoodSelectedCommand { - int32 new_brother_hero_id = 1; + int32 new_brother_hero_id = 1; } message TradeSelectedCommand { - enum TradeType { - UNKNOWN = 0; - BUY_FOOD = 1; - SELL_FOOD = 2; - } - TradeType trade_type = 1; + enum TradeType { + UNKNOWN = 0; + BUY_FOOD = 1; + SELL_FOOD = 2; + } + TradeType trade_type = 1; - int32 amount = 2; + int32 amount = 2; } message TrainSelectedCommand { - int32 acting_hero_id = 1; + int32 acting_hero_id = 1; } -message TravelSelectedCommand {} \ No newline at end of file +message TravelSelectedCommand {} diff --git a/src/main/protobuf/net/eagle0/eagle/api/shardok_battle_view.proto b/src/main/protobuf/net/eagle0/eagle/api/shardok_battle_view.proto index 0647b651ba..6a3da5252d 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/shardok_battle_view.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/shardok_battle_view.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.api"; -option java_outer_classname = "ShardokBattleView"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.api; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/common/hostility.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.api"; +option java_outer_classname = "ShardokBattleView"; +option objc_class_prefix = "E0G"; + message ShardokBattlePlayerInfo { int32 player_id = 1; int32 eagle_faction_id = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto b/src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto index 93b7953e4d..7f8e90e999 100644 --- a/src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto +++ b/src/main/protobuf/net/eagle0/eagle/api/stat_with_condition.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.api; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.api"; option java_outer_classname = "EagleProto"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.api; - message StatWithCondition { int32 stat = 1; diff --git a/src/main/protobuf/net/eagle0/eagle/common/action_result_notification_details.proto b/src/main/protobuf/net/eagle0/eagle/common/action_result_notification_details.proto index e08c9a1e8d..4c35d65245 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/action_result_notification_details.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/action_result_notification_details.proto @@ -15,145 +15,145 @@ option java_outer_classname = "ActionResultNotificationDetails"; option objc_class_prefix = "E0G"; message HeroBasics { - int32 id = 1; - string name = 2; + int32 id = 1; + string name = 2; } message JailbreakDetails { - repeated HeroBasics freed_heroes = 1; - repeated HeroBasics captured_heroes = 2; - repeated HeroBasics remaining_prisoners = 3; + repeated HeroBasics freed_heroes = 1; + repeated HeroBasics captured_heroes = 2; + repeated HeroBasics remaining_prisoners = 3; } message BattleDetails { - int32 defending_faction_id = 1; - int32 attacking_faction_id = 2; - bool attacker_victory = 3; + int32 defending_faction_id = 1; + int32 attacking_faction_id = 2; + bool attacker_victory = 3; } message WithdrewForTreatyDetails { - int32 withdrawing_faction_id = 1; - int32 withdrew_from_faction_id = 2; - int32 withdrew_from_province_id = 3; - int32 withdrew_to_province_id = 4; + int32 withdrawing_faction_id = 1; + int32 withdrew_from_faction_id = 2; + int32 withdrew_from_province_id = 3; + int32 withdrew_to_province_id = 4; } message InvitationDetails { - int32 offering_faction_id = 1; - int32 invited_faction_id = 2; - bool accepted = 3; + int32 offering_faction_id = 1; + int32 invited_faction_id = 2; + bool accepted = 3; } message QuestFulfilledDetails { - int32 hero_id = 1; - Quest fulfilled_quest = 2; + int32 hero_id = 1; + Quest fulfilled_quest = 2; } message QuestFailedDetails { - int32 hero_id = 1; - Quest failed_quest = 2; + int32 hero_id = 1; + Quest failed_quest = 2; } message ShatteredArmyDetails { - int32 faction_id = 1; - int32 province_id = 2; + int32 faction_id = 1; + int32 province_id = 2; - enum Reason { - SHATTERED_ARMY_REASON_UNKNOWN_UNSPECIFIED = 0; - SHATTERED_ARMY_REASON_BLIZZARD = 1; - SHATTERED_ARMY_REASON_WITHDRAW = 2; - } - Reason reason = 3; + enum Reason { + SHATTERED_ARMY_REASON_UNKNOWN_UNSPECIFIED = 0; + SHATTERED_ARMY_REASON_BLIZZARD = 1; + SHATTERED_ARMY_REASON_WITHDRAW = 2; + } + Reason reason = 3; } message VassalExiledDetails { - int32 faction_id = 1; - int32 province_id = 2; - int32 exiled_hero_id = 3; + int32 faction_id = 1; + int32 province_id = 2; + int32 exiled_hero_id = 3; } message OutlawApprehendedDetails { - int32 faction_id = 1; - int32 province_id = 2; - int32 apprehended_hero_id = 3; + int32 faction_id = 1; + int32 province_id = 2; + int32 apprehended_hero_id = 3; } message OutlawSpottedDetails { - int32 outlaw_hero_id = 1; - int32 province_id = 2; + int32 outlaw_hero_id = 1; + int32 province_id = 2; } message CapturedHeroExiledDetails { - int32 captured_from_faction_id = 1; - int32 province_id = 2; - int32 exiled_hero_id = 3; - int32 exiling_faction_id = 4; + int32 captured_from_faction_id = 1; + int32 province_id = 2; + int32 exiled_hero_id = 3; + int32 exiling_faction_id = 4; } message CapturedHeroExecutedDetails { - int32 captured_from_faction_id = 1; - int32 province_id = 2; - int32 executed_hero_id = 3; - int32 executing_faction_id = 4; + int32 captured_from_faction_id = 1; + int32 province_id = 2; + int32 executed_hero_id = 3; + int32 executing_faction_id = 4; } message CapturedHeroImprisonedDetails { - int32 captured_from_faction_id = 1; - int32 province_id = 2; - int32 imprisoned_hero_id = 3; - int32 imprisoning_faction_id = 4; + int32 captured_from_faction_id = 1; + int32 province_id = 2; + int32 imprisoned_hero_id = 3; + int32 imprisoning_faction_id = 4; } message CapturedHeroReturnedDetails { - int32 captured_from_faction_id = 1; - int32 province_id = 2; - int32 returned_hero_id = 3; - int32 returning_faction_id = 4; + int32 captured_from_faction_id = 1; + int32 province_id = 2; + int32 returned_hero_id = 3; + int32 returning_faction_id = 4; } message SwearBrotherhoodDetails { - int32 faction_id = 1; - int32 new_brother_hero_id = 2; + int32 faction_id = 1; + int32 new_brother_hero_id = 2; } message SuppressBeastsDetails { - int32 hero_id = 1; - int32 province_id = 2; - BeastType beast_type = 3; + int32 hero_id = 1; + int32 province_id = 2; + BeastType beast_type = 3; } message ProvinceHeldDetails { - int32 province_id = 1; - repeated int32 attacking_faction_ids = 2; - int32 defending_faction_id = 3; + int32 province_id = 1; + repeated int32 attacking_faction_ids = 2; + int32 defending_faction_id = 3; } message PrisonerExchangeDetails { - int32 hero1_id = 1; - int32 hero1_faction_id = 2; - int32 hero2_id = 3; - int32 hero2_faction_id = 4; + int32 hero1_id = 1; + int32 hero1_faction_id = 2; + int32 hero2_id = 3; + int32 hero2_faction_id = 4; } message NotificationDetails { - oneof sealed_value { - JailbreakDetails jailbreak = 1; - BattleDetails battle = 2; - WithdrewForTreatyDetails withdrew_for_treaty = 3; - InvitationDetails invitation = 4; - QuestFulfilledDetails quest_fulfilled = 5; - QuestFailedDetails quest_failed = 6; - ShatteredArmyDetails shattered_army_details = 7; - VassalExiledDetails vassal_exiled_details = 8; - OutlawApprehendedDetails outlaw_apprehended_details = 9; - OutlawSpottedDetails outlaw_spotted_details = 10; - CapturedHeroExiledDetails captured_hero_exiled_details = 11; - CapturedHeroExecutedDetails captured_hero_executed_details = 12; - CapturedHeroImprisonedDetails captured_hero_imprisoned_details = 16; - CapturedHeroReturnedDetails captured_hero_returned_details = 18; - SwearBrotherhoodDetails swear_brotherhood_details = 13; - SuppressBeastsDetails suppress_beasts_details = 14; - ProvinceHeldDetails province_held_details = 15; - PrisonerExchangeDetails prisoner_exchange_details = 17; - } + oneof sealed_value { + JailbreakDetails jailbreak = 1; + BattleDetails battle = 2; + WithdrewForTreatyDetails withdrew_for_treaty = 3; + InvitationDetails invitation = 4; + QuestFulfilledDetails quest_fulfilled = 5; + QuestFailedDetails quest_failed = 6; + ShatteredArmyDetails shattered_army_details = 7; + VassalExiledDetails vassal_exiled_details = 8; + OutlawApprehendedDetails outlaw_apprehended_details = 9; + OutlawSpottedDetails outlaw_spotted_details = 10; + CapturedHeroExiledDetails captured_hero_exiled_details = 11; + CapturedHeroExecutedDetails captured_hero_executed_details = 12; + CapturedHeroImprisonedDetails captured_hero_imprisoned_details = 16; + CapturedHeroReturnedDetails captured_hero_returned_details = 18; + SwearBrotherhoodDetails swear_brotherhood_details = 13; + SuppressBeastsDetails suppress_beasts_details = 14; + ProvinceHeldDetails province_held_details = 15; + PrisonerExchangeDetails prisoner_exchange_details = 17; + } } diff --git a/src/main/protobuf/net/eagle0/eagle/common/action_result_type.proto b/src/main/protobuf/net/eagle0/eagle/common/action_result_type.proto index a7af6f4bb3..22d0f19a0f 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/action_result_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/action_result_type.proto @@ -12,126 +12,126 @@ option java_outer_classname = "ActionResultType"; option objc_class_prefix = "E0G"; enum ActionResultType { - UNKNOWN_ACTION_UNSPECIFIED = 0; - END_PRISONER_EXCHANGE_PHASE = 113; - END_PROVINCE_EVENTS_PHASE = 1; - END_UNAFFILIATED_HERO_ACTIONS_PHASE = 2; - END_VASSAL_COMMANDS_PHASE = 3; - END_PLAYER_COMMANDS_PHASE = 4; - END_BATTLE_REQUEST_PHASE = 32; - END_BATTLE_COMMENCEMENT_PHASE = 26; - END_RESOLUTION_PHASE = 5; - END_AFTERMATH_PHASE = 44; - MARCH_ACTION = 6; - START_BATTLE = 7; - DEFEND = 8; - FLEE = 9; - GAME_START = 10; - REST = 11; - TRAIN = 12; - BATTLE_ENDED = 13; - ORGANIZE_TROOPS = 14; - NEW_ROUND_ACTION = 15; - NEW_YEAR_ACTION = 16; - IMPROVE = 17; - TRAVEL = 18; - RETURN = 19; - ARM_TROOPS = 20; - RECRUIT_HEROES = 21; - TRADE = 22; - HERO_APPEARS = 23; - HERO_MOVED = 24; - PROVINCE_CONQUERED = 25; - PROVINCE_HELD = 27; - FRIENDLY_MOVE = 28; - HERO_CHANGED = 29; - PRISONER_ESCAPED = 30; - REQUEST_BATTLE = 31; - ASSIGN_LEADERS = 33; - ORDERS_ISSUED = 34; - SENT_SUPPLIES = 35; - GIFTED_HERO = 36; - HEROES_DEPARTED = 37; - FEAST = 38; - SWEAR_BROTHERHOOD = 39; - FAILED_SWEAR_BROTHERHOOD = 40; - END_HERO_DEPARTURE_PHASE = 41; - SHIPMENT_ARRIVED = 42; - GIFTED_PROVINCE = 43; - CAPTURED_HERO_EXILED = 45; - CAPTURED_HERO_EXECUTED = 46; - CAPTURED_HERO_IMPRISONED = 47; - FACTION_DESTROYED = 48; - FACTION_LEADER_REMOVED = 49; - GAME_ENDED = 50; - END_DEFENSE_DECISION_PHASE = 51; - HERO_REJOINED = 52; - FOOD_CONSUMED = 53; - SUPPRESSED_BRIGANDS = 54; - PROVINCE_EVENTS_CHANGED = 55; - SUPPRESS_BRIGANDS_FAILED = 56; - NEW_QUESTS = 57; - QUEST_FULFILLED = 58; - DIVINED = 59; - TREATY_OFFERED = 60; - END_DIPLOMACY_RESOLUTION_PHASE = 61; - TREATY_ACCEPTED = 62; - TREATY_REJECTED = 63; - WITHDRAWAL_FOR_TREATY = 64; - END_RECON_RESOLUTION_PHASE = 65; - RECON_STARTED = 66; - RECON_SUCCEEDED = 67; - JAILBREAK_STARTED = 68; - JAILBREAK_EXECUTED = 69; - END_JAILBREAK_RESOLUTION_PHASE = 70; - END_PLEASE_RECRUIT_ME_PHASE = 71; - RESOLVE_PLEASE_RECRUIT_ME = 72; - TRIBUTE_PAID = 73; - TRIBUTE_REFUSED = 74; - END_ATTACK_DECISION_PHASE = 75; - TRIBUTE_DEMANDED = 76; - ARMY_WITHDREW = 77; - ARMY_ADVANCED = 78; - END_FREE_FOR_ALL_DECISION_PHASE = 79; - END_FREE_FOR_ALL_BATTLE_REQUEST_PHASE = 80; - END_FREE_FOR_ALL_BATTLE_RESOLUTION_PHASE = 81; - END_SALLY_DECISION_PHASE = 82; - END_SALLY_BATTLE_REQUEST_PHASE = 83; - END_SALLY_BATTLE_RESOLUTION_PHASE = 84; - ARMY_ADVANCED_TO_FREE_FOR_ALL = 85; - ARMY_WITHDREW_FROM_FREE_FOR_ALL = 86; - WITHDRAWN_ARMY_RETURNS = 87; - WON_FREE_FOR_ALL = 88; - FREE_FOR_ALL_DRAW = 89; - END_UNCONTESTED_CONQUEST_PHASE = 90; - INVITATION_ACCEPTED = 91; - INVITATION_REJECTED = 92; - FACTION_INVITED = 93; - QUEST_FAILED = 94; - ARMY_SHATTERED = 95; - AMBASSADOR_IMPRISONED = 96; - VASSAL_EXILED = 97; - OUTLAW_APPREHENDED = 98; - RIOT_AVERTED = 99; - RIOT_OCCURRED = 100; - END_HANDLE_RIOTS_PHASE = 101; - RIOT_SUPPRESSED = 102; - END_FORCED_TURN_BACK_PHASE = 103; - WEATHER_FORCED_TURN_BACK = 104; - WEATHER_FORCED_SUPPLIES_BACK = 105; - WEATHER_FORCED_SUPPLIES_LOST = 106; - FESTIVAL_ENDED = 108; - WEATHER_ALTERED = 109; - WEATHER_TOOK_EFFECT = 110; - EPIDEMIC_STARTED = 111; - EPIDEMIC_TOOK_EFFECT = 112; - PRISONERS_EXCHANGED = 114; - OFFER_INVALIDATED = 115; - OFFER_RESOLVED = 116; - INVITATION_RESOLVED = 117; - RIOT_AVERSION_FAILED = 118; - END_TREATY_TURN_BACK_PHASE = 119; - SET_UP_HOSTILE_ARMIES = 120; - QUEST_INVALIDATED = 121; - CAPTURED_HERO_RETURNED = 122; + UNKNOWN_ACTION_UNSPECIFIED = 0; + END_PRISONER_EXCHANGE_PHASE = 113; + END_PROVINCE_EVENTS_PHASE = 1; + END_UNAFFILIATED_HERO_ACTIONS_PHASE = 2; + END_VASSAL_COMMANDS_PHASE = 3; + END_PLAYER_COMMANDS_PHASE = 4; + END_BATTLE_REQUEST_PHASE = 32; + END_BATTLE_COMMENCEMENT_PHASE = 26; + END_RESOLUTION_PHASE = 5; + END_AFTERMATH_PHASE = 44; + MARCH_ACTION = 6; + START_BATTLE = 7; + DEFEND = 8; + FLEE = 9; + GAME_START = 10; + REST = 11; + TRAIN = 12; + BATTLE_ENDED = 13; + ORGANIZE_TROOPS = 14; + NEW_ROUND_ACTION = 15; + NEW_YEAR_ACTION = 16; + IMPROVE = 17; + TRAVEL = 18; + RETURN = 19; + ARM_TROOPS = 20; + RECRUIT_HEROES = 21; + TRADE = 22; + HERO_APPEARS = 23; + HERO_MOVED = 24; + PROVINCE_CONQUERED = 25; + PROVINCE_HELD = 27; + FRIENDLY_MOVE = 28; + HERO_CHANGED = 29; + PRISONER_ESCAPED = 30; + REQUEST_BATTLE = 31; + ASSIGN_LEADERS = 33; + ORDERS_ISSUED = 34; + SENT_SUPPLIES = 35; + GIFTED_HERO = 36; + HEROES_DEPARTED = 37; + FEAST = 38; + SWEAR_BROTHERHOOD = 39; + FAILED_SWEAR_BROTHERHOOD = 40; + END_HERO_DEPARTURE_PHASE = 41; + SHIPMENT_ARRIVED = 42; + GIFTED_PROVINCE = 43; + CAPTURED_HERO_EXILED = 45; + CAPTURED_HERO_EXECUTED = 46; + CAPTURED_HERO_IMPRISONED = 47; + FACTION_DESTROYED = 48; + FACTION_LEADER_REMOVED = 49; + GAME_ENDED = 50; + END_DEFENSE_DECISION_PHASE = 51; + HERO_REJOINED = 52; + FOOD_CONSUMED = 53; + SUPPRESSED_BRIGANDS = 54; + PROVINCE_EVENTS_CHANGED = 55; + SUPPRESS_BRIGANDS_FAILED = 56; + NEW_QUESTS = 57; + QUEST_FULFILLED = 58; + DIVINED = 59; + TREATY_OFFERED = 60; + END_DIPLOMACY_RESOLUTION_PHASE = 61; + TREATY_ACCEPTED = 62; + TREATY_REJECTED = 63; + WITHDRAWAL_FOR_TREATY = 64; + END_RECON_RESOLUTION_PHASE = 65; + RECON_STARTED = 66; + RECON_SUCCEEDED = 67; + JAILBREAK_STARTED = 68; + JAILBREAK_EXECUTED = 69; + END_JAILBREAK_RESOLUTION_PHASE = 70; + END_PLEASE_RECRUIT_ME_PHASE = 71; + RESOLVE_PLEASE_RECRUIT_ME = 72; + TRIBUTE_PAID = 73; + TRIBUTE_REFUSED = 74; + END_ATTACK_DECISION_PHASE = 75; + TRIBUTE_DEMANDED = 76; + ARMY_WITHDREW = 77; + ARMY_ADVANCED = 78; + END_FREE_FOR_ALL_DECISION_PHASE = 79; + END_FREE_FOR_ALL_BATTLE_REQUEST_PHASE = 80; + END_FREE_FOR_ALL_BATTLE_RESOLUTION_PHASE = 81; + END_SALLY_DECISION_PHASE = 82; + END_SALLY_BATTLE_REQUEST_PHASE = 83; + END_SALLY_BATTLE_RESOLUTION_PHASE = 84; + ARMY_ADVANCED_TO_FREE_FOR_ALL = 85; + ARMY_WITHDREW_FROM_FREE_FOR_ALL = 86; + WITHDRAWN_ARMY_RETURNS = 87; + WON_FREE_FOR_ALL = 88; + FREE_FOR_ALL_DRAW = 89; + END_UNCONTESTED_CONQUEST_PHASE = 90; + INVITATION_ACCEPTED = 91; + INVITATION_REJECTED = 92; + FACTION_INVITED = 93; + QUEST_FAILED = 94; + ARMY_SHATTERED = 95; + AMBASSADOR_IMPRISONED = 96; + VASSAL_EXILED = 97; + OUTLAW_APPREHENDED = 98; + RIOT_AVERTED = 99; + RIOT_OCCURRED = 100; + END_HANDLE_RIOTS_PHASE = 101; + RIOT_SUPPRESSED = 102; + END_FORCED_TURN_BACK_PHASE = 103; + WEATHER_FORCED_TURN_BACK = 104; + WEATHER_FORCED_SUPPLIES_BACK = 105; + WEATHER_FORCED_SUPPLIES_LOST = 106; + FESTIVAL_ENDED = 108; + WEATHER_ALTERED = 109; + WEATHER_TOOK_EFFECT = 110; + EPIDEMIC_STARTED = 111; + EPIDEMIC_TOOK_EFFECT = 112; + PRISONERS_EXCHANGED = 114; + OFFER_INVALIDATED = 115; + OFFER_RESOLVED = 116; + INVITATION_RESOLVED = 117; + RIOT_AVERSION_FAILED = 118; + END_TREATY_TURN_BACK_PHASE = 119; + SET_UP_HOSTILE_ARMIES = 120; + QUEST_INVALIDATED = 121; + CAPTURED_HERO_RETURNED = 122; } diff --git a/src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto b/src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto index 7075afb05f..ea3927426b 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "BattalionType"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - enum BattalionTypeId { LIGHT_INFANTRY = 0; HEAVY_INFANTRY = 1; diff --git a/src/main/protobuf/net/eagle0/eagle/common/beast_type.proto b/src/main/protobuf/net/eagle0/eagle/common/beast_type.proto index dea830adf7..3514234ac4 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/beast_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/beast_type.proto @@ -4,36 +4,36 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "BeastType"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - enum BeastType { - UNKNOWN = 0; - BRIGANDS = 1; - RACOONS = 2; - WOLVES = 3; - CHIMPANZEES = 4; - TIGERS = 5; - LIONS = 6; - BEARS = 7; - HIPPOPATAMUSES = 8; - CROCODILES = 9; - HIPPOGRYPHS = 10; - DRAGONS = 11; - ASSHOLES = 12; - BANDITS = 13; - HIGHWAYMEN = 14; - DACOITS = 15; - DESPERADOES = 16; - RUFFIANS = 17; - PIRATES = 18; - MARAUDERS = 19; - FREEBOOTERS = 20; - SPIDERS = 21; - NEER_DO_WELLS = 22; - SCALAWAGS = 23; -} \ No newline at end of file + UNKNOWN = 0; + BRIGANDS = 1; + RACOONS = 2; + WOLVES = 3; + CHIMPANZEES = 4; + TIGERS = 5; + LIONS = 6; + BEARS = 7; + HIPPOPATAMUSES = 8; + CROCODILES = 9; + HIPPOGRYPHS = 10; + DRAGONS = 11; + ASSHOLES = 12; + BANDITS = 13; + HIGHWAYMEN = 14; + DACOITS = 15; + DESPERADOES = 16; + RUFFIANS = 17; + PIRATES = 18; + MARAUDERS = 19; + FREEBOOTERS = 20; + SPIDERS = 21; + NEER_DO_WELLS = 22; + SCALAWAGS = 23; +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto b/src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto index 2cfa9e3333..6f61892aff 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + +import "google/protobuf/wrappers.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "Unit"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - -import "google/protobuf/wrappers.proto"; - message CombatUnit { int32 faction_id = 1; int32 hero_id = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/common/date.proto b/src/main/protobuf/net/eagle0/eagle/common/date.proto index 9bbad3712c..7b97e88139 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/date.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/date.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "Date"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - message Date { // Month is just an int value from 1-12. Clients can interpret with the appropriate month name. int32 month = 1; int32 year = 2; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto b/src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto index 1f3ce3fa88..1c538abd1a 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "DiplomacyOfferStatus"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - enum DiplomacyOfferStatus { - DIPLOMACY_OFFER_STATUS_UNKNOWN = 0; - DIPLOMACY_OFFER_STATUS_UNRESOLVED = 1; - DIPLOMACY_OFFER_STATUS_ACCEPTED = 2; - DIPLOMACY_OFFER_STATUS_REJECTED = 3; - DIPLOMACY_OFFER_STATUS_IMPRISONED = 4; -} \ No newline at end of file + DIPLOMACY_OFFER_STATUS_UNKNOWN = 0; + DIPLOMACY_OFFER_STATUS_UNRESOLVED = 1; + DIPLOMACY_OFFER_STATUS_ACCEPTED = 2; + DIPLOMACY_OFFER_STATUS_REJECTED = 3; + DIPLOMACY_OFFER_STATUS_IMPRISONED = 4; +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/invitation.proto b/src/main/protobuf/net/eagle0/eagle/common/invitation.proto index 98841a1f96..95a8f108a2 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/invitation.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/invitation.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + +import "src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "InviteOffer"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - -import "src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto"; - message Invitation { int32 originating_faction_id = 1; int32 target_faction_id = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/common/profession.proto b/src/main/protobuf/net/eagle0/eagle/common/profession.proto index 2bbef109ae..0c3cbc5dc0 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/profession.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/profession.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "Profession"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - enum Profession { UNKNOWN_PROFESSION = 0; MAGE = 1; diff --git a/src/main/protobuf/net/eagle0/eagle/common/province_event.proto b/src/main/protobuf/net/eagle0/eagle/common/province_event.proto index 6131cca92c..8ee433e15b 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/province_event.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/province_event.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.common"; -option java_outer_classname = "ProvinceEvent"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.common; import "src/main/protobuf/scalapb/scalapb.proto"; @@ -16,6 +11,11 @@ import "src/main/protobuf/scalapb/scalapb.proto"; import "src/main/protobuf/net/eagle0/eagle/common/beast_type.proto"; import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.common"; +option java_outer_classname = "ProvinceEvent"; +option objc_class_prefix = "E0G"; + message BeastsEvent { int32 count = 1; Date start_date = 2 [(scalapb.field).no_box = true]; diff --git a/src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto b/src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto index 4d1835358b..86be0742b4 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "ProvinceOrderType"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - enum ProvinceOrderType { UNKNOWN_ORDERS = 0; ENTRUST = 1; diff --git a/src/main/protobuf/net/eagle0/eagle/common/recruitment_info.proto b/src/main/protobuf/net/eagle0/eagle/common/recruitment_info.proto index 5716ad292a..1fdbacce1a 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/recruitment_info.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/recruitment_info.proto @@ -1,14 +1,14 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + +import "src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "RecruitmentInfo"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - -import "src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto"; - message RecruitmentInfo { RecruitmentStatus status = 1; .net.eagle0.eagle.common.Quest quest = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/common/round_phase.proto b/src/main/protobuf/net/eagle0/eagle/common/round_phase.proto index 9692d4142a..8795cf99ab 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/round_phase.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/round_phase.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "RoundPhase"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - enum RoundPhase { UNKNOWN_PHASE = 0; NEW_ROUND = 1; @@ -43,4 +43,4 @@ enum RoundPhase { message NewRoundPhase { .net.eagle0.eagle.common.RoundPhase value = 1; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/treaty.proto b/src/main/protobuf/net/eagle0/eagle/common/treaty.proto index b145f49b54..1da411db78 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/treaty.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/treaty.proto @@ -4,17 +4,17 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.common"; -option java_outer_classname = "Treaty"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.common; import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; import "src/main/protobuf/scalapb/scalapb.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.common"; +option java_outer_classname = "Treaty"; +option objc_class_prefix = "E0G"; + message Treaty { int32 target_faction_id = 1; .net.eagle0.eagle.common.Date end_date = 2 [(scalapb.field).no_box = true]; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto b/src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto index ba96b234cd..c81fe2150c 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto @@ -4,17 +4,17 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.common"; -option java_outer_classname = "TreatyOffer"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.common; import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; import "src/main/protobuf/net/eagle0/eagle/common/diplomacy_offer_status.proto"; import "src/main/protobuf/scalapb/scalapb.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.common"; +option java_outer_classname = "TreatyOffer"; +option objc_class_prefix = "E0G"; + message TreatyOffer { int32 originating_faction_id = 1; int32 target_faction_id = 2; @@ -23,4 +23,3 @@ message TreatyOffer { int32 messenger_origin_province_id = 5; DiplomacyOfferStatus status = 6; } - diff --git a/src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto b/src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto index db5ac9b237..f70a9321e9 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto @@ -4,14 +4,14 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "TributeAmount"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - message TributeAmount { int32 gold = 1; int32 food = 2; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero.proto b/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero.proto index f396245815..e702568251 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero.proto @@ -1,16 +1,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.common"; -option java_outer_classname = "UnaffiliatedHero"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.common; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; import "src/main/protobuf/net/eagle0/eagle/common/recruitment_info.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.common"; +option java_outer_classname = "UnaffiliatedHero"; +option objc_class_prefix = "E0G"; + message UnaffiliatedHero { enum Type { UNKNOWN = 0; @@ -40,4 +40,4 @@ message CapturedHero { int32 hero_id = 1; bool recruitment_attempted = 2; int32 previous_faction_id = 3; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto b/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto index 1db67be8ef..4685a8c797 100644 --- a/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto +++ b/src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto @@ -1,14 +1,14 @@ syntax = "proto3"; +package net.eagle0.eagle.common; + +import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.common"; option java_outer_classname = "UnaffiliatedHeroQuest"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.common; - -import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; - message Quest { int32 component_count = 1; int32 components_fulfilled = 2; @@ -94,4 +94,4 @@ message TreatyWithFactionQuest { message TreatyCountQuest { int32 treaty_count = 1; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/action_result.proto b/src/main/protobuf/net/eagle0/eagle/internal/action_result.proto index 23f3043548..667e404d3b 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/action_result.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/action_result.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "ActionResult"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; @@ -27,6 +22,11 @@ import "src/main/protobuf/net/eagle0/eagle/internal/hero.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/province.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/shardok_battle.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "ActionResult"; +option objc_class_prefix = "E0G"; + message ActionResult { .net.eagle0.eagle.common.ActionResultType type = 1; .google.protobuf.Int32Value player = 2; @@ -70,4 +70,3 @@ message ActionResult { repeated .net.eagle0.eagle.common.BattalionType new_battalion_types = 32; } - diff --git a/src/main/protobuf/net/eagle0/eagle/internal/army.proto b/src/main/protobuf/net/eagle0/eagle/internal/army.proto index ba671b680f..980d200ee3 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/army.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/army.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "Army"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; @@ -16,6 +11,11 @@ import "src/main/protobuf/net/eagle0/eagle/common/combat_unit.proto"; import "src/main/protobuf/net/eagle0/eagle/common/tribute_amount.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/supplies.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "Army"; +option objc_class_prefix = "E0G"; + message Army { int32 faction_id = 1; repeated .net.eagle0.eagle.common.CombatUnit units = 2; @@ -64,4 +64,3 @@ message TributePaid { } message Attacking {} message Withdrawing {} - diff --git a/src/main/protobuf/net/eagle0/eagle/internal/battalion.proto b/src/main/protobuf/net/eagle0/eagle/internal/battalion.proto index bab8c9d956..99dea915db 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/battalion.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/battalion.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + +import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "Battalion"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - -import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; - message Battalion { int32 id = 1; .net.eagle0.eagle.common.BattalionTypeId type = 2; @@ -24,4 +24,3 @@ message Battalion { string name = 7; } - diff --git a/src/main/protobuf/net/eagle0/eagle/internal/battle_revelation.proto b/src/main/protobuf/net/eagle0/eagle/internal/battle_revelation.proto index 10e16f9550..b8ce656198 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/battle_revelation.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/battle_revelation.proto @@ -4,21 +4,21 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "BattleRevelation"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - message BattleRevelation { - enum RevelationType { - UNKNOWN = 0; - WITHDREW = 1; - DID_BATTLE = 2; - } + enum RevelationType { + UNKNOWN = 0; + WITHDREW = 1; + DID_BATTLE = 2; + } - int32 province_id = 1; - int32 revealed_to_faction_id = 2; - RevelationType revelation_type = 3; + int32 province_id = 1; + int32 revealed_to_faction_id = 2; + RevelationType revelation_type = 3; } diff --git a/src/main/protobuf/net/eagle0/eagle/internal/changed_faction.proto b/src/main/protobuf/net/eagle0/eagle/internal/changed_faction.proto index f20133c738..05c7020673 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/changed_faction.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/changed_faction.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "ChangedFaction"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; @@ -18,6 +13,11 @@ import "src/main/protobuf/net/eagle0/eagle/common/treaty.proto"; import "src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/faction.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "ChangedFaction"; +option objc_class_prefix = "E0G"; + message TrustLevelUpdate { int32 target_faction_id = 1; int32 delta = 2; @@ -59,4 +59,4 @@ message ChangedFaction { .google.protobuf.Int32Value new_last_acted_province_id = 22; bool clear_last_acted_province_id = 23; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/changed_hero.proto b/src/main/protobuf/net/eagle0/eagle/internal/changed_hero.proto index 80f3d593c2..113a085be6 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/changed_hero.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/changed_hero.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + +import "google/protobuf/wrappers.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "ChangedHero"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - -import "google/protobuf/wrappers.proto"; - message ChangedHero { int32 id = 1; @@ -34,4 +34,4 @@ message ChangedHero { .google.protobuf.Int32Value charisma_xp_delta = 11; .google.protobuf.Int32Value wisdom_xp_delta = 13; .google.protobuf.Int32Value constitution_xp_delta = 12; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/changed_province.proto b/src/main/protobuf/net/eagle0/eagle/internal/changed_province.proto index 76c5c8c445..8aa93aec1d 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/changed_province.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/changed_province.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "ChangedProvince"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; @@ -21,6 +16,11 @@ import "src/main/protobuf/net/eagle0/eagle/internal/deferred_change.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/province.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/supplies.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "ChangedProvince"; +option objc_class_prefix = "E0G"; + message ChangedProvince { int32 id = 1; @@ -97,4 +97,4 @@ message ChangedProvince { repeated BattleRevelation added_battle_revelations = 49; repeated BattleRevelation removed_battle_revelations = 50; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/deferred_change.proto b/src/main/protobuf/net/eagle0/eagle/internal/deferred_change.proto index 9b1931962d..9c1995979d 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/deferred_change.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/deferred_change.proto @@ -4,41 +4,41 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "DeferredChange"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - message DeferredChange { - oneof sealed_value { - BlizzardStarted blizzard_started = 1; - BlizzardEnded blizzard_ended = 2; - EpidemicStarted epidemic_started = 3; - DroughtStarted drought_started = 4; - DroughtEnded drought_ended = 5; - } + oneof sealed_value { + BlizzardStarted blizzard_started = 1; + BlizzardEnded blizzard_ended = 2; + EpidemicStarted epidemic_started = 3; + DroughtStarted drought_started = 4; + DroughtEnded drought_ended = 5; + } } message BlizzardStarted { - int32 responsible_faction = 1; - int32 duration_months = 2; + int32 responsible_faction = 1; + int32 duration_months = 2; } message BlizzardEnded { - int32 responsible_faction = 1; + int32 responsible_faction = 1; } message EpidemicStarted { - int32 responsible_faction = 1; + int32 responsible_faction = 1; } message DroughtStarted { - int32 responsible_faction = 1; - int32 duration_months = 2; + int32 responsible_faction = 1; + int32 duration_months = 2; } message DroughtEnded { - int32 responsible_faction = 1; -} \ No newline at end of file + int32 responsible_faction = 1; +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/faction.proto b/src/main/protobuf/net/eagle0/eagle/internal/faction.proto index 8c3c53a7af..b4f88049d4 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/faction.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/faction.proto @@ -4,20 +4,20 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "Faction"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; +import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/eagle/api/province_view.proto"; import "src/main/protobuf/net/eagle0/eagle/common/action_result_notification_details.proto"; import "src/main/protobuf/net/eagle0/eagle/common/invitation.proto"; import "src/main/protobuf/net/eagle0/eagle/common/treaty.proto"; import "src/main/protobuf/net/eagle0/eagle/common/treaty_offer.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/faction_trust_level.proto"; -import "google/protobuf/wrappers.proto"; + +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "Faction"; +option objc_class_prefix = "E0G"; message PrestigeModifier { enum Type { diff --git a/src/main/protobuf/net/eagle0/eagle/internal/faction_trust_level.proto b/src/main/protobuf/net/eagle0/eagle/internal/faction_trust_level.proto index 924cccd725..b187f0c90b 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/faction_trust_level.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/faction_trust_level.proto @@ -4,14 +4,14 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "FactionTrustLevel"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - message FactionTrustLevel { - int32 target_faction_id = 1; - int32 value = 2; -} \ No newline at end of file + int32 target_faction_id = 1; + int32 value = 2; +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/game.proto b/src/main/protobuf/net/eagle0/eagle/internal/game.proto index 86d948e2d1..1741f249fe 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/game.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/game.proto @@ -4,16 +4,16 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + +import "src/main/protobuf/net/eagle0/eagle/internal/action_result.proto"; +import "src/main/protobuf/net/eagle0/eagle/internal/game_state.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "Game"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - -import "src/main/protobuf/net/eagle0/eagle/internal/game_state.proto"; -import "src/main/protobuf/net/eagle0/eagle/internal/action_result.proto"; - message PartialGame { int64 starting_index = 1; GameState starting_state = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/internal/game_parameters.proto b/src/main/protobuf/net/eagle0/eagle/internal/game_parameters.proto index b2ce19cc6d..a75969e463 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/game_parameters.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/game_parameters.proto @@ -4,17 +4,17 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "GameParameters"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; import "src/main/protobuf/net/eagle0/eagle/common/province_order_type.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/battalion.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "GameParameters"; +option objc_class_prefix = "E0G"; + message ProvinceOverrides { int32 province_id = 1; // can be 0 for a generic @@ -59,4 +59,3 @@ message GameParameters { repeated SetFaction set_factions = 5; } - diff --git a/src/main/protobuf/net/eagle0/eagle/internal/game_state.proto b/src/main/protobuf/net/eagle0/eagle/internal/game_state.proto index d666cc44a2..c15c9aefe4 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/game_state.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/game_state.proto @@ -4,24 +4,24 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "GameState"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/scalapb/scalapb.proto"; +import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; +import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; +import "src/main/protobuf/net/eagle0/eagle/common/round_phase.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/battalion.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/faction.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/hero.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/province.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/shardok_battle.proto"; -import "src/main/protobuf/net/eagle0/eagle/common/battalion_type.proto"; -import "src/main/protobuf/net/eagle0/eagle/common/round_phase.proto"; -import "src/main/protobuf/net/eagle0/eagle/common/date.proto"; + +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "GameState"; +option objc_class_prefix = "E0G"; enum RunStatus { UKNOWN = 0; diff --git a/src/main/protobuf/net/eagle0/eagle/internal/hero.proto b/src/main/protobuf/net/eagle0/eagle/internal/hero.proto index 09ea296462..13e1ca76dd 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/hero.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/hero.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "Hero"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/eagle/common/profession.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "Hero"; +option objc_class_prefix = "E0G"; + message Hero { int32 id = 1; .google.protobuf.Int32Value faction_id = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/internal/province.proto b/src/main/protobuf/net/eagle0/eagle/internal/province.proto index 23fa66b0a0..339e514867 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/province.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/province.proto @@ -4,11 +4,6 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "Province"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "google/protobuf/wrappers.proto"; @@ -23,6 +18,11 @@ import "src/main/protobuf/net/eagle0/eagle/internal/battle_revelation.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/deferred_change.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/supplies.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "Province"; +option objc_class_prefix = "E0G"; + message IncomingEndTurnAction { int32 from_faction_id = 1; int32 from_province_id = 2; diff --git a/src/main/protobuf/net/eagle0/eagle/internal/running_games.proto b/src/main/protobuf/net/eagle0/eagle/internal/running_games.proto index cc536a17b6..fbb691883b 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/running_games.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/running_games.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "RunningGames"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - message RunningGame { int64 game_id = 1; map user_to_pid = 2; @@ -19,4 +19,4 @@ message RunningGame { message RunningGames { repeated RunningGame running_games = 1; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/shardok_battle.proto b/src/main/protobuf/net/eagle0/eagle/internal/shardok_battle.proto index f03367a7be..f753ff7aa5 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/shardok_battle.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/shardok_battle.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "ActionResult"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "src/main/protobuf/net/eagle0/common/victory_condition.proto"; import "src/main/protobuf/net/eagle0/eagle/internal/army.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "ActionResult"; +option objc_class_prefix = "E0G"; + message ShardokPlayer { int32 eagle_fid = 1; bool is_defender = 2; @@ -42,4 +42,4 @@ message ShardokBattle { } BattleType battle_type = 8; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/shardok_results.proto b/src/main/protobuf/net/eagle0/eagle/internal/shardok_results.proto index a5ff77e182..496271b4c8 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/shardok_results.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/shardok_results.proto @@ -4,30 +4,30 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.eagle.internal"; -option java_outer_classname = "ShardokResults"; -option objc_class_prefix = "E0G"; - package net.eagle0.eagle.internal; import "src/main/protobuf/net/eagle0/shardok/api/action_result_view.proto"; import "src/main/protobuf/net/eagle0/shardok/api/command_descriptor.proto"; import "src/main/protobuf/net/eagle0/shardok/storage/action_result.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.eagle.internal"; +option java_outer_classname = "ShardokResults"; +option objc_class_prefix = "E0G"; + message ShardokResults { - string shardok_game_id = 1; - repeated .net.eagle0.shardok.storage.ActionResult results = 2; + string shardok_game_id = 1; + repeated .net.eagle0.shardok.storage.ActionResult results = 2; - message OnePlayerViews { - int32 faction_id = 1; - repeated .net.eagle0.shardok.api.ActionResultView result_views = 2; - .net.eagle0.shardok.api.AvailableCommands available_commands = 3; - } + message OnePlayerViews { + int32 faction_id = 1; + repeated .net.eagle0.shardok.api.ActionResultView result_views = 2; + .net.eagle0.shardok.api.AvailableCommands available_commands = 3; + } - repeated OnePlayerViews player_views = 3; + repeated OnePlayerViews player_views = 3; - int32 eagle_round_id = 4; + int32 eagle_round_id = 4; - bytes currentGameState = 5; -} \ No newline at end of file + bytes current_game_state = 5; +} diff --git a/src/main/protobuf/net/eagle0/eagle/internal/supplies.proto b/src/main/protobuf/net/eagle0/eagle/internal/supplies.proto index a3853dc5e1..e6c34f66d6 100644 --- a/src/main/protobuf/net/eagle0/eagle/internal/supplies.proto +++ b/src/main/protobuf/net/eagle0/eagle/internal/supplies.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.eagle.internal; + +import "google/protobuf/wrappers.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.eagle.internal"; option java_outer_classname = "Supplies"; option objc_class_prefix = "E0G"; -package net.eagle0.eagle.internal; - -import "google/protobuf/wrappers.proto"; - message Supplies { int32 food = 1; int32 gold = 2; diff --git a/src/main/protobuf/net/eagle0/shardok/api/action_result_view.proto b/src/main/protobuf/net/eagle0/shardok/api/action_result_view.proto index 106ba03b93..47312aa762 100644 --- a/src/main/protobuf/net/eagle0/shardok/api/action_result_view.proto +++ b/src/main/protobuf/net/eagle0/shardok/api/action_result_view.proto @@ -4,18 +4,18 @@ syntax = "proto3"; +package net.eagle0.shardok.api; + +import "google/protobuf/wrappers.proto"; +import "src/main/protobuf/net/eagle0/shardok/api/game_state_view.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/action_type.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.api"; option java_outer_classname = "ActionResult"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.api; - -import "src/main/protobuf/net/eagle0/shardok/api/game_state_view.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/action_type.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; -import "google/protobuf/wrappers.proto"; - message ActionResultView { .net.eagle0.shardok.common.ActionType type = 1; .google.protobuf.Int32Value player = 2; // optional; PlayerId who carried out action diff --git a/src/main/protobuf/net/eagle0/shardok/api/command_descriptor.proto b/src/main/protobuf/net/eagle0/shardok/api/command_descriptor.proto index c894d5d768..09349c47ff 100644 --- a/src/main/protobuf/net/eagle0/shardok/api/command_descriptor.proto +++ b/src/main/protobuf/net/eagle0/shardok/api/command_descriptor.proto @@ -4,18 +4,18 @@ syntax = "proto3"; +package net.eagle0.shardok.api; + +import "google/protobuf/wrappers.proto"; +import "src/main/protobuf/net/eagle0/shardok/api/odds_view.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/command_type.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.api"; option java_outer_classname = "CommandDescriptor"; option objc_class_prefix = "E0G"; -import "src/main/protobuf/net/eagle0/shardok/api/odds_view.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/command_type.proto"; -import "google/protobuf/wrappers.proto"; - -package net.eagle0.shardok.api; - message CommandDescriptor { int32 player = 1; .net.eagle0.shardok.common.CommandType type = 2; @@ -39,7 +39,7 @@ message CommandDescriptor { } message AvailableCommands { - // int64 token = 1; + // int64 token = 1; // Commands that can be posted now repeated CommandDescriptor current_command = 2; // Commands that client may display, but aren't currently postable, ie placement commands diff --git a/src/main/protobuf/net/eagle0/shardok/api/game_state_view.proto b/src/main/protobuf/net/eagle0/shardok/api/game_state_view.proto index 88a04bfc59..2f85a2aa68 100644 --- a/src/main/protobuf/net/eagle0/shardok/api/game_state_view.proto +++ b/src/main/protobuf/net/eagle0/shardok/api/game_state_view.proto @@ -4,20 +4,20 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.shardok.api"; -option java_outer_classname = "GameStateView"; -option objc_class_prefix = "E0G"; - package net.eagle0.shardok.api; +import "google/protobuf/wrappers.proto"; import "src/main/protobuf/net/eagle0/shardok/api/unit_view.proto"; import "src/main/protobuf/net/eagle0/shardok/common/game_status.proto"; import "src/main/protobuf/net/eagle0/shardok/common/hex_map.proto"; import "src/main/protobuf/net/eagle0/shardok/common/player_info.proto"; import "src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto"; import "src/main/protobuf/net/eagle0/shardok/common/weather.proto"; -import "google/protobuf/wrappers.proto"; + +option java_multiple_files = true; +option java_package = "net.eagle0.shardok.api"; +option java_outer_classname = "GameStateView"; +option objc_class_prefix = "E0G"; message PlayerTotals { int32 player_id = 1; diff --git a/src/main/protobuf/net/eagle0/shardok/api/odds_view.proto b/src/main/protobuf/net/eagle0/shardok/api/odds_view.proto index 1398279aea..0d25b69cd1 100644 --- a/src/main/protobuf/net/eagle0/shardok/api/odds_view.proto +++ b/src/main/protobuf/net/eagle0/shardok/api/odds_view.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.shardok.api; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.api"; option java_outer_classname = "OddsView"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.api; - message OddsView { int32 base_difficulty = 1; int32 terrain_factor = 2; diff --git a/src/main/protobuf/net/eagle0/shardok/api/placement_command.proto b/src/main/protobuf/net/eagle0/shardok/api/placement_command.proto index 4fc5ddb0c3..65eb85f1d8 100644 --- a/src/main/protobuf/net/eagle0/shardok/api/placement_command.proto +++ b/src/main/protobuf/net/eagle0/shardok/api/placement_command.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.shardok.api; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.api"; option java_outer_classname = "PlacementCommand"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.api; - message PlacementCommand { int32 unit_id = 1; int32 row = 2; diff --git a/src/main/protobuf/net/eagle0/shardok/api/unit_view.proto b/src/main/protobuf/net/eagle0/shardok/api/unit_view.proto index 0c71310477..42eb3ec853 100644 --- a/src/main/protobuf/net/eagle0/shardok/api/unit_view.proto +++ b/src/main/protobuf/net/eagle0/shardok/api/unit_view.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.shardok.api; + +import "google/protobuf/wrappers.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/hostility.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.api"; option java_outer_classname = "Unit"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.api; - -import "src/main/protobuf/net/eagle0/shardok/common/hostility.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; -import "google/protobuf/wrappers.proto"; - message HeroView { message ProfessionSpecificInfo { enum MultiroundMagicState { diff --git a/src/main/protobuf/net/eagle0/shardok/common/action_type.proto b/src/main/protobuf/net/eagle0/shardok/common/action_type.proto index 024dce3890..b8d1503e68 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/action_type.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/action_type.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "ActionType"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - enum ActionType { UNKNOWN_ACTION = 0; MELEE_ATTACK = 1; diff --git a/src/main/protobuf/net/eagle0/shardok/common/command_type.proto b/src/main/protobuf/net/eagle0/shardok/common/command_type.proto index 136bcd492e..48df94e3ae 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/command_type.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/command_type.proto @@ -1,12 +1,12 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "CommandType"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - enum CommandType { UNKNOWN_COMMAND = 0; MELEE_COMMAND = 1; diff --git a/src/main/protobuf/net/eagle0/shardok/common/coords.proto b/src/main/protobuf/net/eagle0/shardok/common/coords.proto index 7057c1b70c..6deb3ae4b8 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/coords.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/coords.proto @@ -4,14 +4,14 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "Coords"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - message Coords { int32 row = 1; int32 column = 2; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/shardok/common/game_status.proto b/src/main/protobuf/net/eagle0/shardok/common/game_status.proto index 3df80d5bd9..203667a4c1 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/game_status.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/game_status.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + +import "src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "GameStatus"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - -import "src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto"; - message GameStatus { enum State { UNKNOWN = 0; diff --git a/src/main/protobuf/net/eagle0/shardok/common/hex_map.proto b/src/main/protobuf/net/eagle0/shardok/common/hex_map.proto index a88db013dc..08b0e7134d 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/hex_map.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/hex_map.proto @@ -4,16 +4,16 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.shardok.common"; -option java_outer_classname = "HexMap"; -option objc_class_prefix = "E0G"; - package net.eagle0.shardok.common; import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; import "src/main/protobuf/net/eagle0/shardok/common/terrain.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.shardok.common"; +option java_outer_classname = "HexMap"; +option objc_class_prefix = "E0G"; + message StartingPositionList { repeated Coords positions = 1; } diff --git a/src/main/protobuf/net/eagle0/shardok/common/hex_map_direction.proto b/src/main/protobuf/net/eagle0/shardok/common/hex_map_direction.proto index 144a647dfc..22bddf87e2 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/hex_map_direction.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/hex_map_direction.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "HexMapDirection"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - enum HexMapDirection { NORTHEAST = 0; EAST = 1; @@ -18,4 +18,4 @@ enum HexMapDirection { SOUTHWEST = 3; WEST = 4; NORTHWEST = 5; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/shardok/common/hostility.proto b/src/main/protobuf/net/eagle0/shardok/common/hostility.proto index 16a11856c0..48eb44fadf 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/hostility.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/hostility.proto @@ -4,17 +4,17 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "Hostility"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - enum Hostility { UNKNOWN_HOSTILITY = 0; SELF_HOSTILITY = 1; ALLIED_HOSTILITY = 2; UNCONTROLLED_HOSTILITY = 3; ENEMY_HOSTILITY = 4; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/shardok/common/player_info.proto b/src/main/protobuf/net/eagle0/shardok/common/player_info.proto index c6e33cc50b..9b3eb457b7 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/player_info.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/player_info.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + +import "src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "PlayerInfo"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - -import "src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto"; - message PlayerInfo { int32 player_id = 1; bool is_defender = 2; diff --git a/src/main/protobuf/net/eagle0/shardok/common/terrain.proto b/src/main/protobuf/net/eagle0/shardok/common/terrain.proto index 0cd1dccbe0..9f1a360f55 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/terrain.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/terrain.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + +import "src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "HexMap"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - -import "src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto"; - message Terrain { enum Type { UNKNOWN = 0; @@ -28,4 +28,4 @@ message Terrain { }; Type type = 1; TileModifier modifier = 2; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto b/src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto index fc63437689..f6a49e6e21 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + +import "google/protobuf/wrappers.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "TileModifier"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - -import "google/protobuf/wrappers.proto"; - message TileModifier { message SingleModifier { .google.protobuf.DoubleValue integrity = 1; @@ -22,4 +22,4 @@ message TileModifier { SingleModifier ice = 3; SingleModifier castle = 4; SingleModifier snow = 5; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto b/src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto index 783ac6d45d..674a59b9e1 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto @@ -4,17 +4,17 @@ syntax = "proto3"; -option java_multiple_files = true; -option java_package = "net.eagle0.shardok.common"; -option java_outer_classname = "TileModifierWithCoords"; -option objc_class_prefix = "E0G"; - package net.eagle0.shardok.common; import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; import "src/main/protobuf/net/eagle0/shardok/common/tile_modifier.proto"; +option java_multiple_files = true; +option java_package = "net.eagle0.shardok.common"; +option java_outer_classname = "TileModifierWithCoords"; +option objc_class_prefix = "E0G"; + message TileModifierWithCoords { .net.eagle0.shardok.common.TileModifier modifiers = 1; .net.eagle0.shardok.common.Coords coords = 2; -} \ No newline at end of file +} diff --git a/src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto b/src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto index 581bf00ad3..8d23e14ac8 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/victory_condition.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "VictoryCondition"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - message EndGameCondition { oneof condition { VictoryCondition victory = 1; @@ -48,4 +48,3 @@ enum DrawType { DRAW_AFTER_MAX_ROUNDS = 1; } - diff --git a/src/main/protobuf/net/eagle0/shardok/common/weather.proto b/src/main/protobuf/net/eagle0/shardok/common/weather.proto index 5ea0c2dd9f..1a060a7f24 100644 --- a/src/main/protobuf/net/eagle0/shardok/common/weather.proto +++ b/src/main/protobuf/net/eagle0/shardok/common/weather.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.shardok.common; + +import "src/main/protobuf/net/eagle0/shardok/common/hex_map_direction.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.common"; option java_outer_classname = "Weather"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.common; - -import "src/main/protobuf/net/eagle0/shardok/common/hex_map_direction.proto"; - message Weather { enum Conditions { UNKNOWN = 0; diff --git a/src/main/protobuf/net/eagle0/shardok/storage/action_result.proto b/src/main/protobuf/net/eagle0/shardok/storage/action_result.proto index dac85507c8..0de9c07f67 100644 --- a/src/main/protobuf/net/eagle0/shardok/storage/action_result.proto +++ b/src/main/protobuf/net/eagle0/shardok/storage/action_result.proto @@ -4,21 +4,21 @@ syntax = "proto3"; +package net.eagle0.shardok.storage; + +import "google/protobuf/wrappers.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/action_type.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/game_status.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto"; +import "src/main/protobuf/net/eagle0/shardok/common/weather.proto"; +import "src/main/protobuf/net/eagle0/shardok/storage/odds.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.storage"; option java_outer_classname = "ActionResult"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.storage; - -import "src/main/protobuf/net/eagle0/shardok/common/coords.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/tile_modifier_with_coords.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/weather.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/game_status.proto"; -import "src/main/protobuf/net/eagle0/shardok/common/action_type.proto"; -import "src/main/protobuf/net/eagle0/shardok/storage/odds.proto"; -import "google/protobuf/wrappers.proto"; - // Represents a unit that was removed from the game, by capture, retreat, or flight. message ResolvedUnit { enum UnitStatus { @@ -50,7 +50,7 @@ message ActionResult { repeated .net.eagle0.shardok.common.TileModifierWithCoords changed_tile_modifiers = 11; repeated bytes changed_units_fb = 12; // changed units as flatbuffers, for memcpy in - // These are automatically removed from reserve units, if applicable + // These are automatically removed from reserve units, if applicable repeated ResolvedUnit resolved_units = 13; // Units that started the battle that are since removed repeated int32 became_hidden_units = 14; diff --git a/src/main/protobuf/net/eagle0/shardok/storage/action_with_resulting_state.proto b/src/main/protobuf/net/eagle0/shardok/storage/action_with_resulting_state.proto index ac60ea06d4..d1cfb6af8c 100644 --- a/src/main/protobuf/net/eagle0/shardok/storage/action_with_resulting_state.proto +++ b/src/main/protobuf/net/eagle0/shardok/storage/action_with_resulting_state.proto @@ -4,15 +4,15 @@ syntax = "proto3"; +package net.eagle0.shardok.storage; + +import "src/main/protobuf/net/eagle0/shardok/storage/action_result.proto"; + option java_multiple_files = true; option java_package = "net.eagle0.shardok"; option java_outer_classname = "ActionWithResultingState"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.storage; - -import "src/main/protobuf/net/eagle0/shardok/storage/action_result.proto"; - message ShardokActionWithResultingState { ActionResult action_result = 1; bytes state_after_fb = 2; diff --git a/src/main/protobuf/net/eagle0/shardok/storage/odds.proto b/src/main/protobuf/net/eagle0/shardok/storage/odds.proto index fc41018269..9e8f6f7c35 100644 --- a/src/main/protobuf/net/eagle0/shardok/storage/odds.proto +++ b/src/main/protobuf/net/eagle0/shardok/storage/odds.proto @@ -4,13 +4,13 @@ syntax = "proto3"; +package net.eagle0.shardok.storage; + option java_multiple_files = true; option java_package = "net.eagle0.shardok.storage"; option java_outer_classname = "Odds"; option objc_class_prefix = "E0G"; -package net.eagle0.shardok.storage; - message Odds { int32 base_difficulty = 1; int32 terrain_factor = 2; diff --git a/src/main/protobuf/scalapb/scalapb.proto b/src/main/protobuf/scalapb/scalapb.proto index 6cdac9b363..4685a0a2d6 100644 --- a/src/main/protobuf/scalapb/scalapb.proto +++ b/src/main/protobuf/scalapb/scalapb.proto @@ -2,6 +2,8 @@ syntax = "proto2"; package scalapb; +import "google/protobuf/descriptor.proto"; + option java_package = "scalapb.options"; option (options) = { @@ -9,367 +11,365 @@ option (options) = { flat_package: true }; -import "google/protobuf/descriptor.proto"; - message ScalaPbOptions { - // If set then it overrides the java_package and package. - optional string package_name = 1; + // If set then it overrides the java_package and package. + optional string package_name = 1; - // If true, the compiler does not append the proto base file name - // into the generated package name. If false (the default), the - // generated scala package name is the package_name.basename where - // basename is the proto file name without the .proto extension. - optional bool flat_package = 2; + // If true, the compiler does not append the proto base file name + // into the generated package name. If false (the default), the + // generated scala package name is the package_name.basename where + // basename is the proto file name without the .proto extension. + optional bool flat_package = 2; - // Adds the following imports at the top of the file (this is meant - // to provide implicit TypeMappers) - repeated string import = 3; + // Adds the following imports at the top of the file (this is meant + // to provide implicit TypeMappers) + repeated string import = 3; - // Text to add to the generated scala file. This can be used only - // when single_file is true. - repeated string preamble = 4; + // Text to add to the generated scala file. This can be used only + // when single_file is true. + repeated string preamble = 4; - // If true, all messages and enums (but not services) will be written - // to a single Scala file. - optional bool single_file = 5; + // If true, all messages and enums (but not services) will be written + // to a single Scala file. + optional bool single_file = 5; - // By default, wrappers defined at - // https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto, - // are mapped to an Option[T] where T is a primitive type. When this field - // is set to true, we do not perform this transformation. - optional bool no_primitive_wrappers = 7; + // By default, wrappers defined at + // https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto, + // are mapped to an Option[T] where T is a primitive type. When this field + // is set to true, we do not perform this transformation. + optional bool no_primitive_wrappers = 7; - // DEPRECATED. In ScalaPB <= 0.5.47, it was necessary to explicitly enable - // primitive_wrappers. This field remains here for backwards compatibility, - // but it has no effect on generated code. It is an error to set both - // `primitive_wrappers` and `no_primitive_wrappers`. - optional bool primitive_wrappers = 6; + // DEPRECATED. In ScalaPB <= 0.5.47, it was necessary to explicitly enable + // primitive_wrappers. This field remains here for backwards compatibility, + // but it has no effect on generated code. It is an error to set both + // `primitive_wrappers` and `no_primitive_wrappers`. + optional bool primitive_wrappers = 6; - // Scala type to be used for repeated fields. If unspecified, - // `scala.collection.Seq` will be used. - optional string collection_type = 8; + // Scala type to be used for repeated fields. If unspecified, + // `scala.collection.Seq` will be used. + optional string collection_type = 8; - // If set to true, all generated messages in this file will preserve unknown - // fields. - optional bool preserve_unknown_fields = 9 [default=true]; + // If set to true, all generated messages in this file will preserve unknown + // fields. + optional bool preserve_unknown_fields = 9 [default=true]; - // If defined, sets the name of the file-level object that would be generated. This - // object extends `GeneratedFileObject` and contains descriptors, and list of message - // and enum companions. - optional string object_name = 10; + // If defined, sets the name of the file-level object that would be generated. This + // object extends `GeneratedFileObject` and contains descriptors, and list of message + // and enum companions. + optional string object_name = 10; - // Whether to apply the options only to this file, or for the entire package (and its subpackages) - enum OptionsScope { - // Apply the options for this file only (default) - FILE = 0; + // Whether to apply the options only to this file, or for the entire package (and its subpackages) + enum OptionsScope { + // Apply the options for this file only (default) + FILE = 0; - // Apply the options for the entire package and its subpackages. - PACKAGE = 1; - } - // Experimental: scope to apply the given options. - optional OptionsScope scope = 11; + // Apply the options for the entire package and its subpackages. + PACKAGE = 1; + } + // Experimental: scope to apply the given options. + optional OptionsScope scope = 11; - // If true, lenses will be generated. - optional bool lenses = 12 [default=true]; + // If true, lenses will be generated. + optional bool lenses = 12 [default=true]; - // If true, then source-code info information will be included in the - // generated code - normally the source code info is cleared out to reduce - // code size. The source code info is useful for extracting source code - // location from the descriptors as well as comments. - optional bool retain_source_code_info = 13; + // If true, then source-code info information will be included in the + // generated code - normally the source code info is cleared out to reduce + // code size. The source code info is useful for extracting source code + // location from the descriptors as well as comments. + optional bool retain_source_code_info = 13; - // Scala type to be used for maps. If unspecified, - // `scala.collection.immutable.Map` will be used. - optional string map_type = 14; + // Scala type to be used for maps. If unspecified, + // `scala.collection.immutable.Map` will be used. + optional string map_type = 14; - // If true, no default values will be generated in message constructors. - // This setting can be overridden at the message-level and for individual - // fields. - optional bool no_default_values_in_constructor = 15; + // If true, no default values will be generated in message constructors. + // This setting can be overridden at the message-level and for individual + // fields. + optional bool no_default_values_in_constructor = 15; - /* Naming convention for generated enum values */ - enum EnumValueNaming { - AS_IN_PROTO = 0; // Enum value names in Scala use the same name as in the proto - CAMEL_CASE = 1; // Convert enum values to CamelCase in Scala. - } - optional EnumValueNaming enum_value_naming = 16; + /* Naming convention for generated enum values */ + enum EnumValueNaming { + AS_IN_PROTO = 0; // Enum value names in Scala use the same name as in the proto + CAMEL_CASE = 1; // Convert enum values to CamelCase in Scala. + } + optional EnumValueNaming enum_value_naming = 16; - // Indicate if prefix (enum name + optional underscore) should be removed in scala code - // Strip is applied before enum value naming changes. - optional bool enum_strip_prefix = 17 [default=false]; + // Indicate if prefix (enum name + optional underscore) should be removed in scala code + // Strip is applied before enum value naming changes. + optional bool enum_strip_prefix = 17 [default=false]; - // Scala type to use for bytes fields. - optional string bytes_type = 21; + // Scala type to use for bytes fields. + optional string bytes_type = 21; - // Enable java conversions for this file. - optional bool java_conversions = 23; + // Enable java conversions for this file. + optional bool java_conversions = 23; - // AuxMessageOptions enables you to set message-level options through package-scoped options. - // This is useful when you can't add a dependency on scalapb.proto from the proto file that - // defines the message. - message AuxMessageOptions { - // The fully-qualified name of the message in the proto name space. - optional string target = 1; + // AuxMessageOptions enables you to set message-level options through package-scoped options. + // This is useful when you can't add a dependency on scalapb.proto from the proto file that + // defines the message. + message AuxMessageOptions { + // The fully-qualified name of the message in the proto name space. + optional string target = 1; - // Options to apply to the message. If there are any options defined on the target message - // they take precedence over the options. - optional MessageOptions options = 2; - } + // Options to apply to the message. If there are any options defined on the target message + // they take precedence over the options. + optional MessageOptions options = 2; + } - // AuxFieldOptions enables you to set field-level options through package-scoped options. - // This is useful when you can't add a dependency on scalapb.proto from the proto file that - // defines the field. - message AuxFieldOptions { - // The fully-qualified name of the field in the proto name space. - optional string target = 1; + // AuxFieldOptions enables you to set field-level options through package-scoped options. + // This is useful when you can't add a dependency on scalapb.proto from the proto file that + // defines the field. + message AuxFieldOptions { + // The fully-qualified name of the field in the proto name space. + optional string target = 1; - // Options to apply to the field. If there are any options defined on the target message - // they take precedence over the options. - optional FieldOptions options = 2; - } + // Options to apply to the field. If there are any options defined on the target message + // they take precedence over the options. + optional FieldOptions options = 2; + } - // AuxEnumOptions enables you to set enum-level options through package-scoped options. - // This is useful when you can't add a dependency on scalapb.proto from the proto file that - // defines the enum. - message AuxEnumOptions { - // The fully-qualified name of the enum in the proto name space. - optional string target = 1; + // AuxEnumOptions enables you to set enum-level options through package-scoped options. + // This is useful when you can't add a dependency on scalapb.proto from the proto file that + // defines the enum. + message AuxEnumOptions { + // The fully-qualified name of the enum in the proto name space. + optional string target = 1; - // Options to apply to the enum. If there are any options defined on the target enum - // they take precedence over the options. - optional EnumOptions options = 2; - } + // Options to apply to the enum. If there are any options defined on the target enum + // they take precedence over the options. + optional EnumOptions options = 2; + } - // AuxEnumValueOptions enables you to set enum value level options through package-scoped - // options. This is useful when you can't add a dependency on scalapb.proto from the proto - // file that defines the enum. - message AuxEnumValueOptions { - // The fully-qualified name of the enum value in the proto name space. - optional string target = 1; + // AuxEnumValueOptions enables you to set enum value level options through package-scoped + // options. This is useful when you can't add a dependency on scalapb.proto from the proto + // file that defines the enum. + message AuxEnumValueOptions { + // The fully-qualified name of the enum value in the proto name space. + optional string target = 1; - // Options to apply to the enum value. If there are any options defined on - // the target enum value they take precedence over the options. - optional EnumValueOptions options = 2; - } + // Options to apply to the enum value. If there are any options defined on + // the target enum value they take precedence over the options. + optional EnumValueOptions options = 2; + } - // List of message options to apply to some messages. - repeated AuxMessageOptions aux_message_options = 18; + // List of message options to apply to some messages. + repeated AuxMessageOptions aux_message_options = 18; - // List of message options to apply to some fields. - repeated AuxFieldOptions aux_field_options = 19; + // List of message options to apply to some fields. + repeated AuxFieldOptions aux_field_options = 19; - // List of message options to apply to some enums. - repeated AuxEnumOptions aux_enum_options = 20; + // List of message options to apply to some enums. + repeated AuxEnumOptions aux_enum_options = 20; - // List of enum value options to apply to some enum values. - repeated AuxEnumValueOptions aux_enum_value_options = 22; + // List of enum value options to apply to some enum values. + repeated AuxEnumValueOptions aux_enum_value_options = 22; - // List of preprocessors to apply. - repeated string preprocessors = 24; + // List of preprocessors to apply. + repeated string preprocessors = 24; - repeated FieldTransformation field_transformations = 25; + repeated FieldTransformation field_transformations = 25; - // Ignores all transformations for this file. This is meant to allow specific files to - // opt out from transformations inherited through package-scoped options. - optional bool ignore_all_transformations = 26; + // Ignores all transformations for this file. This is meant to allow specific files to + // opt out from transformations inherited through package-scoped options. + optional bool ignore_all_transformations = 26; - // If true, getters will be generated. - optional bool getters = 27 [default=true]; + // If true, getters will be generated. + optional bool getters = 27 [default=true]; - // For use in tests only. Inhibit Java conversions even when when generator parameters - // request for it. - optional bool test_only_no_java_conversions = 999; + // For use in tests only. Inhibit Java conversions even when when generator parameters + // request for it. + optional bool test_only_no_java_conversions = 999; extensions 1000 to max; } extend google.protobuf.FileOptions { - // File-level optionals for ScalaPB. - // Extension number officially assigned by protobuf-global-extension-registry@google.com - optional ScalaPbOptions options = 1020; + // File-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional ScalaPbOptions options = 1020; } message MessageOptions { - // Additional classes and traits to mix in to the case class. - repeated string extends = 1; + // Additional classes and traits to mix in to the case class. + repeated string extends = 1; - // Additional classes and traits to mix in to the companion object. - repeated string companion_extends = 2; + // Additional classes and traits to mix in to the companion object. + repeated string companion_extends = 2; - // Custom annotations to add to the generated case class. - repeated string annotations = 3; + // Custom annotations to add to the generated case class. + repeated string annotations = 3; - // All instances of this message will be converted to this type. An implicit TypeMapper - // must be present. - optional string type = 4; + // All instances of this message will be converted to this type. An implicit TypeMapper + // must be present. + optional string type = 4; - // Custom annotations to add to the companion object of the generated class. - repeated string companion_annotations = 5; + // Custom annotations to add to the companion object of the generated class. + repeated string companion_annotations = 5; - // Additional classes and traits to mix in to generated sealed_oneof base trait. - repeated string sealed_oneof_extends = 6; + // Additional classes and traits to mix in to generated sealed_oneof base trait. + repeated string sealed_oneof_extends = 6; - // If true, when this message is used as an optional field, do not wrap it in an `Option`. - // This is equivalent of setting `(field).no_box` to true on each field with the message type. - optional bool no_box = 7; + // If true, when this message is used as an optional field, do not wrap it in an `Option`. + // This is equivalent of setting `(field).no_box` to true on each field with the message type. + optional bool no_box = 7; - // Custom annotations to add to the generated `unknownFields` case class field. - repeated string unknown_fields_annotations = 8; + // Custom annotations to add to the generated `unknownFields` case class field. + repeated string unknown_fields_annotations = 8; - // If true, no default values will be generated in message constructors. - // If set (to true or false), the message-level setting overrides the - // file-level value, and can be overridden by the field-level setting. - optional bool no_default_values_in_constructor = 9; + // If true, no default values will be generated in message constructors. + // If set (to true or false), the message-level setting overrides the + // file-level value, and can be overridden by the field-level setting. + optional bool no_default_values_in_constructor = 9; extensions 1000 to max; } extend google.protobuf.MessageOptions { - // Message-level optionals for ScalaPB. - // Extension number officially assigned by protobuf-global-extension-registry@google.com - optional MessageOptions message = 1020; + // Message-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional MessageOptions message = 1020; } // Represents a custom Collection type in Scala. This allows ScalaPB to integrate with // collection types that are different enough from the ones in the standard library. message Collection { - // Type of the collection - optional string type = 1; + // Type of the collection + optional string type = 1; - // Set to true if this collection type is not allowed to be empty, for example - // cats.data.NonEmptyList. When true, ScalaPB will not generate `clearX` for the repeated - // field and not provide a default argument in the constructor. - optional bool non_empty = 2; + // Set to true if this collection type is not allowed to be empty, for example + // cats.data.NonEmptyList. When true, ScalaPB will not generate `clearX` for the repeated + // field and not provide a default argument in the constructor. + optional bool non_empty = 2; - // An Adapter is a Scala object available at runtime that provides certain static methods - // that can operate on this collection type. - optional string adapter = 3; + // An Adapter is a Scala object available at runtime that provides certain static methods + // that can operate on this collection type. + optional string adapter = 3; } message FieldOptions { - optional string type = 1; + optional string type = 1; - optional string scala_name = 2; + optional string scala_name = 2; - // Can be specified only if this field is repeated. If unspecified, - // it falls back to the file option named `collection_type`, which defaults - // to `scala.collection.Seq`. - optional string collection_type = 3; + // Can be specified only if this field is repeated. If unspecified, + // it falls back to the file option named `collection_type`, which defaults + // to `scala.collection.Seq`. + optional string collection_type = 3; - optional Collection collection = 8; + optional Collection collection = 8; - // If the field is a map, you can specify custom Scala types for the key - // or value. - optional string key_type = 4; - optional string value_type = 5; + // If the field is a map, you can specify custom Scala types for the key + // or value. + optional string key_type = 4; + optional string value_type = 5; - // Custom annotations to add to the field. - repeated string annotations = 6; + // Custom annotations to add to the field. + repeated string annotations = 6; - // Can be specified only if this field is a map. If unspecified, - // it falls back to the file option named `map_type` which defaults to - // `scala.collection.immutable.Map` - optional string map_type = 7; + // Can be specified only if this field is a map. If unspecified, + // it falls back to the file option named `map_type` which defaults to + // `scala.collection.immutable.Map` + optional string map_type = 7; - // If true, no default value will be generated for this field in the message - // constructor. If this field is set, it has the highest precedence and overrides the - // values at the message-level and file-level. - optional bool no_default_value_in_constructor = 9; + // If true, no default value will be generated for this field in the message + // constructor. If this field is set, it has the highest precedence and overrides the + // values at the message-level and file-level. + optional bool no_default_value_in_constructor = 9; - // Do not box this value in Option[T]. If set, this overrides MessageOptions.no_box - optional bool no_box = 30; + // Do not box this value in Option[T]. If set, this overrides MessageOptions.no_box + optional bool no_box = 30; - // Like no_box it does not box a value in Option[T], but also fails parsing when a value - // is not provided. This enables to emulate required fields in proto3. - optional bool required = 31; + // Like no_box it does not box a value in Option[T], but also fails parsing when a value + // is not provided. This enables to emulate required fields in proto3. + optional bool required = 31; extensions 1000 to max; } extend google.protobuf.FieldOptions { - // Field-level optionals for ScalaPB. - // Extension number officially assigned by protobuf-global-extension-registry@google.com - optional FieldOptions field = 1020; + // Field-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional FieldOptions field = 1020; } message EnumOptions { - // Additional classes and traits to mix in to the base trait - repeated string extends = 1; + // Additional classes and traits to mix in to the base trait + repeated string extends = 1; - // Additional classes and traits to mix in to the companion object. - repeated string companion_extends = 2; + // Additional classes and traits to mix in to the companion object. + repeated string companion_extends = 2; - // All instances of this enum will be converted to this type. An implicit TypeMapper - // must be present. - optional string type = 3; + // All instances of this enum will be converted to this type. An implicit TypeMapper + // must be present. + optional string type = 3; - // Custom annotations to add to the generated enum's base class. - repeated string base_annotations = 4; + // Custom annotations to add to the generated enum's base class. + repeated string base_annotations = 4; - // Custom annotations to add to the generated trait. - repeated string recognized_annotations = 5; + // Custom annotations to add to the generated trait. + repeated string recognized_annotations = 5; - // Custom annotations to add to the generated Unrecognized case class. - repeated string unrecognized_annotations = 6; + // Custom annotations to add to the generated Unrecognized case class. + repeated string unrecognized_annotations = 6; extensions 1000 to max; } extend google.protobuf.EnumOptions { - // Enum-level optionals for ScalaPB. - // Extension number officially assigned by protobuf-global-extension-registry@google.com - // - // The field is called enum_options and not enum since enum is not allowed in Java. - optional EnumOptions enum_options = 1020; + // Enum-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + // + // The field is called enum_options and not enum since enum is not allowed in Java. + optional EnumOptions enum_options = 1020; } message EnumValueOptions { - // Additional classes and traits to mix in to an individual enum value. - repeated string extends = 1; + // Additional classes and traits to mix in to an individual enum value. + repeated string extends = 1; - // Name in Scala to use for this enum value. - optional string scala_name = 2; + // Name in Scala to use for this enum value. + optional string scala_name = 2; - // Custom annotations to add to the generated case object for this enum value. - repeated string annotations = 3; + // Custom annotations to add to the generated case object for this enum value. + repeated string annotations = 3; extensions 1000 to max; } extend google.protobuf.EnumValueOptions { - // Enum-level optionals for ScalaPB. - // Extension number officially assigned by protobuf-global-extension-registry@google.com - optional EnumValueOptions enum_value = 1020; + // Enum-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional EnumValueOptions enum_value = 1020; } message OneofOptions { - // Additional traits to mix in to a oneof. - repeated string extends = 1; + // Additional traits to mix in to a oneof. + repeated string extends = 1; - // Name in Scala to use for this oneof field. - optional string scala_name = 2; + // Name in Scala to use for this oneof field. + optional string scala_name = 2; extensions 1000 to max; } extend google.protobuf.OneofOptions { - // Enum-level optionals for ScalaPB. - // Extension number officially assigned by protobuf-global-extension-registry@google.com - optional OneofOptions oneof = 1020; + // Enum-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional OneofOptions oneof = 1020; } enum MatchType { - CONTAINS = 0; - EXACT = 1; - PRESENCE = 2; + CONTAINS = 0; + EXACT = 1; + PRESENCE = 2; } message FieldTransformation { - optional google.protobuf.FieldDescriptorProto when = 1; - optional MatchType match_type = 2 [default=CONTAINS]; - optional google.protobuf.FieldOptions set = 3; + optional google.protobuf.FieldDescriptorProto when = 1; + optional MatchType match_type = 2 [default=CONTAINS]; + optional google.protobuf.FieldOptions set = 3; } message PreprocessorOutput { - map options_by_file = 1; + map options_by_file = 1; }