diff --git a/stubs/s2clientprotocol/@tests/stubtest_allowlist.txt b/stubs/s2clientprotocol/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..00765f966 --- /dev/null +++ b/stubs/s2clientprotocol/@tests/stubtest_allowlist.txt @@ -0,0 +1,3 @@ +# All modules ending with *_pb2 fail to import +# The error message is "TypeError: Descriptors cannot be create directly" +s2clientprotocol\..+_pb2 diff --git a/stubs/s2clientprotocol/METADATA.toml b/stubs/s2clientprotocol/METADATA.toml new file mode 100644 index 000000000..1fd4f42eb --- /dev/null +++ b/stubs/s2clientprotocol/METADATA.toml @@ -0,0 +1,2 @@ +version = "5.*" +requires = ["types-protobuf"] diff --git a/stubs/s2clientprotocol/s2clientprotocol/build.pyi b/stubs/s2clientprotocol/s2clientprotocol/build.pyi new file mode 100644 index 000000000..53949f461 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/build.pyi @@ -0,0 +1,5 @@ +from subprocess import _CMD + +def game_version() -> str: ... +def git_commit_hash() -> str: ... +def read_command_output(cmd: _CMD) -> list[str]: ... diff --git a/stubs/s2clientprotocol/s2clientprotocol/common_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/common_pb2.pyi new file mode 100644 index 000000000..36e5f70c9 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/common_pb2.pyi @@ -0,0 +1,199 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _Race: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _RaceEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Race.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + NoRace: _Race.ValueType # 0 + Terran: _Race.ValueType # 1 + Zerg: _Race.ValueType # 2 + Protoss: _Race.ValueType # 3 + Random: _Race.ValueType # 4 + +class Race(_Race, metaclass=_RaceEnumTypeWrapper): ... + +NoRace: Race.ValueType # 0 +Terran: Race.ValueType # 1 +Zerg: Race.ValueType # 2 +Protoss: Race.ValueType # 3 +Random: Race.ValueType # 4 +global___Race = Race + +@typing_extensions.final +class AvailableAbility(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + REQUIRES_POINT_FIELD_NUMBER: builtins.int + ability_id: builtins.int + requires_point: builtins.bool + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + requires_point: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "requires_point", b"requires_point"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "requires_point", b"requires_point"]) -> None: ... + +global___AvailableAbility = AvailableAbility + +@typing_extensions.final +class ImageData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BITS_PER_PIXEL_FIELD_NUMBER: builtins.int + SIZE_FIELD_NUMBER: builtins.int + DATA_FIELD_NUMBER: builtins.int + bits_per_pixel: builtins.int + """Number of bits per pixel; 8 bits for a byte etc.""" + @property + def size(self) -> global___Size2DI: + """Dimension in pixels.""" + data: builtins.bytes + """Binary data; the size of this buffer in bytes is width * height * bits_per_pixel / 8.""" + def __init__( + self, + *, + bits_per_pixel: builtins.int | None = ..., + size: global___Size2DI | None = ..., + data: builtins.bytes | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["bits_per_pixel", b"bits_per_pixel", "data", b"data", "size", b"size"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["bits_per_pixel", b"bits_per_pixel", "data", b"data", "size", b"size"]) -> None: ... + +global___ImageData = ImageData + +@typing_extensions.final +class PointI(google.protobuf.message.Message): + """Point on the screen/minimap (e.g., 0..64). + Note: bottom left of the screen is 0, 0. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + X_FIELD_NUMBER: builtins.int + Y_FIELD_NUMBER: builtins.int + x: builtins.int + y: builtins.int + def __init__( + self, + *, + x: builtins.int | None = ..., + y: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y"]) -> None: ... + +global___PointI = PointI + +@typing_extensions.final +class RectangleI(google.protobuf.message.Message): + """Screen space rectangular area.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + P0_FIELD_NUMBER: builtins.int + P1_FIELD_NUMBER: builtins.int + @property + def p0(self) -> global___PointI: ... + @property + def p1(self) -> global___PointI: ... + def __init__( + self, + *, + p0: global___PointI | None = ..., + p1: global___PointI | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["p0", b"p0", "p1", b"p1"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["p0", b"p0", "p1", b"p1"]) -> None: ... + +global___RectangleI = RectangleI + +@typing_extensions.final +class Point2D(google.protobuf.message.Message): + """Point on the game board, 0..255. + Note: bottom left of the screen is 0, 0. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + X_FIELD_NUMBER: builtins.int + Y_FIELD_NUMBER: builtins.int + x: builtins.float + y: builtins.float + def __init__( + self, + *, + x: builtins.float | None = ..., + y: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y"]) -> None: ... + +global___Point2D = Point2D + +@typing_extensions.final +class Point(google.protobuf.message.Message): + """Point on the game board, 0..255. + Note: bottom left of the screen is 0, 0. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + X_FIELD_NUMBER: builtins.int + Y_FIELD_NUMBER: builtins.int + Z_FIELD_NUMBER: builtins.int + x: builtins.float + y: builtins.float + z: builtins.float + def __init__( + self, + *, + x: builtins.float | None = ..., + y: builtins.float | None = ..., + z: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y", "z", b"z"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y", "z", b"z"]) -> None: ... + +global___Point = Point + +@typing_extensions.final +class Size2DI(google.protobuf.message.Message): + """Screen dimensions.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + X_FIELD_NUMBER: builtins.int + Y_FIELD_NUMBER: builtins.int + x: builtins.int + y: builtins.int + def __init__( + self, + *, + x: builtins.int | None = ..., + y: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["x", b"x", "y", b"y"]) -> None: ... + +global___Size2DI = Size2DI diff --git a/stubs/s2clientprotocol/s2clientprotocol/data_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/data_pb2.pyi new file mode 100644 index 000000000..cd9ded47d --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/data_pb2.pyi @@ -0,0 +1,396 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import s2clientprotocol.common_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _Attribute: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _AttributeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Attribute.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Light: _Attribute.ValueType # 1 + Armored: _Attribute.ValueType # 2 + Biological: _Attribute.ValueType # 3 + Mechanical: _Attribute.ValueType # 4 + Robotic: _Attribute.ValueType # 5 + Psionic: _Attribute.ValueType # 6 + Massive: _Attribute.ValueType # 7 + Structure: _Attribute.ValueType # 8 + Hover: _Attribute.ValueType # 9 + Heroic: _Attribute.ValueType # 10 + Summoned: _Attribute.ValueType # 11 + +class Attribute(_Attribute, metaclass=_AttributeEnumTypeWrapper): ... + +Light: Attribute.ValueType # 1 +Armored: Attribute.ValueType # 2 +Biological: Attribute.ValueType # 3 +Mechanical: Attribute.ValueType # 4 +Robotic: Attribute.ValueType # 5 +Psionic: Attribute.ValueType # 6 +Massive: Attribute.ValueType # 7 +Structure: Attribute.ValueType # 8 +Hover: Attribute.ValueType # 9 +Heroic: Attribute.ValueType # 10 +Summoned: Attribute.ValueType # 11 +global___Attribute = Attribute + +@typing_extensions.final +class AbilityData(google.protobuf.message.Message): + """May not relevant: queueable (everything is queueable). + May not be important: AbilSetId - marine stim, marauder stim. + Stuff omitted: transient. + Stuff that may be important: cost, range, Alignment, targetfilters. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Target: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TargetEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[AbilityData._Target.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Point: AbilityData._Target.ValueType # 2 + """Requires a target position.""" + Unit: AbilityData._Target.ValueType # 3 + """Requires a unit to target. Given by position using feature layers.""" + PointOrUnit: AbilityData._Target.ValueType # 4 + """Requires either a target point or target unit.""" + PointOrNone: AbilityData._Target.ValueType # 5 + """Requires either a target point or no target. (eg. building add-ons)""" + + class Target(_Target, metaclass=_TargetEnumTypeWrapper): ... + Point: AbilityData.Target.ValueType # 2 + """Requires a target position.""" + Unit: AbilityData.Target.ValueType # 3 + """Requires a unit to target. Given by position using feature layers.""" + PointOrUnit: AbilityData.Target.ValueType # 4 + """Requires either a target point or target unit.""" + PointOrNone: AbilityData.Target.ValueType # 5 + """Requires either a target point or no target. (eg. building add-ons)""" + + ABILITY_ID_FIELD_NUMBER: builtins.int + LINK_NAME_FIELD_NUMBER: builtins.int + LINK_INDEX_FIELD_NUMBER: builtins.int + BUTTON_NAME_FIELD_NUMBER: builtins.int + FRIENDLY_NAME_FIELD_NUMBER: builtins.int + HOTKEY_FIELD_NUMBER: builtins.int + REMAPS_TO_ABILITY_ID_FIELD_NUMBER: builtins.int + AVAILABLE_FIELD_NUMBER: builtins.int + TARGET_FIELD_NUMBER: builtins.int + ALLOW_MINIMAP_FIELD_NUMBER: builtins.int + ALLOW_AUTOCAST_FIELD_NUMBER: builtins.int + IS_BUILDING_FIELD_NUMBER: builtins.int + FOOTPRINT_RADIUS_FIELD_NUMBER: builtins.int + IS_INSTANT_PLACEMENT_FIELD_NUMBER: builtins.int + CAST_RANGE_FIELD_NUMBER: builtins.int + ability_id: builtins.int + """Stable ID.""" + link_name: builtins.str + """Catalog name of the ability.""" + link_index: builtins.int + """Catalog index of the ability.""" + button_name: builtins.str + """Name used for the command card. May not always be set.""" + friendly_name: builtins.str + """A human friendly name when the button name or link name isn't descriptive.""" + hotkey: builtins.str + """Hotkey. May not always be set.""" + remaps_to_ability_id: builtins.int + """This ability id may be represented by the given more generic id.""" + available: builtins.bool + """If true, the ability may be used by this set of mods/map.""" + target: global___AbilityData.Target.ValueType + """Determines if a point is optional or required.""" + allow_minimap: builtins.bool + """Can be cast in the minimap.""" + allow_autocast: builtins.bool + """Autocast can be set.""" + is_building: builtins.bool + """Requires placement to construct a building.""" + footprint_radius: builtins.float + """Estimation of the footprint size. Need a better footprint.""" + is_instant_placement: builtins.bool + """Placement next to an existing structure, e.g., an add-on like a Tech Lab.""" + cast_range: builtins.float + """Range unit can cast ability without needing to approach target.""" + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + link_name: builtins.str | None = ..., + link_index: builtins.int | None = ..., + button_name: builtins.str | None = ..., + friendly_name: builtins.str | None = ..., + hotkey: builtins.str | None = ..., + remaps_to_ability_id: builtins.int | None = ..., + available: builtins.bool | None = ..., + target: global___AbilityData.Target.ValueType | None = ..., + allow_minimap: builtins.bool | None = ..., + allow_autocast: builtins.bool | None = ..., + is_building: builtins.bool | None = ..., + footprint_radius: builtins.float | None = ..., + is_instant_placement: builtins.bool | None = ..., + cast_range: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "allow_autocast", b"allow_autocast", "allow_minimap", b"allow_minimap", "available", b"available", "button_name", b"button_name", "cast_range", b"cast_range", "footprint_radius", b"footprint_radius", "friendly_name", b"friendly_name", "hotkey", b"hotkey", "is_building", b"is_building", "is_instant_placement", b"is_instant_placement", "link_index", b"link_index", "link_name", b"link_name", "remaps_to_ability_id", b"remaps_to_ability_id", "target", b"target"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "allow_autocast", b"allow_autocast", "allow_minimap", b"allow_minimap", "available", b"available", "button_name", b"button_name", "cast_range", b"cast_range", "footprint_radius", b"footprint_radius", "friendly_name", b"friendly_name", "hotkey", b"hotkey", "is_building", b"is_building", "is_instant_placement", b"is_instant_placement", "link_index", b"link_index", "link_name", b"link_name", "remaps_to_ability_id", b"remaps_to_ability_id", "target", b"target"]) -> None: ... + +global___AbilityData = AbilityData + +@typing_extensions.final +class DamageBonus(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ATTRIBUTE_FIELD_NUMBER: builtins.int + BONUS_FIELD_NUMBER: builtins.int + attribute: global___Attribute.ValueType + bonus: builtins.float + def __init__( + self, + *, + attribute: global___Attribute.ValueType | None = ..., + bonus: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["attribute", b"attribute", "bonus", b"bonus"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["attribute", b"attribute", "bonus", b"bonus"]) -> None: ... + +global___DamageBonus = DamageBonus + +@typing_extensions.final +class Weapon(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _TargetType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TargetTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Weapon._TargetType.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Ground: Weapon._TargetType.ValueType # 1 + Air: Weapon._TargetType.ValueType # 2 + Any: Weapon._TargetType.ValueType # 3 + + class TargetType(_TargetType, metaclass=_TargetTypeEnumTypeWrapper): ... + Ground: Weapon.TargetType.ValueType # 1 + Air: Weapon.TargetType.ValueType # 2 + Any: Weapon.TargetType.ValueType # 3 + + TYPE_FIELD_NUMBER: builtins.int + DAMAGE_FIELD_NUMBER: builtins.int + DAMAGE_BONUS_FIELD_NUMBER: builtins.int + ATTACKS_FIELD_NUMBER: builtins.int + RANGE_FIELD_NUMBER: builtins.int + SPEED_FIELD_NUMBER: builtins.int + type: global___Weapon.TargetType.ValueType + damage: builtins.float + @property + def damage_bonus(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DamageBonus]: ... + attacks: builtins.int + """Number of hits per attack. (eg. Colossus has 2 beams)""" + range: builtins.float + speed: builtins.float + """Time between attacks.""" + def __init__( + self, + *, + type: global___Weapon.TargetType.ValueType | None = ..., + damage: builtins.float | None = ..., + damage_bonus: collections.abc.Iterable[global___DamageBonus] | None = ..., + attacks: builtins.int | None = ..., + range: builtins.float | None = ..., + speed: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["attacks", b"attacks", "damage", b"damage", "range", b"range", "speed", b"speed", "type", b"type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["attacks", b"attacks", "damage", b"damage", "damage_bonus", b"damage_bonus", "range", b"range", "speed", b"speed", "type", b"type"]) -> None: ... + +global___Weapon = Weapon + +@typing_extensions.final +class UnitTypeData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + AVAILABLE_FIELD_NUMBER: builtins.int + CARGO_SIZE_FIELD_NUMBER: builtins.int + MINERAL_COST_FIELD_NUMBER: builtins.int + VESPENE_COST_FIELD_NUMBER: builtins.int + FOOD_REQUIRED_FIELD_NUMBER: builtins.int + FOOD_PROVIDED_FIELD_NUMBER: builtins.int + ABILITY_ID_FIELD_NUMBER: builtins.int + RACE_FIELD_NUMBER: builtins.int + BUILD_TIME_FIELD_NUMBER: builtins.int + HAS_VESPENE_FIELD_NUMBER: builtins.int + HAS_MINERALS_FIELD_NUMBER: builtins.int + SIGHT_RANGE_FIELD_NUMBER: builtins.int + TECH_ALIAS_FIELD_NUMBER: builtins.int + UNIT_ALIAS_FIELD_NUMBER: builtins.int + TECH_REQUIREMENT_FIELD_NUMBER: builtins.int + REQUIRE_ATTACHED_FIELD_NUMBER: builtins.int + ATTRIBUTES_FIELD_NUMBER: builtins.int + MOVEMENT_SPEED_FIELD_NUMBER: builtins.int + ARMOR_FIELD_NUMBER: builtins.int + WEAPONS_FIELD_NUMBER: builtins.int + unit_id: builtins.int + """Stable ID.""" + name: builtins.str + """Catalog name of the unit.""" + available: builtins.bool + """If true, the ability may be used by this set of mods/map.""" + cargo_size: builtins.int + """Number of cargo slots it occupies in transports.""" + mineral_cost: builtins.int + vespene_cost: builtins.int + food_required: builtins.float + food_provided: builtins.float + ability_id: builtins.int + """The ability that builds this unit.""" + race: s2clientprotocol.common_pb2.Race.ValueType + build_time: builtins.float + has_vespene: builtins.bool + has_minerals: builtins.bool + sight_range: builtins.float + """Range unit reveals vision.""" + @property + def tech_alias(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: + """Other units that satisfy the same tech requirement.""" + unit_alias: builtins.int + """The morphed variant of this unit.""" + tech_requirement: builtins.int + """Structure required to build this unit. (Or any with the same tech_alias)""" + require_attached: builtins.bool + """Whether tech_requirement is an add-on.""" + @property + def attributes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Attribute.ValueType]: + """Values include changes from upgrades""" + movement_speed: builtins.float + armor: builtins.float + @property + def weapons(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Weapon]: ... + def __init__( + self, + *, + unit_id: builtins.int | None = ..., + name: builtins.str | None = ..., + available: builtins.bool | None = ..., + cargo_size: builtins.int | None = ..., + mineral_cost: builtins.int | None = ..., + vespene_cost: builtins.int | None = ..., + food_required: builtins.float | None = ..., + food_provided: builtins.float | None = ..., + ability_id: builtins.int | None = ..., + race: s2clientprotocol.common_pb2.Race.ValueType | None = ..., + build_time: builtins.float | None = ..., + has_vespene: builtins.bool | None = ..., + has_minerals: builtins.bool | None = ..., + sight_range: builtins.float | None = ..., + tech_alias: collections.abc.Iterable[builtins.int] | None = ..., + unit_alias: builtins.int | None = ..., + tech_requirement: builtins.int | None = ..., + require_attached: builtins.bool | None = ..., + attributes: collections.abc.Iterable[global___Attribute.ValueType] | None = ..., + movement_speed: builtins.float | None = ..., + armor: builtins.float | None = ..., + weapons: collections.abc.Iterable[global___Weapon] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "armor", b"armor", "available", b"available", "build_time", b"build_time", "cargo_size", b"cargo_size", "food_provided", b"food_provided", "food_required", b"food_required", "has_minerals", b"has_minerals", "has_vespene", b"has_vespene", "mineral_cost", b"mineral_cost", "movement_speed", b"movement_speed", "name", b"name", "race", b"race", "require_attached", b"require_attached", "sight_range", b"sight_range", "tech_requirement", b"tech_requirement", "unit_alias", b"unit_alias", "unit_id", b"unit_id", "vespene_cost", b"vespene_cost"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "armor", b"armor", "attributes", b"attributes", "available", b"available", "build_time", b"build_time", "cargo_size", b"cargo_size", "food_provided", b"food_provided", "food_required", b"food_required", "has_minerals", b"has_minerals", "has_vespene", b"has_vespene", "mineral_cost", b"mineral_cost", "movement_speed", b"movement_speed", "name", b"name", "race", b"race", "require_attached", b"require_attached", "sight_range", b"sight_range", "tech_alias", b"tech_alias", "tech_requirement", b"tech_requirement", "unit_alias", b"unit_alias", "unit_id", b"unit_id", "vespene_cost", b"vespene_cost", "weapons", b"weapons"]) -> None: ... + +global___UnitTypeData = UnitTypeData + +@typing_extensions.final +class UpgradeData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UPGRADE_ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + MINERAL_COST_FIELD_NUMBER: builtins.int + VESPENE_COST_FIELD_NUMBER: builtins.int + RESEARCH_TIME_FIELD_NUMBER: builtins.int + ABILITY_ID_FIELD_NUMBER: builtins.int + upgrade_id: builtins.int + """Stable ID.""" + name: builtins.str + mineral_cost: builtins.int + vespene_cost: builtins.int + research_time: builtins.float + ability_id: builtins.int + def __init__( + self, + *, + upgrade_id: builtins.int | None = ..., + name: builtins.str | None = ..., + mineral_cost: builtins.int | None = ..., + vespene_cost: builtins.int | None = ..., + research_time: builtins.float | None = ..., + ability_id: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "mineral_cost", b"mineral_cost", "name", b"name", "research_time", b"research_time", "upgrade_id", b"upgrade_id", "vespene_cost", b"vespene_cost"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "mineral_cost", b"mineral_cost", "name", b"name", "research_time", b"research_time", "upgrade_id", b"upgrade_id", "vespene_cost", b"vespene_cost"]) -> None: ... + +global___UpgradeData = UpgradeData + +@typing_extensions.final +class BuffData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + BUFF_ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + buff_id: builtins.int + """Stable ID.""" + name: builtins.str + def __init__( + self, + *, + buff_id: builtins.int | None = ..., + name: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["buff_id", b"buff_id", "name", b"name"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["buff_id", b"buff_id", "name", b"name"]) -> None: ... + +global___BuffData = BuffData + +@typing_extensions.final +class EffectData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + EFFECT_ID_FIELD_NUMBER: builtins.int + NAME_FIELD_NUMBER: builtins.int + FRIENDLY_NAME_FIELD_NUMBER: builtins.int + RADIUS_FIELD_NUMBER: builtins.int + effect_id: builtins.int + """Stable ID.""" + name: builtins.str + friendly_name: builtins.str + radius: builtins.float + def __init__( + self, + *, + effect_id: builtins.int | None = ..., + name: builtins.str | None = ..., + friendly_name: builtins.str | None = ..., + radius: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["effect_id", b"effect_id", "friendly_name", b"friendly_name", "name", b"name", "radius", b"radius"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["effect_id", b"effect_id", "friendly_name", b"friendly_name", "name", b"name", "radius", b"radius"]) -> None: ... + +global___EffectData = EffectData diff --git a/stubs/s2clientprotocol/s2clientprotocol/debug_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/debug_pb2.pyi new file mode 100644 index 000000000..77441ec37 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/debug_pb2.pyi @@ -0,0 +1,448 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import s2clientprotocol.common_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _DebugGameState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DebugGameStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DebugGameState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + show_map: _DebugGameState.ValueType # 1 + control_enemy: _DebugGameState.ValueType # 2 + food: _DebugGameState.ValueType # 3 + free: _DebugGameState.ValueType # 4 + all_resources: _DebugGameState.ValueType # 5 + god: _DebugGameState.ValueType # 6 + minerals: _DebugGameState.ValueType # 7 + gas: _DebugGameState.ValueType # 8 + cooldown: _DebugGameState.ValueType # 9 + tech_tree: _DebugGameState.ValueType # 10 + upgrade: _DebugGameState.ValueType # 11 + fast_build: _DebugGameState.ValueType # 12 + +class DebugGameState(_DebugGameState, metaclass=_DebugGameStateEnumTypeWrapper): ... + +show_map: DebugGameState.ValueType # 1 +control_enemy: DebugGameState.ValueType # 2 +food: DebugGameState.ValueType # 3 +free: DebugGameState.ValueType # 4 +all_resources: DebugGameState.ValueType # 5 +god: DebugGameState.ValueType # 6 +minerals: DebugGameState.ValueType # 7 +gas: DebugGameState.ValueType # 8 +cooldown: DebugGameState.ValueType # 9 +tech_tree: DebugGameState.ValueType # 10 +upgrade: DebugGameState.ValueType # 11 +fast_build: DebugGameState.ValueType # 12 +global___DebugGameState = DebugGameState + +@typing_extensions.final +class DebugCommand(google.protobuf.message.Message): + """Issue various useful commands to the game engine.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DRAW_FIELD_NUMBER: builtins.int + GAME_STATE_FIELD_NUMBER: builtins.int + CREATE_UNIT_FIELD_NUMBER: builtins.int + KILL_UNIT_FIELD_NUMBER: builtins.int + TEST_PROCESS_FIELD_NUMBER: builtins.int + SCORE_FIELD_NUMBER: builtins.int + END_GAME_FIELD_NUMBER: builtins.int + UNIT_VALUE_FIELD_NUMBER: builtins.int + @property + def draw(self) -> global___DebugDraw: ... + game_state: global___DebugGameState.ValueType + @property + def create_unit(self) -> global___DebugCreateUnit: ... + @property + def kill_unit(self) -> global___DebugKillUnit: ... + @property + def test_process(self) -> global___DebugTestProcess: ... + @property + def score(self) -> global___DebugSetScore: + """Useful only for single-player "curriculum" maps.""" + @property + def end_game(self) -> global___DebugEndGame: ... + @property + def unit_value(self) -> global___DebugSetUnitValue: ... + def __init__( + self, + *, + draw: global___DebugDraw | None = ..., + game_state: global___DebugGameState.ValueType | None = ..., + create_unit: global___DebugCreateUnit | None = ..., + kill_unit: global___DebugKillUnit | None = ..., + test_process: global___DebugTestProcess | None = ..., + score: global___DebugSetScore | None = ..., + end_game: global___DebugEndGame | None = ..., + unit_value: global___DebugSetUnitValue | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["command", b"command", "create_unit", b"create_unit", "draw", b"draw", "end_game", b"end_game", "game_state", b"game_state", "kill_unit", b"kill_unit", "score", b"score", "test_process", b"test_process", "unit_value", b"unit_value"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["command", b"command", "create_unit", b"create_unit", "draw", b"draw", "end_game", b"end_game", "game_state", b"game_state", "kill_unit", b"kill_unit", "score", b"score", "test_process", b"test_process", "unit_value", b"unit_value"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["command", b"command"]) -> typing_extensions.Literal["draw", "game_state", "create_unit", "kill_unit", "test_process", "score", "end_game", "unit_value"] | None: ... + +global___DebugCommand = DebugCommand + +@typing_extensions.final +class DebugDraw(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TEXT_FIELD_NUMBER: builtins.int + LINES_FIELD_NUMBER: builtins.int + BOXES_FIELD_NUMBER: builtins.int + SPHERES_FIELD_NUMBER: builtins.int + @property + def text(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DebugText]: ... + @property + def lines(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DebugLine]: ... + @property + def boxes(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DebugBox]: ... + @property + def spheres(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DebugSphere]: ... + def __init__( + self, + *, + text: collections.abc.Iterable[global___DebugText] | None = ..., + lines: collections.abc.Iterable[global___DebugLine] | None = ..., + boxes: collections.abc.Iterable[global___DebugBox] | None = ..., + spheres: collections.abc.Iterable[global___DebugSphere] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["boxes", b"boxes", "lines", b"lines", "spheres", b"spheres", "text", b"text"]) -> None: ... + +global___DebugDraw = DebugDraw + +@typing_extensions.final +class Line(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + P0_FIELD_NUMBER: builtins.int + P1_FIELD_NUMBER: builtins.int + @property + def p0(self) -> s2clientprotocol.common_pb2.Point: ... + @property + def p1(self) -> s2clientprotocol.common_pb2.Point: ... + def __init__( + self, + *, + p0: s2clientprotocol.common_pb2.Point | None = ..., + p1: s2clientprotocol.common_pb2.Point | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["p0", b"p0", "p1", b"p1"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["p0", b"p0", "p1", b"p1"]) -> None: ... + +global___Line = Line + +@typing_extensions.final +class Color(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + R_FIELD_NUMBER: builtins.int + G_FIELD_NUMBER: builtins.int + B_FIELD_NUMBER: builtins.int + r: builtins.int + g: builtins.int + b: builtins.int + def __init__( + self, + *, + r: builtins.int | None = ..., + g: builtins.int | None = ..., + b: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["b", b"b", "g", b"g", "r", b"r"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["b", b"b", "g", b"g", "r", b"r"]) -> None: ... + +global___Color = Color + +@typing_extensions.final +class DebugText(google.protobuf.message.Message): + """Display debug text on screen.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COLOR_FIELD_NUMBER: builtins.int + TEXT_FIELD_NUMBER: builtins.int + VIRTUAL_POS_FIELD_NUMBER: builtins.int + WORLD_POS_FIELD_NUMBER: builtins.int + SIZE_FIELD_NUMBER: builtins.int + @property + def color(self) -> global___Color: ... + text: builtins.str + """Text to display.""" + @property + def virtual_pos(self) -> s2clientprotocol.common_pb2.Point: + """Virtualized position in 2D (the screen is 0..1, 0..1 for any resolution).""" + @property + def world_pos(self) -> s2clientprotocol.common_pb2.Point: + """Position in the world.""" + size: builtins.int + """Pixel height of the text. Defaults to 8px.""" + def __init__( + self, + *, + color: global___Color | None = ..., + text: builtins.str | None = ..., + virtual_pos: s2clientprotocol.common_pb2.Point | None = ..., + world_pos: s2clientprotocol.common_pb2.Point | None = ..., + size: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["color", b"color", "size", b"size", "text", b"text", "virtual_pos", b"virtual_pos", "world_pos", b"world_pos"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["color", b"color", "size", b"size", "text", b"text", "virtual_pos", b"virtual_pos", "world_pos", b"world_pos"]) -> None: ... + +global___DebugText = DebugText + +@typing_extensions.final +class DebugLine(google.protobuf.message.Message): + """Display debug lines on screen.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COLOR_FIELD_NUMBER: builtins.int + LINE_FIELD_NUMBER: builtins.int + @property + def color(self) -> global___Color: ... + @property + def line(self) -> global___Line: + """World space line.""" + def __init__( + self, + *, + color: global___Color | None = ..., + line: global___Line | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["color", b"color", "line", b"line"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["color", b"color", "line", b"line"]) -> None: ... + +global___DebugLine = DebugLine + +@typing_extensions.final +class DebugBox(google.protobuf.message.Message): + """Display debug boxes on screen.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COLOR_FIELD_NUMBER: builtins.int + MIN_FIELD_NUMBER: builtins.int + MAX_FIELD_NUMBER: builtins.int + @property + def color(self) -> global___Color: ... + @property + def min(self) -> s2clientprotocol.common_pb2.Point: ... + @property + def max(self) -> s2clientprotocol.common_pb2.Point: ... + def __init__( + self, + *, + color: global___Color | None = ..., + min: s2clientprotocol.common_pb2.Point | None = ..., + max: s2clientprotocol.common_pb2.Point | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["color", b"color", "max", b"max", "min", b"min"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["color", b"color", "max", b"max", "min", b"min"]) -> None: ... + +global___DebugBox = DebugBox + +@typing_extensions.final +class DebugSphere(google.protobuf.message.Message): + """Display debug spheres on screen.""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COLOR_FIELD_NUMBER: builtins.int + P_FIELD_NUMBER: builtins.int + R_FIELD_NUMBER: builtins.int + @property + def color(self) -> global___Color: ... + @property + def p(self) -> s2clientprotocol.common_pb2.Point: ... + r: builtins.float + def __init__( + self, + *, + color: global___Color | None = ..., + p: s2clientprotocol.common_pb2.Point | None = ..., + r: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["color", b"color", "p", b"p", "r", b"r"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["color", b"color", "p", b"p", "r", b"r"]) -> None: ... + +global___DebugSphere = DebugSphere + +@typing_extensions.final +class DebugCreateUnit(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_TYPE_FIELD_NUMBER: builtins.int + OWNER_FIELD_NUMBER: builtins.int + POS_FIELD_NUMBER: builtins.int + QUANTITY_FIELD_NUMBER: builtins.int + unit_type: builtins.int + owner: builtins.int + @property + def pos(self) -> s2clientprotocol.common_pb2.Point2D: ... + quantity: builtins.int + def __init__( + self, + *, + unit_type: builtins.int | None = ..., + owner: builtins.int | None = ..., + pos: s2clientprotocol.common_pb2.Point2D | None = ..., + quantity: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["owner", b"owner", "pos", b"pos", "quantity", b"quantity", "unit_type", b"unit_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["owner", b"owner", "pos", b"pos", "quantity", b"quantity", "unit_type", b"unit_type"]) -> None: ... + +global___DebugCreateUnit = DebugCreateUnit + +@typing_extensions.final +class DebugKillUnit(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TAG_FIELD_NUMBER: builtins.int + @property + def tag(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + def __init__( + self, + *, + tag: collections.abc.Iterable[builtins.int] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["tag", b"tag"]) -> None: ... + +global___DebugKillUnit = DebugKillUnit + +@typing_extensions.final +class DebugTestProcess(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Test: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TestEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugTestProcess._Test.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + hang: DebugTestProcess._Test.ValueType # 1 + crash: DebugTestProcess._Test.ValueType # 2 + exit: DebugTestProcess._Test.ValueType # 3 + + class Test(_Test, metaclass=_TestEnumTypeWrapper): ... + hang: DebugTestProcess.Test.ValueType # 1 + crash: DebugTestProcess.Test.ValueType # 2 + exit: DebugTestProcess.Test.ValueType # 3 + + TEST_FIELD_NUMBER: builtins.int + DELAY_MS_FIELD_NUMBER: builtins.int + test: global___DebugTestProcess.Test.ValueType + delay_ms: builtins.int + def __init__( + self, + *, + test: global___DebugTestProcess.Test.ValueType | None = ..., + delay_ms: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["delay_ms", b"delay_ms", "test", b"test"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["delay_ms", b"delay_ms", "test", b"test"]) -> None: ... + +global___DebugTestProcess = DebugTestProcess + +@typing_extensions.final +class DebugSetScore(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SCORE_FIELD_NUMBER: builtins.int + score: builtins.float + def __init__( + self, + *, + score: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["score", b"score"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["score", b"score"]) -> None: ... + +global___DebugSetScore = DebugSetScore + +@typing_extensions.final +class DebugEndGame(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _EndResult: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _EndResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugEndGame._EndResult.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Surrender: DebugEndGame._EndResult.ValueType # 1 + """Default if nothing is set. The current player admits defeat.""" + DeclareVictory: DebugEndGame._EndResult.ValueType # 2 + + class EndResult(_EndResult, metaclass=_EndResultEnumTypeWrapper): ... + Surrender: DebugEndGame.EndResult.ValueType # 1 + """Default if nothing is set. The current player admits defeat.""" + DeclareVictory: DebugEndGame.EndResult.ValueType # 2 + + END_RESULT_FIELD_NUMBER: builtins.int + end_result: global___DebugEndGame.EndResult.ValueType + def __init__( + self, + *, + end_result: global___DebugEndGame.EndResult.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["end_result", b"end_result"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["end_result", b"end_result"]) -> None: ... + +global___DebugEndGame = DebugEndGame + +@typing_extensions.final +class DebugSetUnitValue(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _UnitValue: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _UnitValueEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[DebugSetUnitValue._UnitValue.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Energy: DebugSetUnitValue._UnitValue.ValueType # 1 + Life: DebugSetUnitValue._UnitValue.ValueType # 2 + Shields: DebugSetUnitValue._UnitValue.ValueType # 3 + + class UnitValue(_UnitValue, metaclass=_UnitValueEnumTypeWrapper): ... + Energy: DebugSetUnitValue.UnitValue.ValueType # 1 + Life: DebugSetUnitValue.UnitValue.ValueType # 2 + Shields: DebugSetUnitValue.UnitValue.ValueType # 3 + + UNIT_VALUE_FIELD_NUMBER: builtins.int + VALUE_FIELD_NUMBER: builtins.int + UNIT_TAG_FIELD_NUMBER: builtins.int + unit_value: global___DebugSetUnitValue.UnitValue.ValueType + value: builtins.float + unit_tag: builtins.int + def __init__( + self, + *, + unit_value: global___DebugSetUnitValue.UnitValue.ValueType | None = ..., + value: builtins.float | None = ..., + unit_tag: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["unit_tag", b"unit_tag", "unit_value", b"unit_value", "value", b"value"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["unit_tag", b"unit_tag", "unit_value", b"unit_value", "value", b"value"]) -> None: ... + +global___DebugSetUnitValue = DebugSetUnitValue diff --git a/stubs/s2clientprotocol/s2clientprotocol/error_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/error_pb2.pyi new file mode 100644 index 000000000..dce11d14b --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/error_pb2.pyi @@ -0,0 +1,455 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _ActionResult: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ActionResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ActionResult.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Success: _ActionResult.ValueType # 1 + NotSupported: _ActionResult.ValueType # 2 + Error: _ActionResult.ValueType # 3 + CantQueueThatOrder: _ActionResult.ValueType # 4 + Retry: _ActionResult.ValueType # 5 + Cooldown: _ActionResult.ValueType # 6 + QueueIsFull: _ActionResult.ValueType # 7 + RallyQueueIsFull: _ActionResult.ValueType # 8 + NotEnoughMinerals: _ActionResult.ValueType # 9 + NotEnoughVespene: _ActionResult.ValueType # 10 + NotEnoughTerrazine: _ActionResult.ValueType # 11 + NotEnoughCustom: _ActionResult.ValueType # 12 + NotEnoughFood: _ActionResult.ValueType # 13 + FoodUsageImpossible: _ActionResult.ValueType # 14 + NotEnoughLife: _ActionResult.ValueType # 15 + NotEnoughShields: _ActionResult.ValueType # 16 + NotEnoughEnergy: _ActionResult.ValueType # 17 + LifeSuppressed: _ActionResult.ValueType # 18 + ShieldsSuppressed: _ActionResult.ValueType # 19 + EnergySuppressed: _ActionResult.ValueType # 20 + NotEnoughCharges: _ActionResult.ValueType # 21 + CantAddMoreCharges: _ActionResult.ValueType # 22 + TooMuchMinerals: _ActionResult.ValueType # 23 + TooMuchVespene: _ActionResult.ValueType # 24 + TooMuchTerrazine: _ActionResult.ValueType # 25 + TooMuchCustom: _ActionResult.ValueType # 26 + TooMuchFood: _ActionResult.ValueType # 27 + TooMuchLife: _ActionResult.ValueType # 28 + TooMuchShields: _ActionResult.ValueType # 29 + TooMuchEnergy: _ActionResult.ValueType # 30 + MustTargetUnitWithLife: _ActionResult.ValueType # 31 + MustTargetUnitWithShields: _ActionResult.ValueType # 32 + MustTargetUnitWithEnergy: _ActionResult.ValueType # 33 + CantTrade: _ActionResult.ValueType # 34 + CantSpend: _ActionResult.ValueType # 35 + CantTargetThatUnit: _ActionResult.ValueType # 36 + CouldntAllocateUnit: _ActionResult.ValueType # 37 + UnitCantMove: _ActionResult.ValueType # 38 + TransportIsHoldingPosition: _ActionResult.ValueType # 39 + BuildTechRequirementsNotMet: _ActionResult.ValueType # 40 + CantFindPlacementLocation: _ActionResult.ValueType # 41 + CantBuildOnThat: _ActionResult.ValueType # 42 + CantBuildTooCloseToDropOff: _ActionResult.ValueType # 43 + CantBuildLocationInvalid: _ActionResult.ValueType # 44 + CantSeeBuildLocation: _ActionResult.ValueType # 45 + CantBuildTooCloseToCreepSource: _ActionResult.ValueType # 46 + CantBuildTooCloseToResources: _ActionResult.ValueType # 47 + CantBuildTooFarFromWater: _ActionResult.ValueType # 48 + CantBuildTooFarFromCreepSource: _ActionResult.ValueType # 49 + CantBuildTooFarFromBuildPowerSource: _ActionResult.ValueType # 50 + CantBuildOnDenseTerrain: _ActionResult.ValueType # 51 + CantTrainTooFarFromTrainPowerSource: _ActionResult.ValueType # 52 + CantLandLocationInvalid: _ActionResult.ValueType # 53 + CantSeeLandLocation: _ActionResult.ValueType # 54 + CantLandTooCloseToCreepSource: _ActionResult.ValueType # 55 + CantLandTooCloseToResources: _ActionResult.ValueType # 56 + CantLandTooFarFromWater: _ActionResult.ValueType # 57 + CantLandTooFarFromCreepSource: _ActionResult.ValueType # 58 + CantLandTooFarFromBuildPowerSource: _ActionResult.ValueType # 59 + CantLandTooFarFromTrainPowerSource: _ActionResult.ValueType # 60 + CantLandOnDenseTerrain: _ActionResult.ValueType # 61 + AddOnTooFarFromBuilding: _ActionResult.ValueType # 62 + MustBuildRefineryFirst: _ActionResult.ValueType # 63 + BuildingIsUnderConstruction: _ActionResult.ValueType # 64 + CantFindDropOff: _ActionResult.ValueType # 65 + CantLoadOtherPlayersUnits: _ActionResult.ValueType # 66 + NotEnoughRoomToLoadUnit: _ActionResult.ValueType # 67 + CantUnloadUnitsThere: _ActionResult.ValueType # 68 + CantWarpInUnitsThere: _ActionResult.ValueType # 69 + CantLoadImmobileUnits: _ActionResult.ValueType # 70 + CantRechargeImmobileUnits: _ActionResult.ValueType # 71 + CantRechargeUnderConstructionUnits: _ActionResult.ValueType # 72 + CantLoadThatUnit: _ActionResult.ValueType # 73 + NoCargoToUnload: _ActionResult.ValueType # 74 + LoadAllNoTargetsFound: _ActionResult.ValueType # 75 + NotWhileOccupied: _ActionResult.ValueType # 76 + CantAttackWithoutAmmo: _ActionResult.ValueType # 77 + CantHoldAnyMoreAmmo: _ActionResult.ValueType # 78 + TechRequirementsNotMet: _ActionResult.ValueType # 79 + MustLockdownUnitFirst: _ActionResult.ValueType # 80 + MustTargetUnit: _ActionResult.ValueType # 81 + MustTargetInventory: _ActionResult.ValueType # 82 + MustTargetVisibleUnit: _ActionResult.ValueType # 83 + MustTargetVisibleLocation: _ActionResult.ValueType # 84 + MustTargetWalkableLocation: _ActionResult.ValueType # 85 + MustTargetPawnableUnit: _ActionResult.ValueType # 86 + YouCantControlThatUnit: _ActionResult.ValueType # 87 + YouCantIssueCommandsToThatUnit: _ActionResult.ValueType # 88 + MustTargetResources: _ActionResult.ValueType # 89 + RequiresHealTarget: _ActionResult.ValueType # 90 + RequiresRepairTarget: _ActionResult.ValueType # 91 + NoItemsToDrop: _ActionResult.ValueType # 92 + CantHoldAnyMoreItems: _ActionResult.ValueType # 93 + CantHoldThat: _ActionResult.ValueType # 94 + TargetHasNoInventory: _ActionResult.ValueType # 95 + CantDropThisItem: _ActionResult.ValueType # 96 + CantMoveThisItem: _ActionResult.ValueType # 97 + CantPawnThisUnit: _ActionResult.ValueType # 98 + MustTargetCaster: _ActionResult.ValueType # 99 + CantTargetCaster: _ActionResult.ValueType # 100 + MustTargetOuter: _ActionResult.ValueType # 101 + CantTargetOuter: _ActionResult.ValueType # 102 + MustTargetYourOwnUnits: _ActionResult.ValueType # 103 + CantTargetYourOwnUnits: _ActionResult.ValueType # 104 + MustTargetFriendlyUnits: _ActionResult.ValueType # 105 + CantTargetFriendlyUnits: _ActionResult.ValueType # 106 + MustTargetNeutralUnits: _ActionResult.ValueType # 107 + CantTargetNeutralUnits: _ActionResult.ValueType # 108 + MustTargetEnemyUnits: _ActionResult.ValueType # 109 + CantTargetEnemyUnits: _ActionResult.ValueType # 110 + MustTargetAirUnits: _ActionResult.ValueType # 111 + CantTargetAirUnits: _ActionResult.ValueType # 112 + MustTargetGroundUnits: _ActionResult.ValueType # 113 + CantTargetGroundUnits: _ActionResult.ValueType # 114 + MustTargetStructures: _ActionResult.ValueType # 115 + CantTargetStructures: _ActionResult.ValueType # 116 + MustTargetLightUnits: _ActionResult.ValueType # 117 + CantTargetLightUnits: _ActionResult.ValueType # 118 + MustTargetArmoredUnits: _ActionResult.ValueType # 119 + CantTargetArmoredUnits: _ActionResult.ValueType # 120 + MustTargetBiologicalUnits: _ActionResult.ValueType # 121 + CantTargetBiologicalUnits: _ActionResult.ValueType # 122 + MustTargetHeroicUnits: _ActionResult.ValueType # 123 + CantTargetHeroicUnits: _ActionResult.ValueType # 124 + MustTargetRoboticUnits: _ActionResult.ValueType # 125 + CantTargetRoboticUnits: _ActionResult.ValueType # 126 + MustTargetMechanicalUnits: _ActionResult.ValueType # 127 + CantTargetMechanicalUnits: _ActionResult.ValueType # 128 + MustTargetPsionicUnits: _ActionResult.ValueType # 129 + CantTargetPsionicUnits: _ActionResult.ValueType # 130 + MustTargetMassiveUnits: _ActionResult.ValueType # 131 + CantTargetMassiveUnits: _ActionResult.ValueType # 132 + MustTargetMissile: _ActionResult.ValueType # 133 + CantTargetMissile: _ActionResult.ValueType # 134 + MustTargetWorkerUnits: _ActionResult.ValueType # 135 + CantTargetWorkerUnits: _ActionResult.ValueType # 136 + MustTargetEnergyCapableUnits: _ActionResult.ValueType # 137 + CantTargetEnergyCapableUnits: _ActionResult.ValueType # 138 + MustTargetShieldCapableUnits: _ActionResult.ValueType # 139 + CantTargetShieldCapableUnits: _ActionResult.ValueType # 140 + MustTargetFlyers: _ActionResult.ValueType # 141 + CantTargetFlyers: _ActionResult.ValueType # 142 + MustTargetBuriedUnits: _ActionResult.ValueType # 143 + CantTargetBuriedUnits: _ActionResult.ValueType # 144 + MustTargetCloakedUnits: _ActionResult.ValueType # 145 + CantTargetCloakedUnits: _ActionResult.ValueType # 146 + MustTargetUnitsInAStasisField: _ActionResult.ValueType # 147 + CantTargetUnitsInAStasisField: _ActionResult.ValueType # 148 + MustTargetUnderConstructionUnits: _ActionResult.ValueType # 149 + CantTargetUnderConstructionUnits: _ActionResult.ValueType # 150 + MustTargetDeadUnits: _ActionResult.ValueType # 151 + CantTargetDeadUnits: _ActionResult.ValueType # 152 + MustTargetRevivableUnits: _ActionResult.ValueType # 153 + CantTargetRevivableUnits: _ActionResult.ValueType # 154 + MustTargetHiddenUnits: _ActionResult.ValueType # 155 + CantTargetHiddenUnits: _ActionResult.ValueType # 156 + CantRechargeOtherPlayersUnits: _ActionResult.ValueType # 157 + MustTargetHallucinations: _ActionResult.ValueType # 158 + CantTargetHallucinations: _ActionResult.ValueType # 159 + MustTargetInvulnerableUnits: _ActionResult.ValueType # 160 + CantTargetInvulnerableUnits: _ActionResult.ValueType # 161 + MustTargetDetectedUnits: _ActionResult.ValueType # 162 + CantTargetDetectedUnits: _ActionResult.ValueType # 163 + CantTargetUnitWithEnergy: _ActionResult.ValueType # 164 + CantTargetUnitWithShields: _ActionResult.ValueType # 165 + MustTargetUncommandableUnits: _ActionResult.ValueType # 166 + CantTargetUncommandableUnits: _ActionResult.ValueType # 167 + MustTargetPreventDefeatUnits: _ActionResult.ValueType # 168 + CantTargetPreventDefeatUnits: _ActionResult.ValueType # 169 + MustTargetPreventRevealUnits: _ActionResult.ValueType # 170 + CantTargetPreventRevealUnits: _ActionResult.ValueType # 171 + MustTargetPassiveUnits: _ActionResult.ValueType # 172 + CantTargetPassiveUnits: _ActionResult.ValueType # 173 + MustTargetStunnedUnits: _ActionResult.ValueType # 174 + CantTargetStunnedUnits: _ActionResult.ValueType # 175 + MustTargetSummonedUnits: _ActionResult.ValueType # 176 + CantTargetSummonedUnits: _ActionResult.ValueType # 177 + MustTargetUser1: _ActionResult.ValueType # 178 + CantTargetUser1: _ActionResult.ValueType # 179 + MustTargetUnstoppableUnits: _ActionResult.ValueType # 180 + CantTargetUnstoppableUnits: _ActionResult.ValueType # 181 + MustTargetResistantUnits: _ActionResult.ValueType # 182 + CantTargetResistantUnits: _ActionResult.ValueType # 183 + MustTargetDazedUnits: _ActionResult.ValueType # 184 + CantTargetDazedUnits: _ActionResult.ValueType # 185 + CantLockdown: _ActionResult.ValueType # 186 + CantMindControl: _ActionResult.ValueType # 187 + MustTargetDestructibles: _ActionResult.ValueType # 188 + CantTargetDestructibles: _ActionResult.ValueType # 189 + MustTargetItems: _ActionResult.ValueType # 190 + CantTargetItems: _ActionResult.ValueType # 191 + NoCalldownAvailable: _ActionResult.ValueType # 192 + WaypointListFull: _ActionResult.ValueType # 193 + MustTargetRace: _ActionResult.ValueType # 194 + CantTargetRace: _ActionResult.ValueType # 195 + MustTargetSimilarUnits: _ActionResult.ValueType # 196 + CantTargetSimilarUnits: _ActionResult.ValueType # 197 + CantFindEnoughTargets: _ActionResult.ValueType # 198 + AlreadySpawningLarva: _ActionResult.ValueType # 199 + CantTargetExhaustedResources: _ActionResult.ValueType # 200 + CantUseMinimap: _ActionResult.ValueType # 201 + CantUseInfoPanel: _ActionResult.ValueType # 202 + OrderQueueIsFull: _ActionResult.ValueType # 203 + CantHarvestThatResource: _ActionResult.ValueType # 204 + HarvestersNotRequired: _ActionResult.ValueType # 205 + AlreadyTargeted: _ActionResult.ValueType # 206 + CantAttackWeaponsDisabled: _ActionResult.ValueType # 207 + CouldntReachTarget: _ActionResult.ValueType # 208 + TargetIsOutOfRange: _ActionResult.ValueType # 209 + TargetIsTooClose: _ActionResult.ValueType # 210 + TargetIsOutOfArc: _ActionResult.ValueType # 211 + CantFindTeleportLocation: _ActionResult.ValueType # 212 + InvalidItemClass: _ActionResult.ValueType # 213 + CantFindCancelOrder: _ActionResult.ValueType # 214 + +class ActionResult(_ActionResult, metaclass=_ActionResultEnumTypeWrapper): ... + +Success: ActionResult.ValueType # 1 +NotSupported: ActionResult.ValueType # 2 +Error: ActionResult.ValueType # 3 +CantQueueThatOrder: ActionResult.ValueType # 4 +Retry: ActionResult.ValueType # 5 +Cooldown: ActionResult.ValueType # 6 +QueueIsFull: ActionResult.ValueType # 7 +RallyQueueIsFull: ActionResult.ValueType # 8 +NotEnoughMinerals: ActionResult.ValueType # 9 +NotEnoughVespene: ActionResult.ValueType # 10 +NotEnoughTerrazine: ActionResult.ValueType # 11 +NotEnoughCustom: ActionResult.ValueType # 12 +NotEnoughFood: ActionResult.ValueType # 13 +FoodUsageImpossible: ActionResult.ValueType # 14 +NotEnoughLife: ActionResult.ValueType # 15 +NotEnoughShields: ActionResult.ValueType # 16 +NotEnoughEnergy: ActionResult.ValueType # 17 +LifeSuppressed: ActionResult.ValueType # 18 +ShieldsSuppressed: ActionResult.ValueType # 19 +EnergySuppressed: ActionResult.ValueType # 20 +NotEnoughCharges: ActionResult.ValueType # 21 +CantAddMoreCharges: ActionResult.ValueType # 22 +TooMuchMinerals: ActionResult.ValueType # 23 +TooMuchVespene: ActionResult.ValueType # 24 +TooMuchTerrazine: ActionResult.ValueType # 25 +TooMuchCustom: ActionResult.ValueType # 26 +TooMuchFood: ActionResult.ValueType # 27 +TooMuchLife: ActionResult.ValueType # 28 +TooMuchShields: ActionResult.ValueType # 29 +TooMuchEnergy: ActionResult.ValueType # 30 +MustTargetUnitWithLife: ActionResult.ValueType # 31 +MustTargetUnitWithShields: ActionResult.ValueType # 32 +MustTargetUnitWithEnergy: ActionResult.ValueType # 33 +CantTrade: ActionResult.ValueType # 34 +CantSpend: ActionResult.ValueType # 35 +CantTargetThatUnit: ActionResult.ValueType # 36 +CouldntAllocateUnit: ActionResult.ValueType # 37 +UnitCantMove: ActionResult.ValueType # 38 +TransportIsHoldingPosition: ActionResult.ValueType # 39 +BuildTechRequirementsNotMet: ActionResult.ValueType # 40 +CantFindPlacementLocation: ActionResult.ValueType # 41 +CantBuildOnThat: ActionResult.ValueType # 42 +CantBuildTooCloseToDropOff: ActionResult.ValueType # 43 +CantBuildLocationInvalid: ActionResult.ValueType # 44 +CantSeeBuildLocation: ActionResult.ValueType # 45 +CantBuildTooCloseToCreepSource: ActionResult.ValueType # 46 +CantBuildTooCloseToResources: ActionResult.ValueType # 47 +CantBuildTooFarFromWater: ActionResult.ValueType # 48 +CantBuildTooFarFromCreepSource: ActionResult.ValueType # 49 +CantBuildTooFarFromBuildPowerSource: ActionResult.ValueType # 50 +CantBuildOnDenseTerrain: ActionResult.ValueType # 51 +CantTrainTooFarFromTrainPowerSource: ActionResult.ValueType # 52 +CantLandLocationInvalid: ActionResult.ValueType # 53 +CantSeeLandLocation: ActionResult.ValueType # 54 +CantLandTooCloseToCreepSource: ActionResult.ValueType # 55 +CantLandTooCloseToResources: ActionResult.ValueType # 56 +CantLandTooFarFromWater: ActionResult.ValueType # 57 +CantLandTooFarFromCreepSource: ActionResult.ValueType # 58 +CantLandTooFarFromBuildPowerSource: ActionResult.ValueType # 59 +CantLandTooFarFromTrainPowerSource: ActionResult.ValueType # 60 +CantLandOnDenseTerrain: ActionResult.ValueType # 61 +AddOnTooFarFromBuilding: ActionResult.ValueType # 62 +MustBuildRefineryFirst: ActionResult.ValueType # 63 +BuildingIsUnderConstruction: ActionResult.ValueType # 64 +CantFindDropOff: ActionResult.ValueType # 65 +CantLoadOtherPlayersUnits: ActionResult.ValueType # 66 +NotEnoughRoomToLoadUnit: ActionResult.ValueType # 67 +CantUnloadUnitsThere: ActionResult.ValueType # 68 +CantWarpInUnitsThere: ActionResult.ValueType # 69 +CantLoadImmobileUnits: ActionResult.ValueType # 70 +CantRechargeImmobileUnits: ActionResult.ValueType # 71 +CantRechargeUnderConstructionUnits: ActionResult.ValueType # 72 +CantLoadThatUnit: ActionResult.ValueType # 73 +NoCargoToUnload: ActionResult.ValueType # 74 +LoadAllNoTargetsFound: ActionResult.ValueType # 75 +NotWhileOccupied: ActionResult.ValueType # 76 +CantAttackWithoutAmmo: ActionResult.ValueType # 77 +CantHoldAnyMoreAmmo: ActionResult.ValueType # 78 +TechRequirementsNotMet: ActionResult.ValueType # 79 +MustLockdownUnitFirst: ActionResult.ValueType # 80 +MustTargetUnit: ActionResult.ValueType # 81 +MustTargetInventory: ActionResult.ValueType # 82 +MustTargetVisibleUnit: ActionResult.ValueType # 83 +MustTargetVisibleLocation: ActionResult.ValueType # 84 +MustTargetWalkableLocation: ActionResult.ValueType # 85 +MustTargetPawnableUnit: ActionResult.ValueType # 86 +YouCantControlThatUnit: ActionResult.ValueType # 87 +YouCantIssueCommandsToThatUnit: ActionResult.ValueType # 88 +MustTargetResources: ActionResult.ValueType # 89 +RequiresHealTarget: ActionResult.ValueType # 90 +RequiresRepairTarget: ActionResult.ValueType # 91 +NoItemsToDrop: ActionResult.ValueType # 92 +CantHoldAnyMoreItems: ActionResult.ValueType # 93 +CantHoldThat: ActionResult.ValueType # 94 +TargetHasNoInventory: ActionResult.ValueType # 95 +CantDropThisItem: ActionResult.ValueType # 96 +CantMoveThisItem: ActionResult.ValueType # 97 +CantPawnThisUnit: ActionResult.ValueType # 98 +MustTargetCaster: ActionResult.ValueType # 99 +CantTargetCaster: ActionResult.ValueType # 100 +MustTargetOuter: ActionResult.ValueType # 101 +CantTargetOuter: ActionResult.ValueType # 102 +MustTargetYourOwnUnits: ActionResult.ValueType # 103 +CantTargetYourOwnUnits: ActionResult.ValueType # 104 +MustTargetFriendlyUnits: ActionResult.ValueType # 105 +CantTargetFriendlyUnits: ActionResult.ValueType # 106 +MustTargetNeutralUnits: ActionResult.ValueType # 107 +CantTargetNeutralUnits: ActionResult.ValueType # 108 +MustTargetEnemyUnits: ActionResult.ValueType # 109 +CantTargetEnemyUnits: ActionResult.ValueType # 110 +MustTargetAirUnits: ActionResult.ValueType # 111 +CantTargetAirUnits: ActionResult.ValueType # 112 +MustTargetGroundUnits: ActionResult.ValueType # 113 +CantTargetGroundUnits: ActionResult.ValueType # 114 +MustTargetStructures: ActionResult.ValueType # 115 +CantTargetStructures: ActionResult.ValueType # 116 +MustTargetLightUnits: ActionResult.ValueType # 117 +CantTargetLightUnits: ActionResult.ValueType # 118 +MustTargetArmoredUnits: ActionResult.ValueType # 119 +CantTargetArmoredUnits: ActionResult.ValueType # 120 +MustTargetBiologicalUnits: ActionResult.ValueType # 121 +CantTargetBiologicalUnits: ActionResult.ValueType # 122 +MustTargetHeroicUnits: ActionResult.ValueType # 123 +CantTargetHeroicUnits: ActionResult.ValueType # 124 +MustTargetRoboticUnits: ActionResult.ValueType # 125 +CantTargetRoboticUnits: ActionResult.ValueType # 126 +MustTargetMechanicalUnits: ActionResult.ValueType # 127 +CantTargetMechanicalUnits: ActionResult.ValueType # 128 +MustTargetPsionicUnits: ActionResult.ValueType # 129 +CantTargetPsionicUnits: ActionResult.ValueType # 130 +MustTargetMassiveUnits: ActionResult.ValueType # 131 +CantTargetMassiveUnits: ActionResult.ValueType # 132 +MustTargetMissile: ActionResult.ValueType # 133 +CantTargetMissile: ActionResult.ValueType # 134 +MustTargetWorkerUnits: ActionResult.ValueType # 135 +CantTargetWorkerUnits: ActionResult.ValueType # 136 +MustTargetEnergyCapableUnits: ActionResult.ValueType # 137 +CantTargetEnergyCapableUnits: ActionResult.ValueType # 138 +MustTargetShieldCapableUnits: ActionResult.ValueType # 139 +CantTargetShieldCapableUnits: ActionResult.ValueType # 140 +MustTargetFlyers: ActionResult.ValueType # 141 +CantTargetFlyers: ActionResult.ValueType # 142 +MustTargetBuriedUnits: ActionResult.ValueType # 143 +CantTargetBuriedUnits: ActionResult.ValueType # 144 +MustTargetCloakedUnits: ActionResult.ValueType # 145 +CantTargetCloakedUnits: ActionResult.ValueType # 146 +MustTargetUnitsInAStasisField: ActionResult.ValueType # 147 +CantTargetUnitsInAStasisField: ActionResult.ValueType # 148 +MustTargetUnderConstructionUnits: ActionResult.ValueType # 149 +CantTargetUnderConstructionUnits: ActionResult.ValueType # 150 +MustTargetDeadUnits: ActionResult.ValueType # 151 +CantTargetDeadUnits: ActionResult.ValueType # 152 +MustTargetRevivableUnits: ActionResult.ValueType # 153 +CantTargetRevivableUnits: ActionResult.ValueType # 154 +MustTargetHiddenUnits: ActionResult.ValueType # 155 +CantTargetHiddenUnits: ActionResult.ValueType # 156 +CantRechargeOtherPlayersUnits: ActionResult.ValueType # 157 +MustTargetHallucinations: ActionResult.ValueType # 158 +CantTargetHallucinations: ActionResult.ValueType # 159 +MustTargetInvulnerableUnits: ActionResult.ValueType # 160 +CantTargetInvulnerableUnits: ActionResult.ValueType # 161 +MustTargetDetectedUnits: ActionResult.ValueType # 162 +CantTargetDetectedUnits: ActionResult.ValueType # 163 +CantTargetUnitWithEnergy: ActionResult.ValueType # 164 +CantTargetUnitWithShields: ActionResult.ValueType # 165 +MustTargetUncommandableUnits: ActionResult.ValueType # 166 +CantTargetUncommandableUnits: ActionResult.ValueType # 167 +MustTargetPreventDefeatUnits: ActionResult.ValueType # 168 +CantTargetPreventDefeatUnits: ActionResult.ValueType # 169 +MustTargetPreventRevealUnits: ActionResult.ValueType # 170 +CantTargetPreventRevealUnits: ActionResult.ValueType # 171 +MustTargetPassiveUnits: ActionResult.ValueType # 172 +CantTargetPassiveUnits: ActionResult.ValueType # 173 +MustTargetStunnedUnits: ActionResult.ValueType # 174 +CantTargetStunnedUnits: ActionResult.ValueType # 175 +MustTargetSummonedUnits: ActionResult.ValueType # 176 +CantTargetSummonedUnits: ActionResult.ValueType # 177 +MustTargetUser1: ActionResult.ValueType # 178 +CantTargetUser1: ActionResult.ValueType # 179 +MustTargetUnstoppableUnits: ActionResult.ValueType # 180 +CantTargetUnstoppableUnits: ActionResult.ValueType # 181 +MustTargetResistantUnits: ActionResult.ValueType # 182 +CantTargetResistantUnits: ActionResult.ValueType # 183 +MustTargetDazedUnits: ActionResult.ValueType # 184 +CantTargetDazedUnits: ActionResult.ValueType # 185 +CantLockdown: ActionResult.ValueType # 186 +CantMindControl: ActionResult.ValueType # 187 +MustTargetDestructibles: ActionResult.ValueType # 188 +CantTargetDestructibles: ActionResult.ValueType # 189 +MustTargetItems: ActionResult.ValueType # 190 +CantTargetItems: ActionResult.ValueType # 191 +NoCalldownAvailable: ActionResult.ValueType # 192 +WaypointListFull: ActionResult.ValueType # 193 +MustTargetRace: ActionResult.ValueType # 194 +CantTargetRace: ActionResult.ValueType # 195 +MustTargetSimilarUnits: ActionResult.ValueType # 196 +CantTargetSimilarUnits: ActionResult.ValueType # 197 +CantFindEnoughTargets: ActionResult.ValueType # 198 +AlreadySpawningLarva: ActionResult.ValueType # 199 +CantTargetExhaustedResources: ActionResult.ValueType # 200 +CantUseMinimap: ActionResult.ValueType # 201 +CantUseInfoPanel: ActionResult.ValueType # 202 +OrderQueueIsFull: ActionResult.ValueType # 203 +CantHarvestThatResource: ActionResult.ValueType # 204 +HarvestersNotRequired: ActionResult.ValueType # 205 +AlreadyTargeted: ActionResult.ValueType # 206 +CantAttackWeaponsDisabled: ActionResult.ValueType # 207 +CouldntReachTarget: ActionResult.ValueType # 208 +TargetIsOutOfRange: ActionResult.ValueType # 209 +TargetIsTooClose: ActionResult.ValueType # 210 +TargetIsOutOfArc: ActionResult.ValueType # 211 +CantFindTeleportLocation: ActionResult.ValueType # 212 +InvalidItemClass: ActionResult.ValueType # 213 +CantFindCancelOrder: ActionResult.ValueType # 214 +global___ActionResult = ActionResult diff --git a/stubs/s2clientprotocol/s2clientprotocol/query_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/query_pb2.pyi new file mode 100644 index 000000000..2077427a1 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/query_pb2.pyi @@ -0,0 +1,199 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.message +import s2clientprotocol.common_pb2 +import s2clientprotocol.error_pb2 +import sys + +if sys.version_info >= (3, 8): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class RequestQuery(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PATHING_FIELD_NUMBER: builtins.int + ABILITIES_FIELD_NUMBER: builtins.int + PLACEMENTS_FIELD_NUMBER: builtins.int + IGNORE_RESOURCE_REQUIREMENTS_FIELD_NUMBER: builtins.int + @property + def pathing(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RequestQueryPathing]: ... + @property + def abilities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RequestQueryAvailableAbilities]: ... + @property + def placements(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RequestQueryBuildingPlacement]: ... + ignore_resource_requirements: builtins.bool + """Ignores requirements like food, minerals and so on.""" + def __init__( + self, + *, + pathing: collections.abc.Iterable[global___RequestQueryPathing] | None = ..., + abilities: collections.abc.Iterable[global___RequestQueryAvailableAbilities] | None = ..., + placements: collections.abc.Iterable[global___RequestQueryBuildingPlacement] | None = ..., + ignore_resource_requirements: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ignore_resource_requirements", b"ignore_resource_requirements"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["abilities", b"abilities", "ignore_resource_requirements", b"ignore_resource_requirements", "pathing", b"pathing", "placements", b"placements"]) -> None: ... + +global___RequestQuery = RequestQuery + +@typing_extensions.final +class ResponseQuery(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PATHING_FIELD_NUMBER: builtins.int + ABILITIES_FIELD_NUMBER: builtins.int + PLACEMENTS_FIELD_NUMBER: builtins.int + @property + def pathing(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ResponseQueryPathing]: ... + @property + def abilities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ResponseQueryAvailableAbilities]: ... + @property + def placements(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ResponseQueryBuildingPlacement]: ... + def __init__( + self, + *, + pathing: collections.abc.Iterable[global___ResponseQueryPathing] | None = ..., + abilities: collections.abc.Iterable[global___ResponseQueryAvailableAbilities] | None = ..., + placements: collections.abc.Iterable[global___ResponseQueryBuildingPlacement] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["abilities", b"abilities", "pathing", b"pathing", "placements", b"placements"]) -> None: ... + +global___ResponseQuery = ResponseQuery + +@typing_extensions.final +class RequestQueryPathing(google.protobuf.message.Message): + """--------------------------------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + START_POS_FIELD_NUMBER: builtins.int + UNIT_TAG_FIELD_NUMBER: builtins.int + END_POS_FIELD_NUMBER: builtins.int + @property + def start_pos(self) -> s2clientprotocol.common_pb2.Point2D: ... + unit_tag: builtins.int + @property + def end_pos(self) -> s2clientprotocol.common_pb2.Point2D: ... + def __init__( + self, + *, + start_pos: s2clientprotocol.common_pb2.Point2D | None = ..., + unit_tag: builtins.int | None = ..., + end_pos: s2clientprotocol.common_pb2.Point2D | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["end_pos", b"end_pos", "start", b"start", "start_pos", b"start_pos", "unit_tag", b"unit_tag"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["end_pos", b"end_pos", "start", b"start", "start_pos", b"start_pos", "unit_tag", b"unit_tag"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["start", b"start"]) -> typing_extensions.Literal["start_pos", "unit_tag"] | None: ... + +global___RequestQueryPathing = RequestQueryPathing + +@typing_extensions.final +class ResponseQueryPathing(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DISTANCE_FIELD_NUMBER: builtins.int + distance: builtins.float + """0 if no path exists""" + def __init__( + self, + *, + distance: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["distance", b"distance"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["distance", b"distance"]) -> None: ... + +global___ResponseQueryPathing = ResponseQueryPathing + +@typing_extensions.final +class RequestQueryAvailableAbilities(google.protobuf.message.Message): + """--------------------------------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_TAG_FIELD_NUMBER: builtins.int + unit_tag: builtins.int + def __init__( + self, + *, + unit_tag: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["unit_tag", b"unit_tag"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["unit_tag", b"unit_tag"]) -> None: ... + +global___RequestQueryAvailableAbilities = RequestQueryAvailableAbilities + +@typing_extensions.final +class ResponseQueryAvailableAbilities(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITIES_FIELD_NUMBER: builtins.int + UNIT_TAG_FIELD_NUMBER: builtins.int + UNIT_TYPE_ID_FIELD_NUMBER: builtins.int + @property + def abilities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.common_pb2.AvailableAbility]: ... + unit_tag: builtins.int + unit_type_id: builtins.int + def __init__( + self, + *, + abilities: collections.abc.Iterable[s2clientprotocol.common_pb2.AvailableAbility] | None = ..., + unit_tag: builtins.int | None = ..., + unit_type_id: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["unit_tag", b"unit_tag", "unit_type_id", b"unit_type_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["abilities", b"abilities", "unit_tag", b"unit_tag", "unit_type_id", b"unit_type_id"]) -> None: ... + +global___ResponseQueryAvailableAbilities = ResponseQueryAvailableAbilities + +@typing_extensions.final +class RequestQueryBuildingPlacement(google.protobuf.message.Message): + """--------------------------------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + TARGET_POS_FIELD_NUMBER: builtins.int + PLACING_UNIT_TAG_FIELD_NUMBER: builtins.int + ability_id: builtins.int + @property + def target_pos(self) -> s2clientprotocol.common_pb2.Point2D: ... + placing_unit_tag: builtins.int + """Not required""" + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + target_pos: s2clientprotocol.common_pb2.Point2D | None = ..., + placing_unit_tag: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "placing_unit_tag", b"placing_unit_tag", "target_pos", b"target_pos"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "placing_unit_tag", b"placing_unit_tag", "target_pos", b"target_pos"]) -> None: ... + +global___RequestQueryBuildingPlacement = RequestQueryBuildingPlacement + +@typing_extensions.final +class ResponseQueryBuildingPlacement(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESULT_FIELD_NUMBER: builtins.int + result: s2clientprotocol.error_pb2.ActionResult.ValueType + def __init__( + self, + *, + result: s2clientprotocol.error_pb2.ActionResult.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["result", b"result"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["result", b"result"]) -> None: ... + +global___ResponseQueryBuildingPlacement = ResponseQueryBuildingPlacement diff --git a/stubs/s2clientprotocol/s2clientprotocol/raw_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/raw_pb2.pyi new file mode 100644 index 000000000..9a0c9aea4 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/raw_pb2.pyi @@ -0,0 +1,662 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import s2clientprotocol.common_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _DisplayType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DisplayTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DisplayType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Visible: _DisplayType.ValueType # 1 + """Fully visible""" + Snapshot: _DisplayType.ValueType # 2 + """Dimmed version of unit left behind after entering fog of war""" + Hidden: _DisplayType.ValueType # 3 + """Fully hidden""" + Placeholder: _DisplayType.ValueType # 4 + """Building that hasn't started construction.""" + +class DisplayType(_DisplayType, metaclass=_DisplayTypeEnumTypeWrapper): ... + +Visible: DisplayType.ValueType # 1 +"""Fully visible""" +Snapshot: DisplayType.ValueType # 2 +"""Dimmed version of unit left behind after entering fog of war""" +Hidden: DisplayType.ValueType # 3 +"""Fully hidden""" +Placeholder: DisplayType.ValueType # 4 +"""Building that hasn't started construction.""" +global___DisplayType = DisplayType + +class _Alliance: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _AllianceEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Alliance.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Self: _Alliance.ValueType # 1 + Ally: _Alliance.ValueType # 2 + Neutral: _Alliance.ValueType # 3 + Enemy: _Alliance.ValueType # 4 + +class Alliance(_Alliance, metaclass=_AllianceEnumTypeWrapper): ... + +Self: Alliance.ValueType # 1 +Ally: Alliance.ValueType # 2 +Neutral: Alliance.ValueType # 3 +Enemy: Alliance.ValueType # 4 +global___Alliance = Alliance + +class _CloakState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _CloakStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_CloakState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + CloakedUnknown: _CloakState.ValueType # 0 + """Under the fog, so unknown whether it's cloaked or not.""" + Cloaked: _CloakState.ValueType # 1 + CloakedDetected: _CloakState.ValueType # 2 + NotCloaked: _CloakState.ValueType # 3 + CloakedAllied: _CloakState.ValueType # 4 + +class CloakState(_CloakState, metaclass=_CloakStateEnumTypeWrapper): ... + +CloakedUnknown: CloakState.ValueType # 0 +"""Under the fog, so unknown whether it's cloaked or not.""" +Cloaked: CloakState.ValueType # 1 +CloakedDetected: CloakState.ValueType # 2 +NotCloaked: CloakState.ValueType # 3 +CloakedAllied: CloakState.ValueType # 4 +global___CloakState = CloakState + +@typing_extensions.final +class StartRaw(google.protobuf.message.Message): + """ + Start + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAP_SIZE_FIELD_NUMBER: builtins.int + PATHING_GRID_FIELD_NUMBER: builtins.int + TERRAIN_HEIGHT_FIELD_NUMBER: builtins.int + PLACEMENT_GRID_FIELD_NUMBER: builtins.int + PLAYABLE_AREA_FIELD_NUMBER: builtins.int + START_LOCATIONS_FIELD_NUMBER: builtins.int + @property + def map_size(self) -> s2clientprotocol.common_pb2.Size2DI: + """Width and height of the map.""" + @property + def pathing_grid(self) -> s2clientprotocol.common_pb2.ImageData: + """1 bit bitmap of the pathing grid.""" + @property + def terrain_height(self) -> s2clientprotocol.common_pb2.ImageData: + """1 byte bitmap of the terrain height.""" + @property + def placement_grid(self) -> s2clientprotocol.common_pb2.ImageData: + """1 bit bitmap of the building placement grid.""" + @property + def playable_area(self) -> s2clientprotocol.common_pb2.RectangleI: + """The playable cells.""" + @property + def start_locations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.common_pb2.Point2D]: + """Possible start locations for players.""" + def __init__( + self, + *, + map_size: s2clientprotocol.common_pb2.Size2DI | None = ..., + pathing_grid: s2clientprotocol.common_pb2.ImageData | None = ..., + terrain_height: s2clientprotocol.common_pb2.ImageData | None = ..., + placement_grid: s2clientprotocol.common_pb2.ImageData | None = ..., + playable_area: s2clientprotocol.common_pb2.RectangleI | None = ..., + start_locations: collections.abc.Iterable[s2clientprotocol.common_pb2.Point2D] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["map_size", b"map_size", "pathing_grid", b"pathing_grid", "placement_grid", b"placement_grid", "playable_area", b"playable_area", "terrain_height", b"terrain_height"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["map_size", b"map_size", "pathing_grid", b"pathing_grid", "placement_grid", b"placement_grid", "playable_area", b"playable_area", "start_locations", b"start_locations", "terrain_height", b"terrain_height"]) -> None: ... + +global___StartRaw = StartRaw + +@typing_extensions.final +class ObservationRaw(google.protobuf.message.Message): + """ + Observation + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_FIELD_NUMBER: builtins.int + UNITS_FIELD_NUMBER: builtins.int + MAP_STATE_FIELD_NUMBER: builtins.int + EVENT_FIELD_NUMBER: builtins.int + EFFECTS_FIELD_NUMBER: builtins.int + RADAR_FIELD_NUMBER: builtins.int + @property + def player(self) -> global___PlayerRaw: ... + @property + def units(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Unit]: ... + @property + def map_state(self) -> global___MapState: + """Fog of war, creep and so on. Board stuff that changes per frame.""" + @property + def event(self) -> global___Event: ... + @property + def effects(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Effect]: ... + @property + def radar(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RadarRing]: ... + def __init__( + self, + *, + player: global___PlayerRaw | None = ..., + units: collections.abc.Iterable[global___Unit] | None = ..., + map_state: global___MapState | None = ..., + event: global___Event | None = ..., + effects: collections.abc.Iterable[global___Effect] | None = ..., + radar: collections.abc.Iterable[global___RadarRing] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["event", b"event", "map_state", b"map_state", "player", b"player"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["effects", b"effects", "event", b"event", "map_state", b"map_state", "player", b"player", "radar", b"radar", "units", b"units"]) -> None: ... + +global___ObservationRaw = ObservationRaw + +@typing_extensions.final +class RadarRing(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + POS_FIELD_NUMBER: builtins.int + RADIUS_FIELD_NUMBER: builtins.int + @property + def pos(self) -> s2clientprotocol.common_pb2.Point: ... + radius: builtins.float + def __init__( + self, + *, + pos: s2clientprotocol.common_pb2.Point | None = ..., + radius: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["pos", b"pos", "radius", b"radius"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["pos", b"pos", "radius", b"radius"]) -> None: ... + +global___RadarRing = RadarRing + +@typing_extensions.final +class PowerSource(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + POS_FIELD_NUMBER: builtins.int + RADIUS_FIELD_NUMBER: builtins.int + TAG_FIELD_NUMBER: builtins.int + @property + def pos(self) -> s2clientprotocol.common_pb2.Point: ... + radius: builtins.float + tag: builtins.int + def __init__( + self, + *, + pos: s2clientprotocol.common_pb2.Point | None = ..., + radius: builtins.float | None = ..., + tag: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["pos", b"pos", "radius", b"radius", "tag", b"tag"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["pos", b"pos", "radius", b"radius", "tag", b"tag"]) -> None: ... + +global___PowerSource = PowerSource + +@typing_extensions.final +class PlayerRaw(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + POWER_SOURCES_FIELD_NUMBER: builtins.int + CAMERA_FIELD_NUMBER: builtins.int + UPGRADE_IDS_FIELD_NUMBER: builtins.int + @property + def power_sources(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PowerSource]: ... + @property + def camera(self) -> s2clientprotocol.common_pb2.Point: ... + @property + def upgrade_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: + """TODO: Add to UI observation?""" + def __init__( + self, + *, + power_sources: collections.abc.Iterable[global___PowerSource] | None = ..., + camera: s2clientprotocol.common_pb2.Point | None = ..., + upgrade_ids: collections.abc.Iterable[builtins.int] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["camera", b"camera"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["camera", b"camera", "power_sources", b"power_sources", "upgrade_ids", b"upgrade_ids"]) -> None: ... + +global___PlayerRaw = PlayerRaw + +@typing_extensions.final +class UnitOrder(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + TARGET_WORLD_SPACE_POS_FIELD_NUMBER: builtins.int + TARGET_UNIT_TAG_FIELD_NUMBER: builtins.int + PROGRESS_FIELD_NUMBER: builtins.int + ability_id: builtins.int + @property + def target_world_space_pos(self) -> s2clientprotocol.common_pb2.Point: ... + target_unit_tag: builtins.int + progress: builtins.float + """Progress of train abilities. Range: [0.0, 1.0]""" + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + target_world_space_pos: s2clientprotocol.common_pb2.Point | None = ..., + target_unit_tag: builtins.int | None = ..., + progress: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "progress", b"progress", "target", b"target", "target_unit_tag", b"target_unit_tag", "target_world_space_pos", b"target_world_space_pos"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "progress", b"progress", "target", b"target", "target_unit_tag", b"target_unit_tag", "target_world_space_pos", b"target_world_space_pos"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["target", b"target"]) -> typing_extensions.Literal["target_world_space_pos", "target_unit_tag"] | None: ... + +global___UnitOrder = UnitOrder + +@typing_extensions.final +class PassengerUnit(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TAG_FIELD_NUMBER: builtins.int + HEALTH_FIELD_NUMBER: builtins.int + HEALTH_MAX_FIELD_NUMBER: builtins.int + SHIELD_FIELD_NUMBER: builtins.int + SHIELD_MAX_FIELD_NUMBER: builtins.int + ENERGY_FIELD_NUMBER: builtins.int + ENERGY_MAX_FIELD_NUMBER: builtins.int + UNIT_TYPE_FIELD_NUMBER: builtins.int + tag: builtins.int + health: builtins.float + health_max: builtins.float + shield: builtins.float + shield_max: builtins.float + energy: builtins.float + energy_max: builtins.float + unit_type: builtins.int + def __init__( + self, + *, + tag: builtins.int | None = ..., + health: builtins.float | None = ..., + health_max: builtins.float | None = ..., + shield: builtins.float | None = ..., + shield_max: builtins.float | None = ..., + energy: builtins.float | None = ..., + energy_max: builtins.float | None = ..., + unit_type: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["energy", b"energy", "energy_max", b"energy_max", "health", b"health", "health_max", b"health_max", "shield", b"shield", "shield_max", b"shield_max", "tag", b"tag", "unit_type", b"unit_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["energy", b"energy", "energy_max", b"energy_max", "health", b"health", "health_max", b"health_max", "shield", b"shield", "shield_max", b"shield_max", "tag", b"tag", "unit_type", b"unit_type"]) -> None: ... + +global___PassengerUnit = PassengerUnit + +@typing_extensions.final +class RallyTarget(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + POINT_FIELD_NUMBER: builtins.int + TAG_FIELD_NUMBER: builtins.int + @property + def point(self) -> s2clientprotocol.common_pb2.Point: + """Will always be filled.""" + tag: builtins.int + """Only if it's targeting a unit.""" + def __init__( + self, + *, + point: s2clientprotocol.common_pb2.Point | None = ..., + tag: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["point", b"point", "tag", b"tag"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["point", b"point", "tag", b"tag"]) -> None: ... + +global___RallyTarget = RallyTarget + +@typing_extensions.final +class Unit(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DISPLAY_TYPE_FIELD_NUMBER: builtins.int + ALLIANCE_FIELD_NUMBER: builtins.int + TAG_FIELD_NUMBER: builtins.int + UNIT_TYPE_FIELD_NUMBER: builtins.int + OWNER_FIELD_NUMBER: builtins.int + POS_FIELD_NUMBER: builtins.int + FACING_FIELD_NUMBER: builtins.int + RADIUS_FIELD_NUMBER: builtins.int + BUILD_PROGRESS_FIELD_NUMBER: builtins.int + CLOAK_FIELD_NUMBER: builtins.int + BUFF_IDS_FIELD_NUMBER: builtins.int + DETECT_RANGE_FIELD_NUMBER: builtins.int + RADAR_RANGE_FIELD_NUMBER: builtins.int + IS_SELECTED_FIELD_NUMBER: builtins.int + IS_ON_SCREEN_FIELD_NUMBER: builtins.int + IS_BLIP_FIELD_NUMBER: builtins.int + IS_POWERED_FIELD_NUMBER: builtins.int + IS_ACTIVE_FIELD_NUMBER: builtins.int + ATTACK_UPGRADE_LEVEL_FIELD_NUMBER: builtins.int + ARMOR_UPGRADE_LEVEL_FIELD_NUMBER: builtins.int + SHIELD_UPGRADE_LEVEL_FIELD_NUMBER: builtins.int + HEALTH_FIELD_NUMBER: builtins.int + HEALTH_MAX_FIELD_NUMBER: builtins.int + SHIELD_FIELD_NUMBER: builtins.int + SHIELD_MAX_FIELD_NUMBER: builtins.int + ENERGY_FIELD_NUMBER: builtins.int + ENERGY_MAX_FIELD_NUMBER: builtins.int + MINERAL_CONTENTS_FIELD_NUMBER: builtins.int + VESPENE_CONTENTS_FIELD_NUMBER: builtins.int + IS_FLYING_FIELD_NUMBER: builtins.int + IS_BURROWED_FIELD_NUMBER: builtins.int + IS_HALLUCINATION_FIELD_NUMBER: builtins.int + ORDERS_FIELD_NUMBER: builtins.int + ADD_ON_TAG_FIELD_NUMBER: builtins.int + PASSENGERS_FIELD_NUMBER: builtins.int + CARGO_SPACE_TAKEN_FIELD_NUMBER: builtins.int + CARGO_SPACE_MAX_FIELD_NUMBER: builtins.int + ASSIGNED_HARVESTERS_FIELD_NUMBER: builtins.int + IDEAL_HARVESTERS_FIELD_NUMBER: builtins.int + WEAPON_COOLDOWN_FIELD_NUMBER: builtins.int + ENGAGED_TARGET_TAG_FIELD_NUMBER: builtins.int + BUFF_DURATION_REMAIN_FIELD_NUMBER: builtins.int + BUFF_DURATION_MAX_FIELD_NUMBER: builtins.int + RALLY_TARGETS_FIELD_NUMBER: builtins.int + display_type: global___DisplayType.ValueType + """Fields are populated based on type/alliance""" + alliance: global___Alliance.ValueType + tag: builtins.int + """Unique identifier for a unit""" + unit_type: builtins.int + owner: builtins.int + @property + def pos(self) -> s2clientprotocol.common_pb2.Point: ... + facing: builtins.float + radius: builtins.float + build_progress: builtins.float + """Range: [0.0, 1.0]""" + cloak: global___CloakState.ValueType + @property + def buff_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + detect_range: builtins.float + radar_range: builtins.float + is_selected: builtins.bool + is_on_screen: builtins.bool + """Visible and within the camera frustrum.""" + is_blip: builtins.bool + """Detected by sensor tower""" + is_powered: builtins.bool + is_active: builtins.bool + """Building is training/researching (ie animated).""" + attack_upgrade_level: builtins.int + armor_upgrade_level: builtins.int + shield_upgrade_level: builtins.int + health: builtins.float + """Not populated for snapshots""" + health_max: builtins.float + shield: builtins.float + shield_max: builtins.float + energy: builtins.float + energy_max: builtins.float + mineral_contents: builtins.int + vespene_contents: builtins.int + is_flying: builtins.bool + is_burrowed: builtins.bool + is_hallucination: builtins.bool + """Unit is your own or detected as a hallucination.""" + @property + def orders(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UnitOrder]: + """Not populated for enemies""" + add_on_tag: builtins.int + @property + def passengers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PassengerUnit]: ... + cargo_space_taken: builtins.int + cargo_space_max: builtins.int + assigned_harvesters: builtins.int + ideal_harvesters: builtins.int + weapon_cooldown: builtins.float + engaged_target_tag: builtins.int + buff_duration_remain: builtins.int + """How long a buff or unit is still around (eg mule, broodling, chronoboost).""" + buff_duration_max: builtins.int + """How long the buff or unit is still around (eg mule, broodling, chronoboost).""" + @property + def rally_targets(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RallyTarget]: ... + def __init__( + self, + *, + display_type: global___DisplayType.ValueType | None = ..., + alliance: global___Alliance.ValueType | None = ..., + tag: builtins.int | None = ..., + unit_type: builtins.int | None = ..., + owner: builtins.int | None = ..., + pos: s2clientprotocol.common_pb2.Point | None = ..., + facing: builtins.float | None = ..., + radius: builtins.float | None = ..., + build_progress: builtins.float | None = ..., + cloak: global___CloakState.ValueType | None = ..., + buff_ids: collections.abc.Iterable[builtins.int] | None = ..., + detect_range: builtins.float | None = ..., + radar_range: builtins.float | None = ..., + is_selected: builtins.bool | None = ..., + is_on_screen: builtins.bool | None = ..., + is_blip: builtins.bool | None = ..., + is_powered: builtins.bool | None = ..., + is_active: builtins.bool | None = ..., + attack_upgrade_level: builtins.int | None = ..., + armor_upgrade_level: builtins.int | None = ..., + shield_upgrade_level: builtins.int | None = ..., + health: builtins.float | None = ..., + health_max: builtins.float | None = ..., + shield: builtins.float | None = ..., + shield_max: builtins.float | None = ..., + energy: builtins.float | None = ..., + energy_max: builtins.float | None = ..., + mineral_contents: builtins.int | None = ..., + vespene_contents: builtins.int | None = ..., + is_flying: builtins.bool | None = ..., + is_burrowed: builtins.bool | None = ..., + is_hallucination: builtins.bool | None = ..., + orders: collections.abc.Iterable[global___UnitOrder] | None = ..., + add_on_tag: builtins.int | None = ..., + passengers: collections.abc.Iterable[global___PassengerUnit] | None = ..., + cargo_space_taken: builtins.int | None = ..., + cargo_space_max: builtins.int | None = ..., + assigned_harvesters: builtins.int | None = ..., + ideal_harvesters: builtins.int | None = ..., + weapon_cooldown: builtins.float | None = ..., + engaged_target_tag: builtins.int | None = ..., + buff_duration_remain: builtins.int | None = ..., + buff_duration_max: builtins.int | None = ..., + rally_targets: collections.abc.Iterable[global___RallyTarget] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["add_on_tag", b"add_on_tag", "alliance", b"alliance", "armor_upgrade_level", b"armor_upgrade_level", "assigned_harvesters", b"assigned_harvesters", "attack_upgrade_level", b"attack_upgrade_level", "buff_duration_max", b"buff_duration_max", "buff_duration_remain", b"buff_duration_remain", "build_progress", b"build_progress", "cargo_space_max", b"cargo_space_max", "cargo_space_taken", b"cargo_space_taken", "cloak", b"cloak", "detect_range", b"detect_range", "display_type", b"display_type", "energy", b"energy", "energy_max", b"energy_max", "engaged_target_tag", b"engaged_target_tag", "facing", b"facing", "health", b"health", "health_max", b"health_max", "ideal_harvesters", b"ideal_harvesters", "is_active", b"is_active", "is_blip", b"is_blip", "is_burrowed", b"is_burrowed", "is_flying", b"is_flying", "is_hallucination", b"is_hallucination", "is_on_screen", b"is_on_screen", "is_powered", b"is_powered", "is_selected", b"is_selected", "mineral_contents", b"mineral_contents", "owner", b"owner", "pos", b"pos", "radar_range", b"radar_range", "radius", b"radius", "shield", b"shield", "shield_max", b"shield_max", "shield_upgrade_level", b"shield_upgrade_level", "tag", b"tag", "unit_type", b"unit_type", "vespene_contents", b"vespene_contents", "weapon_cooldown", b"weapon_cooldown"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["add_on_tag", b"add_on_tag", "alliance", b"alliance", "armor_upgrade_level", b"armor_upgrade_level", "assigned_harvesters", b"assigned_harvesters", "attack_upgrade_level", b"attack_upgrade_level", "buff_duration_max", b"buff_duration_max", "buff_duration_remain", b"buff_duration_remain", "buff_ids", b"buff_ids", "build_progress", b"build_progress", "cargo_space_max", b"cargo_space_max", "cargo_space_taken", b"cargo_space_taken", "cloak", b"cloak", "detect_range", b"detect_range", "display_type", b"display_type", "energy", b"energy", "energy_max", b"energy_max", "engaged_target_tag", b"engaged_target_tag", "facing", b"facing", "health", b"health", "health_max", b"health_max", "ideal_harvesters", b"ideal_harvesters", "is_active", b"is_active", "is_blip", b"is_blip", "is_burrowed", b"is_burrowed", "is_flying", b"is_flying", "is_hallucination", b"is_hallucination", "is_on_screen", b"is_on_screen", "is_powered", b"is_powered", "is_selected", b"is_selected", "mineral_contents", b"mineral_contents", "orders", b"orders", "owner", b"owner", "passengers", b"passengers", "pos", b"pos", "radar_range", b"radar_range", "radius", b"radius", "rally_targets", b"rally_targets", "shield", b"shield", "shield_max", b"shield_max", "shield_upgrade_level", b"shield_upgrade_level", "tag", b"tag", "unit_type", b"unit_type", "vespene_contents", b"vespene_contents", "weapon_cooldown", b"weapon_cooldown"]) -> None: ... + +global___Unit = Unit + +@typing_extensions.final +class MapState(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + VISIBILITY_FIELD_NUMBER: builtins.int + CREEP_FIELD_NUMBER: builtins.int + @property + def visibility(self) -> s2clientprotocol.common_pb2.ImageData: + """1 byte visibility layer.""" + @property + def creep(self) -> s2clientprotocol.common_pb2.ImageData: + """1 bit creep layer.""" + def __init__( + self, + *, + visibility: s2clientprotocol.common_pb2.ImageData | None = ..., + creep: s2clientprotocol.common_pb2.ImageData | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["creep", b"creep", "visibility", b"visibility"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["creep", b"creep", "visibility", b"visibility"]) -> None: ... + +global___MapState = MapState + +@typing_extensions.final +class Event(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEAD_UNITS_FIELD_NUMBER: builtins.int + @property + def dead_units(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + def __init__( + self, + *, + dead_units: collections.abc.Iterable[builtins.int] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["dead_units", b"dead_units"]) -> None: ... + +global___Event = Event + +@typing_extensions.final +class Effect(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + EFFECT_ID_FIELD_NUMBER: builtins.int + POS_FIELD_NUMBER: builtins.int + ALLIANCE_FIELD_NUMBER: builtins.int + OWNER_FIELD_NUMBER: builtins.int + RADIUS_FIELD_NUMBER: builtins.int + effect_id: builtins.int + @property + def pos(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.common_pb2.Point2D]: + """Effect may impact multiple locations. (eg. Lurker attack)""" + alliance: global___Alliance.ValueType + owner: builtins.int + radius: builtins.float + def __init__( + self, + *, + effect_id: builtins.int | None = ..., + pos: collections.abc.Iterable[s2clientprotocol.common_pb2.Point2D] | None = ..., + alliance: global___Alliance.ValueType | None = ..., + owner: builtins.int | None = ..., + radius: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["alliance", b"alliance", "effect_id", b"effect_id", "owner", b"owner", "radius", b"radius"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["alliance", b"alliance", "effect_id", b"effect_id", "owner", b"owner", "pos", b"pos", "radius", b"radius"]) -> None: ... + +global___Effect = Effect + +@typing_extensions.final +class ActionRaw(google.protobuf.message.Message): + """ + Action + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_COMMAND_FIELD_NUMBER: builtins.int + CAMERA_MOVE_FIELD_NUMBER: builtins.int + TOGGLE_AUTOCAST_FIELD_NUMBER: builtins.int + @property + def unit_command(self) -> global___ActionRawUnitCommand: ... + @property + def camera_move(self) -> global___ActionRawCameraMove: ... + @property + def toggle_autocast(self) -> global___ActionRawToggleAutocast: ... + def __init__( + self, + *, + unit_command: global___ActionRawUnitCommand | None = ..., + camera_move: global___ActionRawCameraMove | None = ..., + toggle_autocast: global___ActionRawToggleAutocast | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "camera_move", b"camera_move", "toggle_autocast", b"toggle_autocast", "unit_command", b"unit_command"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "camera_move", b"camera_move", "toggle_autocast", b"toggle_autocast", "unit_command", b"unit_command"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["action", b"action"]) -> typing_extensions.Literal["unit_command", "camera_move", "toggle_autocast"] | None: ... + +global___ActionRaw = ActionRaw + +@typing_extensions.final +class ActionRawUnitCommand(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + TARGET_WORLD_SPACE_POS_FIELD_NUMBER: builtins.int + TARGET_UNIT_TAG_FIELD_NUMBER: builtins.int + UNIT_TAGS_FIELD_NUMBER: builtins.int + QUEUE_COMMAND_FIELD_NUMBER: builtins.int + ability_id: builtins.int + @property + def target_world_space_pos(self) -> s2clientprotocol.common_pb2.Point2D: ... + target_unit_tag: builtins.int + @property + def unit_tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + queue_command: builtins.bool + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + target_world_space_pos: s2clientprotocol.common_pb2.Point2D | None = ..., + target_unit_tag: builtins.int | None = ..., + unit_tags: collections.abc.Iterable[builtins.int] | None = ..., + queue_command: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "queue_command", b"queue_command", "target", b"target", "target_unit_tag", b"target_unit_tag", "target_world_space_pos", b"target_world_space_pos"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "queue_command", b"queue_command", "target", b"target", "target_unit_tag", b"target_unit_tag", "target_world_space_pos", b"target_world_space_pos", "unit_tags", b"unit_tags"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["target", b"target"]) -> typing_extensions.Literal["target_world_space_pos", "target_unit_tag"] | None: ... + +global___ActionRawUnitCommand = ActionRawUnitCommand + +@typing_extensions.final +class ActionRawCameraMove(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CENTER_WORLD_SPACE_FIELD_NUMBER: builtins.int + @property + def center_world_space(self) -> s2clientprotocol.common_pb2.Point: ... + def __init__( + self, + *, + center_world_space: s2clientprotocol.common_pb2.Point | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["center_world_space", b"center_world_space"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["center_world_space", b"center_world_space"]) -> None: ... + +global___ActionRawCameraMove = ActionRawCameraMove + +@typing_extensions.final +class ActionRawToggleAutocast(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + UNIT_TAGS_FIELD_NUMBER: builtins.int + ability_id: builtins.int + @property + def unit_tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + unit_tags: collections.abc.Iterable[builtins.int] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "unit_tags", b"unit_tags"]) -> None: ... + +global___ActionRawToggleAutocast = ActionRawToggleAutocast diff --git a/stubs/s2clientprotocol/s2clientprotocol/sc2api_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/sc2api_pb2.pyi new file mode 100644 index 000000000..23c69ca1f --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/sc2api_pb2.pyi @@ -0,0 +1,2069 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import s2clientprotocol.common_pb2 +import s2clientprotocol.data_pb2 +import s2clientprotocol.debug_pb2 +import s2clientprotocol.error_pb2 +import s2clientprotocol.query_pb2 +import s2clientprotocol.raw_pb2 +import s2clientprotocol.score_pb2 +import s2clientprotocol.spatial_pb2 +import s2clientprotocol.ui_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +class _Status: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _StatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Status.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + launched: _Status.ValueType # 1 + """Game has been launch and is not yet doing anything.""" + init_game: _Status.ValueType # 2 + """Create game has been called, and the host is awaiting players.""" + in_game: _Status.ValueType # 3 + """In a single or multiplayer game.""" + in_replay: _Status.ValueType # 4 + """In a replay.""" + ended: _Status.ValueType # 5 + """Game has ended, can still request game info, but ready for a new game.""" + quit: _Status.ValueType # 6 + """Application is shutting down.""" + unknown: _Status.ValueType # 99 + """Should not happen, but indicates an error if it occurs.""" + +class Status(_Status, metaclass=_StatusEnumTypeWrapper): ... + +launched: Status.ValueType # 1 +"""Game has been launch and is not yet doing anything.""" +init_game: Status.ValueType # 2 +"""Create game has been called, and the host is awaiting players.""" +in_game: Status.ValueType # 3 +"""In a single or multiplayer game.""" +in_replay: Status.ValueType # 4 +"""In a replay.""" +ended: Status.ValueType # 5 +"""Game has ended, can still request game info, but ready for a new game.""" +quit: Status.ValueType # 6 +"""Application is shutting down.""" +unknown: Status.ValueType # 99 +"""Should not happen, but indicates an error if it occurs.""" +global___Status = Status + +class _Difficulty: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _DifficultyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Difficulty.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + VeryEasy: _Difficulty.ValueType # 1 + Easy: _Difficulty.ValueType # 2 + Medium: _Difficulty.ValueType # 3 + MediumHard: _Difficulty.ValueType # 4 + Hard: _Difficulty.ValueType # 5 + Harder: _Difficulty.ValueType # 6 + VeryHard: _Difficulty.ValueType # 7 + CheatVision: _Difficulty.ValueType # 8 + CheatMoney: _Difficulty.ValueType # 9 + CheatInsane: _Difficulty.ValueType # 10 + +class Difficulty(_Difficulty, metaclass=_DifficultyEnumTypeWrapper): + """ + Game Setup + """ + +VeryEasy: Difficulty.ValueType # 1 +Easy: Difficulty.ValueType # 2 +Medium: Difficulty.ValueType # 3 +MediumHard: Difficulty.ValueType # 4 +Hard: Difficulty.ValueType # 5 +Harder: Difficulty.ValueType # 6 +VeryHard: Difficulty.ValueType # 7 +CheatVision: Difficulty.ValueType # 8 +CheatMoney: Difficulty.ValueType # 9 +CheatInsane: Difficulty.ValueType # 10 +global___Difficulty = Difficulty + +class _PlayerType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _PlayerTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_PlayerType.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Participant: _PlayerType.ValueType # 1 + Computer: _PlayerType.ValueType # 2 + Observer: _PlayerType.ValueType # 3 + +class PlayerType(_PlayerType, metaclass=_PlayerTypeEnumTypeWrapper): ... + +Participant: PlayerType.ValueType # 1 +Computer: PlayerType.ValueType # 2 +Observer: PlayerType.ValueType # 3 +global___PlayerType = PlayerType + +class _AIBuild: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _AIBuildEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_AIBuild.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + RandomBuild: _AIBuild.ValueType # 1 + Rush: _AIBuild.ValueType # 2 + Timing: _AIBuild.ValueType # 3 + Power: _AIBuild.ValueType # 4 + Macro: _AIBuild.ValueType # 5 + Air: _AIBuild.ValueType # 6 + +class AIBuild(_AIBuild, metaclass=_AIBuildEnumTypeWrapper): ... + +RandomBuild: AIBuild.ValueType # 1 +Rush: AIBuild.ValueType # 2 +Timing: AIBuild.ValueType # 3 +Power: AIBuild.ValueType # 4 +Macro: AIBuild.ValueType # 5 +Air: AIBuild.ValueType # 6 +global___AIBuild = AIBuild + +class _Alert: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _AlertEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Alert.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + AlertError: _Alert.ValueType # 3 + AddOnComplete: _Alert.ValueType # 4 + BuildingComplete: _Alert.ValueType # 5 + BuildingUnderAttack: _Alert.ValueType # 6 + LarvaHatched: _Alert.ValueType # 7 + MergeComplete: _Alert.ValueType # 8 + MineralsExhausted: _Alert.ValueType # 9 + MorphComplete: _Alert.ValueType # 10 + MothershipComplete: _Alert.ValueType # 11 + MULEExpired: _Alert.ValueType # 12 + NuclearLaunchDetected: _Alert.ValueType # 1 + NukeComplete: _Alert.ValueType # 13 + NydusWormDetected: _Alert.ValueType # 2 + ResearchComplete: _Alert.ValueType # 14 + TrainError: _Alert.ValueType # 15 + TrainUnitComplete: _Alert.ValueType # 16 + TrainWorkerComplete: _Alert.ValueType # 17 + TransformationComplete: _Alert.ValueType # 18 + UnitUnderAttack: _Alert.ValueType # 19 + UpgradeComplete: _Alert.ValueType # 20 + VespeneExhausted: _Alert.ValueType # 21 + WarpInComplete: _Alert.ValueType # 22 + +class Alert(_Alert, metaclass=_AlertEnumTypeWrapper): ... + +AlertError: Alert.ValueType # 3 +AddOnComplete: Alert.ValueType # 4 +BuildingComplete: Alert.ValueType # 5 +BuildingUnderAttack: Alert.ValueType # 6 +LarvaHatched: Alert.ValueType # 7 +MergeComplete: Alert.ValueType # 8 +MineralsExhausted: Alert.ValueType # 9 +MorphComplete: Alert.ValueType # 10 +MothershipComplete: Alert.ValueType # 11 +MULEExpired: Alert.ValueType # 12 +NuclearLaunchDetected: Alert.ValueType # 1 +NukeComplete: Alert.ValueType # 13 +NydusWormDetected: Alert.ValueType # 2 +ResearchComplete: Alert.ValueType # 14 +TrainError: Alert.ValueType # 15 +TrainUnitComplete: Alert.ValueType # 16 +TrainWorkerComplete: Alert.ValueType # 17 +TransformationComplete: Alert.ValueType # 18 +UnitUnderAttack: Alert.ValueType # 19 +UpgradeComplete: Alert.ValueType # 20 +VespeneExhausted: Alert.ValueType # 21 +WarpInComplete: Alert.ValueType # 22 +global___Alert = Alert + +class _Result: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + +class _ResultEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Result.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Victory: _Result.ValueType # 1 + Defeat: _Result.ValueType # 2 + Tie: _Result.ValueType # 3 + Undecided: _Result.ValueType # 4 + +class Result(_Result, metaclass=_ResultEnumTypeWrapper): ... + +Victory: Result.ValueType # 1 +Defeat: Result.ValueType # 2 +Tie: Result.ValueType # 3 +Undecided: Result.ValueType # 4 +global___Result = Result + +@typing_extensions.final +class Request(google.protobuf.message.Message): + """ + Request/Response + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CREATE_GAME_FIELD_NUMBER: builtins.int + JOIN_GAME_FIELD_NUMBER: builtins.int + RESTART_GAME_FIELD_NUMBER: builtins.int + START_REPLAY_FIELD_NUMBER: builtins.int + LEAVE_GAME_FIELD_NUMBER: builtins.int + QUICK_SAVE_FIELD_NUMBER: builtins.int + QUICK_LOAD_FIELD_NUMBER: builtins.int + QUIT_FIELD_NUMBER: builtins.int + GAME_INFO_FIELD_NUMBER: builtins.int + OBSERVATION_FIELD_NUMBER: builtins.int + ACTION_FIELD_NUMBER: builtins.int + OBS_ACTION_FIELD_NUMBER: builtins.int + STEP_FIELD_NUMBER: builtins.int + DATA_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + SAVE_REPLAY_FIELD_NUMBER: builtins.int + MAP_COMMAND_FIELD_NUMBER: builtins.int + REPLAY_INFO_FIELD_NUMBER: builtins.int + AVAILABLE_MAPS_FIELD_NUMBER: builtins.int + SAVE_MAP_FIELD_NUMBER: builtins.int + PING_FIELD_NUMBER: builtins.int + DEBUG_FIELD_NUMBER: builtins.int + ID_FIELD_NUMBER: builtins.int + @property + def create_game(self) -> global___RequestCreateGame: + """Game Setup + Send to host to initialize game. + """ + @property + def join_game(self) -> global___RequestJoinGame: + """Send to host and all clients for game to begin.""" + @property + def restart_game(self) -> global___RequestRestartGame: + """Single player only. Reinitializes the game with the same player setup.""" + @property + def start_replay(self) -> global___RequestStartReplay: + """Start playing a replay.""" + @property + def leave_game(self) -> global___RequestLeaveGame: + """Multiplayer only. Disconnects from a multiplayer game, equivalent to surrender.""" + @property + def quick_save(self) -> global___RequestQuickSave: + """Saves game to an in-memory bookmark.""" + @property + def quick_load(self) -> global___RequestQuickLoad: + """Loads from an in-memory bookmark.""" + @property + def quit(self) -> global___RequestQuit: + """Terminates the application.""" + @property + def game_info(self) -> global___RequestGameInfo: + """During Game + Static data about the current game and map. + """ + @property + def observation(self) -> global___RequestObservation: + """Snapshot of the current game state.""" + @property + def action(self) -> global___RequestAction: + """Executes an action for a participant.""" + @property + def obs_action(self) -> global___RequestObserverAction: + """Executes an action for an observer.""" + @property + def step(self) -> global___RequestStep: + """Advances the game simulation.""" + @property + def data(self) -> global___RequestData: + """Data about different gameplay elements. May be different for different games.""" + @property + def query(self) -> s2clientprotocol.query_pb2.RequestQuery: + """Additional methods for inspecting game state.""" + @property + def save_replay(self) -> global___RequestSaveReplay: + """Generates a replay.""" + @property + def map_command(self) -> global___RequestMapCommand: + """Execute a particular trigger through a string interface""" + @property + def replay_info(self) -> global___RequestReplayInfo: + """Other. + Returns metadata about a replay file. Does not load the replay. + """ + @property + def available_maps(self) -> global___RequestAvailableMaps: + """Returns directory of maps that can be played on.""" + @property + def save_map(self) -> global___RequestSaveMap: + """Saves binary map data to the local temp directory.""" + @property + def ping(self) -> global___RequestPing: + """Debugging + Network ping for testing connection. + """ + @property + def debug(self) -> global___RequestDebug: + """Display debug information and execute debug actions.""" + id: builtins.int + def __init__( + self, + *, + create_game: global___RequestCreateGame | None = ..., + join_game: global___RequestJoinGame | None = ..., + restart_game: global___RequestRestartGame | None = ..., + start_replay: global___RequestStartReplay | None = ..., + leave_game: global___RequestLeaveGame | None = ..., + quick_save: global___RequestQuickSave | None = ..., + quick_load: global___RequestQuickLoad | None = ..., + quit: global___RequestQuit | None = ..., + game_info: global___RequestGameInfo | None = ..., + observation: global___RequestObservation | None = ..., + action: global___RequestAction | None = ..., + obs_action: global___RequestObserverAction | None = ..., + step: global___RequestStep | None = ..., + data: global___RequestData | None = ..., + query: s2clientprotocol.query_pb2.RequestQuery | None = ..., + save_replay: global___RequestSaveReplay | None = ..., + map_command: global___RequestMapCommand | None = ..., + replay_info: global___RequestReplayInfo | None = ..., + available_maps: global___RequestAvailableMaps | None = ..., + save_map: global___RequestSaveMap | None = ..., + ping: global___RequestPing | None = ..., + debug: global___RequestDebug | None = ..., + id: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "available_maps", b"available_maps", "create_game", b"create_game", "data", b"data", "debug", b"debug", "game_info", b"game_info", "id", b"id", "join_game", b"join_game", "leave_game", b"leave_game", "map_command", b"map_command", "obs_action", b"obs_action", "observation", b"observation", "ping", b"ping", "query", b"query", "quick_load", b"quick_load", "quick_save", b"quick_save", "quit", b"quit", "replay_info", b"replay_info", "request", b"request", "restart_game", b"restart_game", "save_map", b"save_map", "save_replay", b"save_replay", "start_replay", b"start_replay", "step", b"step"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "available_maps", b"available_maps", "create_game", b"create_game", "data", b"data", "debug", b"debug", "game_info", b"game_info", "id", b"id", "join_game", b"join_game", "leave_game", b"leave_game", "map_command", b"map_command", "obs_action", b"obs_action", "observation", b"observation", "ping", b"ping", "query", b"query", "quick_load", b"quick_load", "quick_save", b"quick_save", "quit", b"quit", "replay_info", b"replay_info", "request", b"request", "restart_game", b"restart_game", "save_map", b"save_map", "save_replay", b"save_replay", "start_replay", b"start_replay", "step", b"step"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["request", b"request"]) -> typing_extensions.Literal["create_game", "join_game", "restart_game", "start_replay", "leave_game", "quick_save", "quick_load", "quit", "game_info", "observation", "action", "obs_action", "step", "data", "query", "save_replay", "map_command", "replay_info", "available_maps", "save_map", "ping", "debug"] | None: ... + +global___Request = Request + +@typing_extensions.final +class Response(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CREATE_GAME_FIELD_NUMBER: builtins.int + JOIN_GAME_FIELD_NUMBER: builtins.int + RESTART_GAME_FIELD_NUMBER: builtins.int + START_REPLAY_FIELD_NUMBER: builtins.int + LEAVE_GAME_FIELD_NUMBER: builtins.int + QUICK_SAVE_FIELD_NUMBER: builtins.int + QUICK_LOAD_FIELD_NUMBER: builtins.int + QUIT_FIELD_NUMBER: builtins.int + GAME_INFO_FIELD_NUMBER: builtins.int + OBSERVATION_FIELD_NUMBER: builtins.int + ACTION_FIELD_NUMBER: builtins.int + OBS_ACTION_FIELD_NUMBER: builtins.int + STEP_FIELD_NUMBER: builtins.int + DATA_FIELD_NUMBER: builtins.int + QUERY_FIELD_NUMBER: builtins.int + SAVE_REPLAY_FIELD_NUMBER: builtins.int + REPLAY_INFO_FIELD_NUMBER: builtins.int + AVAILABLE_MAPS_FIELD_NUMBER: builtins.int + SAVE_MAP_FIELD_NUMBER: builtins.int + MAP_COMMAND_FIELD_NUMBER: builtins.int + PING_FIELD_NUMBER: builtins.int + DEBUG_FIELD_NUMBER: builtins.int + ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + STATUS_FIELD_NUMBER: builtins.int + @property + def create_game(self) -> global___ResponseCreateGame: ... + @property + def join_game(self) -> global___ResponseJoinGame: ... + @property + def restart_game(self) -> global___ResponseRestartGame: ... + @property + def start_replay(self) -> global___ResponseStartReplay: ... + @property + def leave_game(self) -> global___ResponseLeaveGame: ... + @property + def quick_save(self) -> global___ResponseQuickSave: ... + @property + def quick_load(self) -> global___ResponseQuickLoad: ... + @property + def quit(self) -> global___ResponseQuit: ... + @property + def game_info(self) -> global___ResponseGameInfo: ... + @property + def observation(self) -> global___ResponseObservation: ... + @property + def action(self) -> global___ResponseAction: ... + @property + def obs_action(self) -> global___ResponseObserverAction: ... + @property + def step(self) -> global___ResponseStep: ... + @property + def data(self) -> global___ResponseData: ... + @property + def query(self) -> s2clientprotocol.query_pb2.ResponseQuery: ... + @property + def save_replay(self) -> global___ResponseSaveReplay: ... + @property + def replay_info(self) -> global___ResponseReplayInfo: ... + @property + def available_maps(self) -> global___ResponseAvailableMaps: ... + @property + def save_map(self) -> global___ResponseSaveMap: ... + @property + def map_command(self) -> global___ResponseMapCommand: ... + @property + def ping(self) -> global___ResponsePing: + """Debugging""" + @property + def debug(self) -> global___ResponseDebug: ... + id: builtins.int + @property + def error(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """If command is missing, this will contain the error. Otherwise this will contain any warnings.""" + status: global___Status.ValueType + """Should be sent back with all responses.""" + def __init__( + self, + *, + create_game: global___ResponseCreateGame | None = ..., + join_game: global___ResponseJoinGame | None = ..., + restart_game: global___ResponseRestartGame | None = ..., + start_replay: global___ResponseStartReplay | None = ..., + leave_game: global___ResponseLeaveGame | None = ..., + quick_save: global___ResponseQuickSave | None = ..., + quick_load: global___ResponseQuickLoad | None = ..., + quit: global___ResponseQuit | None = ..., + game_info: global___ResponseGameInfo | None = ..., + observation: global___ResponseObservation | None = ..., + action: global___ResponseAction | None = ..., + obs_action: global___ResponseObserverAction | None = ..., + step: global___ResponseStep | None = ..., + data: global___ResponseData | None = ..., + query: s2clientprotocol.query_pb2.ResponseQuery | None = ..., + save_replay: global___ResponseSaveReplay | None = ..., + replay_info: global___ResponseReplayInfo | None = ..., + available_maps: global___ResponseAvailableMaps | None = ..., + save_map: global___ResponseSaveMap | None = ..., + map_command: global___ResponseMapCommand | None = ..., + ping: global___ResponsePing | None = ..., + debug: global___ResponseDebug | None = ..., + id: builtins.int | None = ..., + error: collections.abc.Iterable[builtins.str] | None = ..., + status: global___Status.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "available_maps", b"available_maps", "create_game", b"create_game", "data", b"data", "debug", b"debug", "game_info", b"game_info", "id", b"id", "join_game", b"join_game", "leave_game", b"leave_game", "map_command", b"map_command", "obs_action", b"obs_action", "observation", b"observation", "ping", b"ping", "query", b"query", "quick_load", b"quick_load", "quick_save", b"quick_save", "quit", b"quit", "replay_info", b"replay_info", "response", b"response", "restart_game", b"restart_game", "save_map", b"save_map", "save_replay", b"save_replay", "start_replay", b"start_replay", "status", b"status", "step", b"step"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "available_maps", b"available_maps", "create_game", b"create_game", "data", b"data", "debug", b"debug", "error", b"error", "game_info", b"game_info", "id", b"id", "join_game", b"join_game", "leave_game", b"leave_game", "map_command", b"map_command", "obs_action", b"obs_action", "observation", b"observation", "ping", b"ping", "query", b"query", "quick_load", b"quick_load", "quick_save", b"quick_save", "quit", b"quit", "replay_info", b"replay_info", "response", b"response", "restart_game", b"restart_game", "save_map", b"save_map", "save_replay", b"save_replay", "start_replay", b"start_replay", "status", b"status", "step", b"step"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["response", b"response"]) -> typing_extensions.Literal["create_game", "join_game", "restart_game", "start_replay", "leave_game", "quick_save", "quick_load", "quit", "game_info", "observation", "action", "obs_action", "step", "data", "query", "save_replay", "replay_info", "available_maps", "save_map", "map_command", "ping", "debug"] | None: ... + +global___Response = Response + +@typing_extensions.final +class RequestCreateGame(google.protobuf.message.Message): + """----------------------------------------------------------------------------- + If successful, puts the game into the status: init_game. + The next expected request should be RequestJoinGame. Can also quit (exit). + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_MAP_FIELD_NUMBER: builtins.int + BATTLENET_MAP_NAME_FIELD_NUMBER: builtins.int + PLAYER_SETUP_FIELD_NUMBER: builtins.int + DISABLE_FOG_FIELD_NUMBER: builtins.int + RANDOM_SEED_FIELD_NUMBER: builtins.int + REALTIME_FIELD_NUMBER: builtins.int + @property + def local_map(self) -> global___LocalMap: + """Local .SC2Map file""" + battlenet_map_name: builtins.str + """Map published to BattleNet""" + @property + def player_setup(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlayerSetup]: ... + disable_fog: builtins.bool + random_seed: builtins.int + """Sets the pseudo-random seed for the game.""" + realtime: builtins.bool + """If set, the game plays in real time.""" + def __init__( + self, + *, + local_map: global___LocalMap | None = ..., + battlenet_map_name: builtins.str | None = ..., + player_setup: collections.abc.Iterable[global___PlayerSetup] | None = ..., + disable_fog: builtins.bool | None = ..., + random_seed: builtins.int | None = ..., + realtime: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["Map", b"Map", "battlenet_map_name", b"battlenet_map_name", "disable_fog", b"disable_fog", "local_map", b"local_map", "random_seed", b"random_seed", "realtime", b"realtime"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["Map", b"Map", "battlenet_map_name", b"battlenet_map_name", "disable_fog", b"disable_fog", "local_map", b"local_map", "player_setup", b"player_setup", "random_seed", b"random_seed", "realtime", b"realtime"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["Map", b"Map"]) -> typing_extensions.Literal["local_map", "battlenet_map_name"] | None: ... + +global___RequestCreateGame = RequestCreateGame + +@typing_extensions.final +class LocalMap(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAP_PATH_FIELD_NUMBER: builtins.int + MAP_DATA_FIELD_NUMBER: builtins.int + map_path: builtins.str + """A map can be specified either by a file path or the data of the .SC2Map file. + If you provide both, it will play the game using map_data and store map_path + into the replay. (260 character max) + """ + map_data: builtins.bytes + def __init__( + self, + *, + map_path: builtins.str | None = ..., + map_data: builtins.bytes | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["map_data", b"map_data", "map_path", b"map_path"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["map_data", b"map_data", "map_path", b"map_path"]) -> None: ... + +global___LocalMap = LocalMap + +@typing_extensions.final +class ResponseCreateGame(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseCreateGame._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + MissingMap: ResponseCreateGame._Error.ValueType # 1 + InvalidMapPath: ResponseCreateGame._Error.ValueType # 2 + InvalidMapData: ResponseCreateGame._Error.ValueType # 3 + InvalidMapName: ResponseCreateGame._Error.ValueType # 4 + InvalidMapHandle: ResponseCreateGame._Error.ValueType # 5 + MissingPlayerSetup: ResponseCreateGame._Error.ValueType # 6 + InvalidPlayerSetup: ResponseCreateGame._Error.ValueType # 7 + MultiplayerUnsupported: ResponseCreateGame._Error.ValueType # 8 + """Multiplayer is not supported in the current build.""" + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + MissingMap: ResponseCreateGame.Error.ValueType # 1 + InvalidMapPath: ResponseCreateGame.Error.ValueType # 2 + InvalidMapData: ResponseCreateGame.Error.ValueType # 3 + InvalidMapName: ResponseCreateGame.Error.ValueType # 4 + InvalidMapHandle: ResponseCreateGame.Error.ValueType # 5 + MissingPlayerSetup: ResponseCreateGame.Error.ValueType # 6 + InvalidPlayerSetup: ResponseCreateGame.Error.ValueType # 7 + MultiplayerUnsupported: ResponseCreateGame.Error.ValueType # 8 + """Multiplayer is not supported in the current build.""" + + ERROR_FIELD_NUMBER: builtins.int + ERROR_DETAILS_FIELD_NUMBER: builtins.int + error: global___ResponseCreateGame.Error.ValueType + error_details: builtins.str + def __init__( + self, + *, + error: global___ResponseCreateGame.Error.ValueType | None = ..., + error_details: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details"]) -> None: ... + +global___ResponseCreateGame = ResponseCreateGame + +@typing_extensions.final +class RequestJoinGame(google.protobuf.message.Message): + """----------------------------------------------------------------------------- + If successful, puts the game into the status: in_game. Will be able to + request actions, observations and step the game. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RACE_FIELD_NUMBER: builtins.int + OBSERVED_PLAYER_ID_FIELD_NUMBER: builtins.int + OPTIONS_FIELD_NUMBER: builtins.int + SERVER_PORTS_FIELD_NUMBER: builtins.int + CLIENT_PORTS_FIELD_NUMBER: builtins.int + SHARED_PORT_FIELD_NUMBER: builtins.int + PLAYER_NAME_FIELD_NUMBER: builtins.int + HOST_IP_FIELD_NUMBER: builtins.int + race: s2clientprotocol.common_pb2.Race.ValueType + """Join as participant""" + observed_player_id: builtins.int + """Join as observer""" + @property + def options(self) -> global___InterfaceOptions: + """This is limited to what is specified in RequestCreateGame, but you can request less information if you want.""" + @property + def server_ports(self) -> global___PortSet: + """Do not set in the single-player case. This is the port a server will use.""" + @property + def client_ports(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PortSet]: + """Do not set in the single-player case. These are the ports clients will use to initialize communication.""" + shared_port: builtins.int + """Currently only a singe client is supported. + deprecated + """ + player_name: builtins.str + """Use this to set the player's name to something other than autogenerated name.""" + host_ip: builtins.str + """Both game creator and joiner should provide the ip address of the game creator in order to play remotely. Defaults to localhost.""" + def __init__( + self, + *, + race: s2clientprotocol.common_pb2.Race.ValueType | None = ..., + observed_player_id: builtins.int | None = ..., + options: global___InterfaceOptions | None = ..., + server_ports: global___PortSet | None = ..., + client_ports: collections.abc.Iterable[global___PortSet] | None = ..., + shared_port: builtins.int | None = ..., + player_name: builtins.str | None = ..., + host_ip: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["host_ip", b"host_ip", "observed_player_id", b"observed_player_id", "options", b"options", "participation", b"participation", "player_name", b"player_name", "race", b"race", "server_ports", b"server_ports", "shared_port", b"shared_port"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["client_ports", b"client_ports", "host_ip", b"host_ip", "observed_player_id", b"observed_player_id", "options", b"options", "participation", b"participation", "player_name", b"player_name", "race", b"race", "server_ports", b"server_ports", "shared_port", b"shared_port"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["participation", b"participation"]) -> typing_extensions.Literal["race", "observed_player_id"] | None: ... + +global___RequestJoinGame = RequestJoinGame + +@typing_extensions.final +class PortSet(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GAME_PORT_FIELD_NUMBER: builtins.int + BASE_PORT_FIELD_NUMBER: builtins.int + game_port: builtins.int + """Game right now needs two internal ports to establish a multiplay game on the local host.""" + base_port: builtins.int + def __init__( + self, + *, + game_port: builtins.int | None = ..., + base_port: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["base_port", b"base_port", "game_port", b"game_port"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["base_port", b"base_port", "game_port", b"game_port"]) -> None: ... + +global___PortSet = PortSet + +@typing_extensions.final +class ResponseJoinGame(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseJoinGame._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + MissingParticipation: ResponseJoinGame._Error.ValueType # 1 + InvalidObservedPlayerId: ResponseJoinGame._Error.ValueType # 2 + MissingOptions: ResponseJoinGame._Error.ValueType # 3 + MissingPorts: ResponseJoinGame._Error.ValueType # 4 + GameFull: ResponseJoinGame._Error.ValueType # 5 + LaunchError: ResponseJoinGame._Error.ValueType # 6 + FeatureUnsupported: ResponseJoinGame._Error.ValueType # 7 + """Multiplayer specific. + Multiplayer is not supported in the current build for the requested features. + """ + NoSpaceForUser: ResponseJoinGame._Error.ValueType # 8 + MapDoesNotExist: ResponseJoinGame._Error.ValueType # 9 + CannotOpenMap: ResponseJoinGame._Error.ValueType # 10 + ChecksumError: ResponseJoinGame._Error.ValueType # 11 + NetworkError: ResponseJoinGame._Error.ValueType # 12 + OtherError: ResponseJoinGame._Error.ValueType # 13 + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + MissingParticipation: ResponseJoinGame.Error.ValueType # 1 + InvalidObservedPlayerId: ResponseJoinGame.Error.ValueType # 2 + MissingOptions: ResponseJoinGame.Error.ValueType # 3 + MissingPorts: ResponseJoinGame.Error.ValueType # 4 + GameFull: ResponseJoinGame.Error.ValueType # 5 + LaunchError: ResponseJoinGame.Error.ValueType # 6 + FeatureUnsupported: ResponseJoinGame.Error.ValueType # 7 + """Multiplayer specific. + Multiplayer is not supported in the current build for the requested features. + """ + NoSpaceForUser: ResponseJoinGame.Error.ValueType # 8 + MapDoesNotExist: ResponseJoinGame.Error.ValueType # 9 + CannotOpenMap: ResponseJoinGame.Error.ValueType # 10 + ChecksumError: ResponseJoinGame.Error.ValueType # 11 + NetworkError: ResponseJoinGame.Error.ValueType # 12 + OtherError: ResponseJoinGame.Error.ValueType # 13 + + PLAYER_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + ERROR_DETAILS_FIELD_NUMBER: builtins.int + player_id: builtins.int + error: global___ResponseJoinGame.Error.ValueType + error_details: builtins.str + def __init__( + self, + *, + player_id: builtins.int | None = ..., + error: global___ResponseJoinGame.Error.ValueType | None = ..., + error_details: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details", "player_id", b"player_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details", "player_id", b"player_id"]) -> None: ... + +global___ResponseJoinGame = ResponseJoinGame + +@typing_extensions.final +class RequestRestartGame(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestRestartGame = RequestRestartGame + +@typing_extensions.final +class ResponseRestartGame(google.protobuf.message.Message): + """The defaultRestartGameLoops is specified to be (1<<18) by default""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseRestartGame._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + LaunchError: ResponseRestartGame._Error.ValueType # 1 + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + LaunchError: ResponseRestartGame.Error.ValueType # 1 + + ERROR_FIELD_NUMBER: builtins.int + ERROR_DETAILS_FIELD_NUMBER: builtins.int + NEED_HARD_RESET_FIELD_NUMBER: builtins.int + error: global___ResponseRestartGame.Error.ValueType + error_details: builtins.str + need_hard_reset: builtins.bool + """This will occur once the simulation_loop is greater then defaultRestartGameLoops""" + def __init__( + self, + *, + error: global___ResponseRestartGame.Error.ValueType | None = ..., + error_details: builtins.str | None = ..., + need_hard_reset: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details", "need_hard_reset", b"need_hard_reset"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details", "need_hard_reset", b"need_hard_reset"]) -> None: ... + +global___ResponseRestartGame = ResponseRestartGame + +@typing_extensions.final +class RequestStartReplay(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPLAY_PATH_FIELD_NUMBER: builtins.int + REPLAY_DATA_FIELD_NUMBER: builtins.int + MAP_DATA_FIELD_NUMBER: builtins.int + OBSERVED_PLAYER_ID_FIELD_NUMBER: builtins.int + OPTIONS_FIELD_NUMBER: builtins.int + DISABLE_FOG_FIELD_NUMBER: builtins.int + REALTIME_FIELD_NUMBER: builtins.int + RECORD_REPLAY_FIELD_NUMBER: builtins.int + replay_path: builtins.str + replay_data: builtins.bytes + map_data: builtins.bytes + """Overrides the map path stored in the replay.""" + observed_player_id: builtins.int + @property + def options(self) -> global___InterfaceOptions: ... + disable_fog: builtins.bool + realtime: builtins.bool + record_replay: builtins.bool + """Allow RequestSaveReplay from a replay. Useful for truncating a replay, or restoring tracker.events.""" + def __init__( + self, + *, + replay_path: builtins.str | None = ..., + replay_data: builtins.bytes | None = ..., + map_data: builtins.bytes | None = ..., + observed_player_id: builtins.int | None = ..., + options: global___InterfaceOptions | None = ..., + disable_fog: builtins.bool | None = ..., + realtime: builtins.bool | None = ..., + record_replay: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["disable_fog", b"disable_fog", "map_data", b"map_data", "observed_player_id", b"observed_player_id", "options", b"options", "realtime", b"realtime", "record_replay", b"record_replay", "replay", b"replay", "replay_data", b"replay_data", "replay_path", b"replay_path"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["disable_fog", b"disable_fog", "map_data", b"map_data", "observed_player_id", b"observed_player_id", "options", b"options", "realtime", b"realtime", "record_replay", b"record_replay", "replay", b"replay", "replay_data", b"replay_data", "replay_path", b"replay_path"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["replay", b"replay"]) -> typing_extensions.Literal["replay_path", "replay_data"] | None: ... + +global___RequestStartReplay = RequestStartReplay + +@typing_extensions.final +class ResponseStartReplay(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseStartReplay._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + MissingReplay: ResponseStartReplay._Error.ValueType # 1 + InvalidReplayPath: ResponseStartReplay._Error.ValueType # 2 + InvalidReplayData: ResponseStartReplay._Error.ValueType # 3 + InvalidMapData: ResponseStartReplay._Error.ValueType # 4 + InvalidObservedPlayerId: ResponseStartReplay._Error.ValueType # 5 + MissingOptions: ResponseStartReplay._Error.ValueType # 6 + LaunchError: ResponseStartReplay._Error.ValueType # 7 + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + MissingReplay: ResponseStartReplay.Error.ValueType # 1 + InvalidReplayPath: ResponseStartReplay.Error.ValueType # 2 + InvalidReplayData: ResponseStartReplay.Error.ValueType # 3 + InvalidMapData: ResponseStartReplay.Error.ValueType # 4 + InvalidObservedPlayerId: ResponseStartReplay.Error.ValueType # 5 + MissingOptions: ResponseStartReplay.Error.ValueType # 6 + LaunchError: ResponseStartReplay.Error.ValueType # 7 + + ERROR_FIELD_NUMBER: builtins.int + ERROR_DETAILS_FIELD_NUMBER: builtins.int + error: global___ResponseStartReplay.Error.ValueType + error_details: builtins.str + def __init__( + self, + *, + error: global___ResponseStartReplay.Error.ValueType | None = ..., + error_details: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details"]) -> None: ... + +global___ResponseStartReplay = ResponseStartReplay + +@typing_extensions.final +class RequestMapCommand(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TRIGGER_CMD_FIELD_NUMBER: builtins.int + trigger_cmd: builtins.str + def __init__( + self, + *, + trigger_cmd: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["trigger_cmd", b"trigger_cmd"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["trigger_cmd", b"trigger_cmd"]) -> None: ... + +global___RequestMapCommand = RequestMapCommand + +@typing_extensions.final +class ResponseMapCommand(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseMapCommand._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + NoTriggerError: ResponseMapCommand._Error.ValueType # 1 + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + NoTriggerError: ResponseMapCommand.Error.ValueType # 1 + + ERROR_FIELD_NUMBER: builtins.int + ERROR_DETAILS_FIELD_NUMBER: builtins.int + error: global___ResponseMapCommand.Error.ValueType + error_details: builtins.str + def __init__( + self, + *, + error: global___ResponseMapCommand.Error.ValueType | None = ..., + error_details: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "error_details", b"error_details"]) -> None: ... + +global___ResponseMapCommand = ResponseMapCommand + +@typing_extensions.final +class RequestLeaveGame(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestLeaveGame = RequestLeaveGame + +@typing_extensions.final +class ResponseLeaveGame(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResponseLeaveGame = ResponseLeaveGame + +@typing_extensions.final +class RequestQuickSave(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestQuickSave = RequestQuickSave + +@typing_extensions.final +class ResponseQuickSave(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResponseQuickSave = ResponseQuickSave + +@typing_extensions.final +class RequestQuickLoad(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestQuickLoad = RequestQuickLoad + +@typing_extensions.final +class ResponseQuickLoad(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResponseQuickLoad = ResponseQuickLoad + +@typing_extensions.final +class RequestQuit(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestQuit = RequestQuit + +@typing_extensions.final +class ResponseQuit(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResponseQuit = ResponseQuit + +@typing_extensions.final +class RequestGameInfo(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestGameInfo = RequestGameInfo + +@typing_extensions.final +class ResponseGameInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAP_NAME_FIELD_NUMBER: builtins.int + MOD_NAMES_FIELD_NUMBER: builtins.int + LOCAL_MAP_PATH_FIELD_NUMBER: builtins.int + PLAYER_INFO_FIELD_NUMBER: builtins.int + START_RAW_FIELD_NUMBER: builtins.int + OPTIONS_FIELD_NUMBER: builtins.int + map_name: builtins.str + @property + def mod_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ... + local_map_path: builtins.str + @property + def player_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlayerInfo]: ... + @property + def start_raw(self) -> s2clientprotocol.raw_pb2.StartRaw: + """Populated if Raw interface is enabled.""" + @property + def options(self) -> global___InterfaceOptions: ... + def __init__( + self, + *, + map_name: builtins.str | None = ..., + mod_names: collections.abc.Iterable[builtins.str] | None = ..., + local_map_path: builtins.str | None = ..., + player_info: collections.abc.Iterable[global___PlayerInfo] | None = ..., + start_raw: s2clientprotocol.raw_pb2.StartRaw | None = ..., + options: global___InterfaceOptions | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["local_map_path", b"local_map_path", "map_name", b"map_name", "options", b"options", "start_raw", b"start_raw"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["local_map_path", b"local_map_path", "map_name", b"map_name", "mod_names", b"mod_names", "options", b"options", "player_info", b"player_info", "start_raw", b"start_raw"]) -> None: ... + +global___ResponseGameInfo = ResponseGameInfo + +@typing_extensions.final +class RequestObservation(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DISABLE_FOG_FIELD_NUMBER: builtins.int + GAME_LOOP_FIELD_NUMBER: builtins.int + disable_fog: builtins.bool + game_loop: builtins.int + """In realtime the request will only return once the simulation game loop has reached this value. When not realtime this value is ignored.""" + def __init__( + self, + *, + disable_fog: builtins.bool | None = ..., + game_loop: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["disable_fog", b"disable_fog", "game_loop", b"game_loop"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["disable_fog", b"disable_fog", "game_loop", b"game_loop"]) -> None: ... + +global___RequestObservation = RequestObservation + +@typing_extensions.final +class ResponseObservation(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIONS_FIELD_NUMBER: builtins.int + ACTION_ERRORS_FIELD_NUMBER: builtins.int + OBSERVATION_FIELD_NUMBER: builtins.int + PLAYER_RESULT_FIELD_NUMBER: builtins.int + CHAT_FIELD_NUMBER: builtins.int + @property + def actions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Action]: + """Actions this player did since the last Observation.""" + @property + def action_errors(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ActionError]: + """Equivalent of UI "red text" errors.""" + @property + def observation(self) -> global___Observation: ... + @property + def player_result(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlayerResult]: + """Only populated if the game ended during this step.""" + @property + def chat(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ChatReceived]: ... + def __init__( + self, + *, + actions: collections.abc.Iterable[global___Action] | None = ..., + action_errors: collections.abc.Iterable[global___ActionError] | None = ..., + observation: global___Observation | None = ..., + player_result: collections.abc.Iterable[global___PlayerResult] | None = ..., + chat: collections.abc.Iterable[global___ChatReceived] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["observation", b"observation"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action_errors", b"action_errors", "actions", b"actions", "chat", b"chat", "observation", b"observation", "player_result", b"player_result"]) -> None: ... + +global___ResponseObservation = ResponseObservation + +@typing_extensions.final +class ChatReceived(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_ID_FIELD_NUMBER: builtins.int + MESSAGE_FIELD_NUMBER: builtins.int + player_id: builtins.int + message: builtins.str + def __init__( + self, + *, + player_id: builtins.int | None = ..., + message: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["message", b"message", "player_id", b"player_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["message", b"message", "player_id", b"player_id"]) -> None: ... + +global___ChatReceived = ChatReceived + +@typing_extensions.final +class RequestAction(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIONS_FIELD_NUMBER: builtins.int + @property + def actions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Action]: ... + def __init__( + self, + *, + actions: collections.abc.Iterable[global___Action] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["actions", b"actions"]) -> None: ... + +global___RequestAction = RequestAction + +@typing_extensions.final +class ResponseAction(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESULT_FIELD_NUMBER: builtins.int + @property + def result(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[s2clientprotocol.error_pb2.ActionResult.ValueType]: ... + def __init__( + self, + *, + result: collections.abc.Iterable[s2clientprotocol.error_pb2.ActionResult.ValueType] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["result", b"result"]) -> None: ... + +global___ResponseAction = ResponseAction + +@typing_extensions.final +class RequestObserverAction(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTIONS_FIELD_NUMBER: builtins.int + @property + def actions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ObserverAction]: ... + def __init__( + self, + *, + actions: collections.abc.Iterable[global___ObserverAction] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["actions", b"actions"]) -> None: ... + +global___RequestObserverAction = RequestObserverAction + +@typing_extensions.final +class ResponseObserverAction(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResponseObserverAction = ResponseObserverAction + +@typing_extensions.final +class RequestStep(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + COUNT_FIELD_NUMBER: builtins.int + count: builtins.int + """Number of game loops to simulate for the next frame.""" + def __init__( + self, + *, + count: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["count", b"count"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["count", b"count"]) -> None: ... + +global___RequestStep = RequestStep + +@typing_extensions.final +class ResponseStep(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SIMULATION_LOOP_FIELD_NUMBER: builtins.int + simulation_loop: builtins.int + """ Max simulation_loop is (1<<19) before "end of time" will occur + The "end of time" is classified as the maximum number of game loops or absolute game time + representable as a positive fixed point number. + When we reach the "end of time", permanently pause the game and end the game for all. + """ + def __init__( + self, + *, + simulation_loop: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["simulation_loop", b"simulation_loop"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["simulation_loop", b"simulation_loop"]) -> None: ... + +global___ResponseStep = ResponseStep + +@typing_extensions.final +class RequestData(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + UNIT_TYPE_ID_FIELD_NUMBER: builtins.int + UPGRADE_ID_FIELD_NUMBER: builtins.int + BUFF_ID_FIELD_NUMBER: builtins.int + EFFECT_ID_FIELD_NUMBER: builtins.int + ability_id: builtins.bool + unit_type_id: builtins.bool + upgrade_id: builtins.bool + buff_id: builtins.bool + effect_id: builtins.bool + def __init__( + self, + *, + ability_id: builtins.bool | None = ..., + unit_type_id: builtins.bool | None = ..., + upgrade_id: builtins.bool | None = ..., + buff_id: builtins.bool | None = ..., + effect_id: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "buff_id", b"buff_id", "effect_id", b"effect_id", "unit_type_id", b"unit_type_id", "upgrade_id", b"upgrade_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "buff_id", b"buff_id", "effect_id", b"effect_id", "unit_type_id", b"unit_type_id", "upgrade_id", b"upgrade_id"]) -> None: ... + +global___RequestData = RequestData + +@typing_extensions.final +class ResponseData(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITIES_FIELD_NUMBER: builtins.int + UNITS_FIELD_NUMBER: builtins.int + UPGRADES_FIELD_NUMBER: builtins.int + BUFFS_FIELD_NUMBER: builtins.int + EFFECTS_FIELD_NUMBER: builtins.int + @property + def abilities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.data_pb2.AbilityData]: ... + @property + def units(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.data_pb2.UnitTypeData]: ... + @property + def upgrades(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.data_pb2.UpgradeData]: ... + @property + def buffs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.data_pb2.BuffData]: ... + @property + def effects(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.data_pb2.EffectData]: ... + def __init__( + self, + *, + abilities: collections.abc.Iterable[s2clientprotocol.data_pb2.AbilityData] | None = ..., + units: collections.abc.Iterable[s2clientprotocol.data_pb2.UnitTypeData] | None = ..., + upgrades: collections.abc.Iterable[s2clientprotocol.data_pb2.UpgradeData] | None = ..., + buffs: collections.abc.Iterable[s2clientprotocol.data_pb2.BuffData] | None = ..., + effects: collections.abc.Iterable[s2clientprotocol.data_pb2.EffectData] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["abilities", b"abilities", "buffs", b"buffs", "effects", b"effects", "units", b"units", "upgrades", b"upgrades"]) -> None: ... + +global___ResponseData = ResponseData + +@typing_extensions.final +class RequestSaveReplay(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestSaveReplay = RequestSaveReplay + +@typing_extensions.final +class ResponseSaveReplay(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DATA_FIELD_NUMBER: builtins.int + data: builtins.bytes + def __init__( + self, + *, + data: builtins.bytes | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["data", b"data"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["data", b"data"]) -> None: ... + +global___ResponseSaveReplay = ResponseSaveReplay + +@typing_extensions.final +class RequestReplayInfo(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REPLAY_PATH_FIELD_NUMBER: builtins.int + REPLAY_DATA_FIELD_NUMBER: builtins.int + DOWNLOAD_DATA_FIELD_NUMBER: builtins.int + replay_path: builtins.str + """Limitation: might fail if the replay file is currently loaded.""" + replay_data: builtins.bytes + download_data: builtins.bool + """Ensure the data and binary are downloaded if this is an old version replay.""" + def __init__( + self, + *, + replay_path: builtins.str | None = ..., + replay_data: builtins.bytes | None = ..., + download_data: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["download_data", b"download_data", "replay", b"replay", "replay_data", b"replay_data", "replay_path", b"replay_path"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["download_data", b"download_data", "replay", b"replay", "replay_data", b"replay_data", "replay_path", b"replay_path"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["replay", b"replay"]) -> typing_extensions.Literal["replay_path", "replay_data"] | None: ... + +global___RequestReplayInfo = RequestReplayInfo + +@typing_extensions.final +class PlayerInfoExtra(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_INFO_FIELD_NUMBER: builtins.int + PLAYER_RESULT_FIELD_NUMBER: builtins.int + PLAYER_MMR_FIELD_NUMBER: builtins.int + PLAYER_APM_FIELD_NUMBER: builtins.int + @property + def player_info(self) -> global___PlayerInfo: ... + @property + def player_result(self) -> global___PlayerResult: ... + player_mmr: builtins.int + player_apm: builtins.int + def __init__( + self, + *, + player_info: global___PlayerInfo | None = ..., + player_result: global___PlayerResult | None = ..., + player_mmr: builtins.int | None = ..., + player_apm: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["player_apm", b"player_apm", "player_info", b"player_info", "player_mmr", b"player_mmr", "player_result", b"player_result"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["player_apm", b"player_apm", "player_info", b"player_info", "player_mmr", b"player_mmr", "player_result", b"player_result"]) -> None: ... + +global___PlayerInfoExtra = PlayerInfoExtra + +@typing_extensions.final +class ResponseReplayInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseReplayInfo._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + MissingReplay: ResponseReplayInfo._Error.ValueType # 1 + InvalidReplayPath: ResponseReplayInfo._Error.ValueType # 2 + InvalidReplayData: ResponseReplayInfo._Error.ValueType # 3 + ParsingError: ResponseReplayInfo._Error.ValueType # 4 + DownloadError: ResponseReplayInfo._Error.ValueType # 5 + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + MissingReplay: ResponseReplayInfo.Error.ValueType # 1 + InvalidReplayPath: ResponseReplayInfo.Error.ValueType # 2 + InvalidReplayData: ResponseReplayInfo.Error.ValueType # 3 + ParsingError: ResponseReplayInfo.Error.ValueType # 4 + DownloadError: ResponseReplayInfo.Error.ValueType # 5 + + MAP_NAME_FIELD_NUMBER: builtins.int + LOCAL_MAP_PATH_FIELD_NUMBER: builtins.int + PLAYER_INFO_FIELD_NUMBER: builtins.int + GAME_DURATION_LOOPS_FIELD_NUMBER: builtins.int + GAME_DURATION_SECONDS_FIELD_NUMBER: builtins.int + GAME_VERSION_FIELD_NUMBER: builtins.int + DATA_VERSION_FIELD_NUMBER: builtins.int + DATA_BUILD_FIELD_NUMBER: builtins.int + BASE_BUILD_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + ERROR_DETAILS_FIELD_NUMBER: builtins.int + map_name: builtins.str + local_map_path: builtins.str + @property + def player_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PlayerInfoExtra]: ... + game_duration_loops: builtins.int + game_duration_seconds: builtins.float + game_version: builtins.str + data_version: builtins.str + data_build: builtins.int + base_build: builtins.int + error: global___ResponseReplayInfo.Error.ValueType + error_details: builtins.str + def __init__( + self, + *, + map_name: builtins.str | None = ..., + local_map_path: builtins.str | None = ..., + player_info: collections.abc.Iterable[global___PlayerInfoExtra] | None = ..., + game_duration_loops: builtins.int | None = ..., + game_duration_seconds: builtins.float | None = ..., + game_version: builtins.str | None = ..., + data_version: builtins.str | None = ..., + data_build: builtins.int | None = ..., + base_build: builtins.int | None = ..., + error: global___ResponseReplayInfo.Error.ValueType | None = ..., + error_details: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["base_build", b"base_build", "data_build", b"data_build", "data_version", b"data_version", "error", b"error", "error_details", b"error_details", "game_duration_loops", b"game_duration_loops", "game_duration_seconds", b"game_duration_seconds", "game_version", b"game_version", "local_map_path", b"local_map_path", "map_name", b"map_name"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["base_build", b"base_build", "data_build", b"data_build", "data_version", b"data_version", "error", b"error", "error_details", b"error_details", "game_duration_loops", b"game_duration_loops", "game_duration_seconds", b"game_duration_seconds", "game_version", b"game_version", "local_map_path", b"local_map_path", "map_name", b"map_name", "player_info", b"player_info"]) -> None: ... + +global___ResponseReplayInfo = ResponseReplayInfo + +@typing_extensions.final +class RequestAvailableMaps(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestAvailableMaps = RequestAvailableMaps + +@typing_extensions.final +class ResponseAvailableMaps(google.protobuf.message.Message): + """This will only contain locally cached BattleNet maps. + To download all ladder maps, log in and queue into a ladder match. + To download any other map, play a custom game on that map. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LOCAL_MAP_PATHS_FIELD_NUMBER: builtins.int + BATTLENET_MAP_NAMES_FIELD_NUMBER: builtins.int + @property + def local_map_paths(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """All the maps in the "Maps/" directory.""" + @property + def battlenet_map_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + """All the maps in the BattleNet cache.""" + def __init__( + self, + *, + local_map_paths: collections.abc.Iterable[builtins.str] | None = ..., + battlenet_map_names: collections.abc.Iterable[builtins.str] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["battlenet_map_names", b"battlenet_map_names", "local_map_paths", b"local_map_paths"]) -> None: ... + +global___ResponseAvailableMaps = ResponseAvailableMaps + +@typing_extensions.final +class RequestSaveMap(google.protobuf.message.Message): + """----------------------------------------------------------------------------- + Copies map data into the path specified. + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAP_PATH_FIELD_NUMBER: builtins.int + MAP_DATA_FIELD_NUMBER: builtins.int + map_path: builtins.str + """Path the game process will write to, relative to the temp directory. (260 character max)""" + map_data: builtins.bytes + """Binary map data of a .SC2Map.""" + def __init__( + self, + *, + map_path: builtins.str | None = ..., + map_data: builtins.bytes | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["map_data", b"map_data", "map_path", b"map_path"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["map_data", b"map_data", "map_path", b"map_path"]) -> None: ... + +global___RequestSaveMap = RequestSaveMap + +@typing_extensions.final +class ResponseSaveMap(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Error: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ErrorEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ResponseSaveMap._Error.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + InvalidMapData: ResponseSaveMap._Error.ValueType # 1 + + class Error(_Error, metaclass=_ErrorEnumTypeWrapper): ... + InvalidMapData: ResponseSaveMap.Error.ValueType # 1 + + ERROR_FIELD_NUMBER: builtins.int + error: global___ResponseSaveMap.Error.ValueType + def __init__( + self, + *, + error: global___ResponseSaveMap.Error.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["error", b"error"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["error", b"error"]) -> None: ... + +global___ResponseSaveMap = ResponseSaveMap + +@typing_extensions.final +class RequestPing(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___RequestPing = RequestPing + +@typing_extensions.final +class ResponsePing(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GAME_VERSION_FIELD_NUMBER: builtins.int + DATA_VERSION_FIELD_NUMBER: builtins.int + DATA_BUILD_FIELD_NUMBER: builtins.int + BASE_BUILD_FIELD_NUMBER: builtins.int + game_version: builtins.str + data_version: builtins.str + data_build: builtins.int + base_build: builtins.int + def __init__( + self, + *, + game_version: builtins.str | None = ..., + data_version: builtins.str | None = ..., + data_build: builtins.int | None = ..., + base_build: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["base_build", b"base_build", "data_build", b"data_build", "data_version", b"data_version", "game_version", b"game_version"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["base_build", b"base_build", "data_build", b"data_build", "data_version", b"data_version", "game_version", b"game_version"]) -> None: ... + +global___ResponsePing = ResponsePing + +@typing_extensions.final +class RequestDebug(google.protobuf.message.Message): + """-----------------------------------------------------------------------------""" + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + DEBUG_FIELD_NUMBER: builtins.int + @property + def debug(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.debug_pb2.DebugCommand]: ... + def __init__( + self, + *, + debug: collections.abc.Iterable[s2clientprotocol.debug_pb2.DebugCommand] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["debug", b"debug"]) -> None: ... + +global___RequestDebug = RequestDebug + +@typing_extensions.final +class ResponseDebug(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ResponseDebug = ResponseDebug + +@typing_extensions.final +class PlayerSetup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + TYPE_FIELD_NUMBER: builtins.int + RACE_FIELD_NUMBER: builtins.int + DIFFICULTY_FIELD_NUMBER: builtins.int + PLAYER_NAME_FIELD_NUMBER: builtins.int + AI_BUILD_FIELD_NUMBER: builtins.int + type: global___PlayerType.ValueType + race: s2clientprotocol.common_pb2.Race.ValueType + """Only used for a computer player.""" + difficulty: global___Difficulty.ValueType + player_name: builtins.str + ai_build: global___AIBuild.ValueType + def __init__( + self, + *, + type: global___PlayerType.ValueType | None = ..., + race: s2clientprotocol.common_pb2.Race.ValueType | None = ..., + difficulty: global___Difficulty.ValueType | None = ..., + player_name: builtins.str | None = ..., + ai_build: global___AIBuild.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ai_build", b"ai_build", "difficulty", b"difficulty", "player_name", b"player_name", "race", b"race", "type", b"type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ai_build", b"ai_build", "difficulty", b"difficulty", "player_name", b"player_name", "race", b"race", "type", b"type"]) -> None: ... + +global___PlayerSetup = PlayerSetup + +@typing_extensions.final +class SpatialCameraSetup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RESOLUTION_FIELD_NUMBER: builtins.int + MINIMAP_RESOLUTION_FIELD_NUMBER: builtins.int + WIDTH_FIELD_NUMBER: builtins.int + CROP_TO_PLAYABLE_AREA_FIELD_NUMBER: builtins.int + ALLOW_CHEATING_LAYERS_FIELD_NUMBER: builtins.int + @property + def resolution(self) -> s2clientprotocol.common_pb2.Size2DI: ... + @property + def minimap_resolution(self) -> s2clientprotocol.common_pb2.Size2DI: ... + width: builtins.float + """Below are only relevant for feature layers. + Set the screen camera width in world units. + """ + crop_to_playable_area: builtins.bool + """Crop minimap to the playable area.""" + allow_cheating_layers: builtins.bool + """Return unit_type on the minimap, and potentially other cheating layers.""" + def __init__( + self, + *, + resolution: s2clientprotocol.common_pb2.Size2DI | None = ..., + minimap_resolution: s2clientprotocol.common_pb2.Size2DI | None = ..., + width: builtins.float | None = ..., + crop_to_playable_area: builtins.bool | None = ..., + allow_cheating_layers: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["allow_cheating_layers", b"allow_cheating_layers", "crop_to_playable_area", b"crop_to_playable_area", "minimap_resolution", b"minimap_resolution", "resolution", b"resolution", "width", b"width"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["allow_cheating_layers", b"allow_cheating_layers", "crop_to_playable_area", b"crop_to_playable_area", "minimap_resolution", b"minimap_resolution", "resolution", b"resolution", "width", b"width"]) -> None: ... + +global___SpatialCameraSetup = SpatialCameraSetup + +@typing_extensions.final +class InterfaceOptions(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RAW_FIELD_NUMBER: builtins.int + SCORE_FIELD_NUMBER: builtins.int + FEATURE_LAYER_FIELD_NUMBER: builtins.int + RENDER_FIELD_NUMBER: builtins.int + SHOW_CLOAKED_FIELD_NUMBER: builtins.int + SHOW_BURROWED_SHADOWS_FIELD_NUMBER: builtins.int + SHOW_PLACEHOLDERS_FIELD_NUMBER: builtins.int + RAW_AFFECTS_SELECTION_FIELD_NUMBER: builtins.int + RAW_CROP_TO_PLAYABLE_AREA_FIELD_NUMBER: builtins.int + raw: builtins.bool + """Interface options""" + score: builtins.bool + @property + def feature_layer(self) -> global___SpatialCameraSetup: + """Omit to disable.""" + @property + def render(self) -> global___SpatialCameraSetup: + """Omit to disable.""" + show_cloaked: builtins.bool + """By default cloaked units are completely hidden. This shows some details.""" + show_burrowed_shadows: builtins.bool + """By default burrowed units are completely hidden. This shows some details for those that produce a shadow.""" + show_placeholders: builtins.bool + """Return placeholder units (buildings to be constructed), both for raw and feature layers.""" + raw_affects_selection: builtins.bool + """By default raw actions select, act and revert the selection. This is useful + if you're playing simultaneously with the agent so it doesn't steal your + selection. This inflates APM (due to deselect) and makes the actions hard + to follow in a replay. Setting this to true will cause raw actions to do + select, act, but not revert the selection. + """ + raw_crop_to_playable_area: builtins.bool + """Changes the coordinates in raw.proto to be relative to the playable area. + The map_size and playable_area will be the diagonal of the real playable area. + """ + def __init__( + self, + *, + raw: builtins.bool | None = ..., + score: builtins.bool | None = ..., + feature_layer: global___SpatialCameraSetup | None = ..., + render: global___SpatialCameraSetup | None = ..., + show_cloaked: builtins.bool | None = ..., + show_burrowed_shadows: builtins.bool | None = ..., + show_placeholders: builtins.bool | None = ..., + raw_affects_selection: builtins.bool | None = ..., + raw_crop_to_playable_area: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["feature_layer", b"feature_layer", "raw", b"raw", "raw_affects_selection", b"raw_affects_selection", "raw_crop_to_playable_area", b"raw_crop_to_playable_area", "render", b"render", "score", b"score", "show_burrowed_shadows", b"show_burrowed_shadows", "show_cloaked", b"show_cloaked", "show_placeholders", b"show_placeholders"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["feature_layer", b"feature_layer", "raw", b"raw", "raw_affects_selection", b"raw_affects_selection", "raw_crop_to_playable_area", b"raw_crop_to_playable_area", "render", b"render", "score", b"score", "show_burrowed_shadows", b"show_burrowed_shadows", "show_cloaked", b"show_cloaked", "show_placeholders", b"show_placeholders"]) -> None: ... + +global___InterfaceOptions = InterfaceOptions + +@typing_extensions.final +class PlayerInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_ID_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + RACE_REQUESTED_FIELD_NUMBER: builtins.int + RACE_ACTUAL_FIELD_NUMBER: builtins.int + DIFFICULTY_FIELD_NUMBER: builtins.int + AI_BUILD_FIELD_NUMBER: builtins.int + PLAYER_NAME_FIELD_NUMBER: builtins.int + player_id: builtins.int + """Identifier that will be used to reference this player. + SC2 will always assign playerIds starting from 1 in standard Melee maps. This may not be true in custom maps. + """ + type: global___PlayerType.ValueType + race_requested: s2clientprotocol.common_pb2.Race.ValueType + race_actual: s2clientprotocol.common_pb2.Race.ValueType + """Only populated for your player or when watching replay""" + difficulty: global___Difficulty.ValueType + ai_build: global___AIBuild.ValueType + player_name: builtins.str + def __init__( + self, + *, + player_id: builtins.int | None = ..., + type: global___PlayerType.ValueType | None = ..., + race_requested: s2clientprotocol.common_pb2.Race.ValueType | None = ..., + race_actual: s2clientprotocol.common_pb2.Race.ValueType | None = ..., + difficulty: global___Difficulty.ValueType | None = ..., + ai_build: global___AIBuild.ValueType | None = ..., + player_name: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ai_build", b"ai_build", "difficulty", b"difficulty", "player_id", b"player_id", "player_name", b"player_name", "race_actual", b"race_actual", "race_requested", b"race_requested", "type", b"type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ai_build", b"ai_build", "difficulty", b"difficulty", "player_id", b"player_id", "player_name", b"player_name", "race_actual", b"race_actual", "race_requested", b"race_requested", "type", b"type"]) -> None: ... + +global___PlayerInfo = PlayerInfo + +@typing_extensions.final +class PlayerCommon(google.protobuf.message.Message): + """ + During Game + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_ID_FIELD_NUMBER: builtins.int + MINERALS_FIELD_NUMBER: builtins.int + VESPENE_FIELD_NUMBER: builtins.int + FOOD_CAP_FIELD_NUMBER: builtins.int + FOOD_USED_FIELD_NUMBER: builtins.int + FOOD_ARMY_FIELD_NUMBER: builtins.int + FOOD_WORKERS_FIELD_NUMBER: builtins.int + IDLE_WORKER_COUNT_FIELD_NUMBER: builtins.int + ARMY_COUNT_FIELD_NUMBER: builtins.int + WARP_GATE_COUNT_FIELD_NUMBER: builtins.int + LARVA_COUNT_FIELD_NUMBER: builtins.int + player_id: builtins.int + minerals: builtins.int + vespene: builtins.int + food_cap: builtins.int + food_used: builtins.int + food_army: builtins.int + food_workers: builtins.int + idle_worker_count: builtins.int + army_count: builtins.int + warp_gate_count: builtins.int + larva_count: builtins.int + def __init__( + self, + *, + player_id: builtins.int | None = ..., + minerals: builtins.int | None = ..., + vespene: builtins.int | None = ..., + food_cap: builtins.int | None = ..., + food_used: builtins.int | None = ..., + food_army: builtins.int | None = ..., + food_workers: builtins.int | None = ..., + idle_worker_count: builtins.int | None = ..., + army_count: builtins.int | None = ..., + warp_gate_count: builtins.int | None = ..., + larva_count: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["army_count", b"army_count", "food_army", b"food_army", "food_cap", b"food_cap", "food_used", b"food_used", "food_workers", b"food_workers", "idle_worker_count", b"idle_worker_count", "larva_count", b"larva_count", "minerals", b"minerals", "player_id", b"player_id", "vespene", b"vespene", "warp_gate_count", b"warp_gate_count"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["army_count", b"army_count", "food_army", b"food_army", "food_cap", b"food_cap", "food_used", b"food_used", "food_workers", b"food_workers", "idle_worker_count", b"idle_worker_count", "larva_count", b"larva_count", "minerals", b"minerals", "player_id", b"player_id", "vespene", b"vespene", "warp_gate_count", b"warp_gate_count"]) -> None: ... + +global___PlayerCommon = PlayerCommon + +@typing_extensions.final +class Observation(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GAME_LOOP_FIELD_NUMBER: builtins.int + PLAYER_COMMON_FIELD_NUMBER: builtins.int + ALERTS_FIELD_NUMBER: builtins.int + ABILITIES_FIELD_NUMBER: builtins.int + SCORE_FIELD_NUMBER: builtins.int + RAW_DATA_FIELD_NUMBER: builtins.int + FEATURE_LAYER_DATA_FIELD_NUMBER: builtins.int + RENDER_DATA_FIELD_NUMBER: builtins.int + UI_DATA_FIELD_NUMBER: builtins.int + game_loop: builtins.int + @property + def player_common(self) -> global___PlayerCommon: ... + @property + def alerts(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___Alert.ValueType]: ... + @property + def abilities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.common_pb2.AvailableAbility]: + """Abilities available in the selection. Enabled if in this list, disabled otherwise.""" + @property + def score(self) -> s2clientprotocol.score_pb2.Score: ... + @property + def raw_data(self) -> s2clientprotocol.raw_pb2.ObservationRaw: + """Populated if Raw interface is enabled.""" + @property + def feature_layer_data(self) -> s2clientprotocol.spatial_pb2.ObservationFeatureLayer: + """Populated if Feature Layer interface is enabled.""" + @property + def render_data(self) -> s2clientprotocol.spatial_pb2.ObservationRender: + """Populated if Render interface is enabled.""" + @property + def ui_data(self) -> s2clientprotocol.ui_pb2.ObservationUI: + """Populated if Feature Layer or Render interface is enabled.""" + def __init__( + self, + *, + game_loop: builtins.int | None = ..., + player_common: global___PlayerCommon | None = ..., + alerts: collections.abc.Iterable[global___Alert.ValueType] | None = ..., + abilities: collections.abc.Iterable[s2clientprotocol.common_pb2.AvailableAbility] | None = ..., + score: s2clientprotocol.score_pb2.Score | None = ..., + raw_data: s2clientprotocol.raw_pb2.ObservationRaw | None = ..., + feature_layer_data: s2clientprotocol.spatial_pb2.ObservationFeatureLayer | None = ..., + render_data: s2clientprotocol.spatial_pb2.ObservationRender | None = ..., + ui_data: s2clientprotocol.ui_pb2.ObservationUI | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["feature_layer_data", b"feature_layer_data", "game_loop", b"game_loop", "player_common", b"player_common", "raw_data", b"raw_data", "render_data", b"render_data", "score", b"score", "ui_data", b"ui_data"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["abilities", b"abilities", "alerts", b"alerts", "feature_layer_data", b"feature_layer_data", "game_loop", b"game_loop", "player_common", b"player_common", "raw_data", b"raw_data", "render_data", b"render_data", "score", b"score", "ui_data", b"ui_data"]) -> None: ... + +global___Observation = Observation + +@typing_extensions.final +class Action(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ACTION_RAW_FIELD_NUMBER: builtins.int + ACTION_FEATURE_LAYER_FIELD_NUMBER: builtins.int + ACTION_RENDER_FIELD_NUMBER: builtins.int + ACTION_UI_FIELD_NUMBER: builtins.int + ACTION_CHAT_FIELD_NUMBER: builtins.int + GAME_LOOP_FIELD_NUMBER: builtins.int + @property + def action_raw(self) -> s2clientprotocol.raw_pb2.ActionRaw: + """Populated if Raw interface is enabled.""" + @property + def action_feature_layer(self) -> s2clientprotocol.spatial_pb2.ActionSpatial: + """Populated if Feature Layer interface is enabled.""" + @property + def action_render(self) -> s2clientprotocol.spatial_pb2.ActionSpatial: + """Not implemented. Populated if Render interface is enabled.""" + @property + def action_ui(self) -> s2clientprotocol.ui_pb2.ActionUI: + """Populated if Feature Layer or Render interface is enabled.""" + @property + def action_chat(self) -> global___ActionChat: + """Chat messages as a player typing into the chat channel.""" + game_loop: builtins.int + """Populated for actions in ResponseObservation. The game loop on which the action was executed.""" + def __init__( + self, + *, + action_raw: s2clientprotocol.raw_pb2.ActionRaw | None = ..., + action_feature_layer: s2clientprotocol.spatial_pb2.ActionSpatial | None = ..., + action_render: s2clientprotocol.spatial_pb2.ActionSpatial | None = ..., + action_ui: s2clientprotocol.ui_pb2.ActionUI | None = ..., + action_chat: global___ActionChat | None = ..., + game_loop: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action_chat", b"action_chat", "action_feature_layer", b"action_feature_layer", "action_raw", b"action_raw", "action_render", b"action_render", "action_ui", b"action_ui", "game_loop", b"game_loop"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action_chat", b"action_chat", "action_feature_layer", b"action_feature_layer", "action_raw", b"action_raw", "action_render", b"action_render", "action_ui", b"action_ui", "game_loop", b"game_loop"]) -> None: ... + +global___Action = Action + +@typing_extensions.final +class ActionChat(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Channel: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ChannelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionChat._Channel.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Broadcast: ActionChat._Channel.ValueType # 1 + Team: ActionChat._Channel.ValueType # 2 + + class Channel(_Channel, metaclass=_ChannelEnumTypeWrapper): ... + Broadcast: ActionChat.Channel.ValueType # 1 + Team: ActionChat.Channel.ValueType # 2 + + CHANNEL_FIELD_NUMBER: builtins.int + MESSAGE_FIELD_NUMBER: builtins.int + channel: global___ActionChat.Channel.ValueType + message: builtins.str + def __init__( + self, + *, + channel: global___ActionChat.Channel.ValueType | None = ..., + message: builtins.str | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["channel", b"channel", "message", b"message"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["channel", b"channel", "message", b"message"]) -> None: ... + +global___ActionChat = ActionChat + +@typing_extensions.final +class ActionError(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_TAG_FIELD_NUMBER: builtins.int + ABILITY_ID_FIELD_NUMBER: builtins.int + RESULT_FIELD_NUMBER: builtins.int + unit_tag: builtins.int + """Only populated when using raw interface.""" + ability_id: builtins.int + result: s2clientprotocol.error_pb2.ActionResult.ValueType + def __init__( + self, + *, + unit_tag: builtins.int | None = ..., + ability_id: builtins.int | None = ..., + result: s2clientprotocol.error_pb2.ActionResult.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "result", b"result", "unit_tag", b"unit_tag"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "result", b"result", "unit_tag", b"unit_tag"]) -> None: ... + +global___ActionError = ActionError + +@typing_extensions.final +class ObserverAction(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_PERSPECTIVE_FIELD_NUMBER: builtins.int + CAMERA_MOVE_FIELD_NUMBER: builtins.int + CAMERA_FOLLOW_PLAYER_FIELD_NUMBER: builtins.int + CAMERA_FOLLOW_UNITS_FIELD_NUMBER: builtins.int + @property + def player_perspective(self) -> global___ActionObserverPlayerPerspective: + """Not implemented""" + @property + def camera_move(self) -> global___ActionObserverCameraMove: ... + @property + def camera_follow_player(self) -> global___ActionObserverCameraFollowPlayer: ... + @property + def camera_follow_units(self) -> global___ActionObserverCameraFollowUnits: + """Not implemented""" + def __init__( + self, + *, + player_perspective: global___ActionObserverPlayerPerspective | None = ..., + camera_move: global___ActionObserverCameraMove | None = ..., + camera_follow_player: global___ActionObserverCameraFollowPlayer | None = ..., + camera_follow_units: global___ActionObserverCameraFollowUnits | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "camera_follow_player", b"camera_follow_player", "camera_follow_units", b"camera_follow_units", "camera_move", b"camera_move", "player_perspective", b"player_perspective"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "camera_follow_player", b"camera_follow_player", "camera_follow_units", b"camera_follow_units", "camera_move", b"camera_move", "player_perspective", b"player_perspective"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["action", b"action"]) -> typing_extensions.Literal["player_perspective", "camera_move", "camera_follow_player", "camera_follow_units"] | None: ... + +global___ObserverAction = ObserverAction + +@typing_extensions.final +class ActionObserverPlayerPerspective(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_ID_FIELD_NUMBER: builtins.int + player_id: builtins.int + """0 to observe "Everyone" """ + def __init__( + self, + *, + player_id: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["player_id", b"player_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["player_id", b"player_id"]) -> None: ... + +global___ActionObserverPlayerPerspective = ActionObserverPlayerPerspective + +@typing_extensions.final +class ActionObserverCameraMove(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + WORLD_POS_FIELD_NUMBER: builtins.int + DISTANCE_FIELD_NUMBER: builtins.int + @property + def world_pos(self) -> s2clientprotocol.common_pb2.Point2D: ... + distance: builtins.float + """Distance between camera and terrain. Larger value zooms out camera. + Defaults to standard camera distance if set to 0. + """ + def __init__( + self, + *, + world_pos: s2clientprotocol.common_pb2.Point2D | None = ..., + distance: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["distance", b"distance", "world_pos", b"world_pos"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["distance", b"distance", "world_pos", b"world_pos"]) -> None: ... + +global___ActionObserverCameraMove = ActionObserverCameraMove + +@typing_extensions.final +class ActionObserverCameraFollowPlayer(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_ID_FIELD_NUMBER: builtins.int + player_id: builtins.int + """Not implemented. Value must be [1, 15]""" + def __init__( + self, + *, + player_id: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["player_id", b"player_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["player_id", b"player_id"]) -> None: ... + +global___ActionObserverCameraFollowPlayer = ActionObserverCameraFollowPlayer + +@typing_extensions.final +class ActionObserverCameraFollowUnits(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_TAGS_FIELD_NUMBER: builtins.int + @property + def unit_tags(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + def __init__( + self, + *, + unit_tags: collections.abc.Iterable[builtins.int] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["unit_tags", b"unit_tags"]) -> None: ... + +global___ActionObserverCameraFollowUnits = ActionObserverCameraFollowUnits + +@typing_extensions.final +class PlayerResult(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + PLAYER_ID_FIELD_NUMBER: builtins.int + RESULT_FIELD_NUMBER: builtins.int + player_id: builtins.int + result: global___Result.ValueType + def __init__( + self, + *, + player_id: builtins.int | None = ..., + result: global___Result.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["player_id", b"player_id", "result", b"result"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["player_id", b"player_id", "result", b"result"]) -> None: ... + +global___PlayerResult = PlayerResult diff --git a/stubs/s2clientprotocol/s2clientprotocol/score_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/score_pb2.pyi new file mode 100644 index 000000000..78549038d --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/score_pb2.pyi @@ -0,0 +1,256 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import google.protobuf.descriptor +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class Score(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _ScoreType: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ScoreTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Score._ScoreType.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Curriculum: Score._ScoreType.ValueType # 1 + """map generated score (from curriculum maps with special scoring)""" + Melee: Score._ScoreType.ValueType # 2 + """summation of in-progress and current units/buildings value + minerals + vespene""" + + class ScoreType(_ScoreType, metaclass=_ScoreTypeEnumTypeWrapper): ... + Curriculum: Score.ScoreType.ValueType # 1 + """map generated score (from curriculum maps with special scoring)""" + Melee: Score.ScoreType.ValueType # 2 + """summation of in-progress and current units/buildings value + minerals + vespene""" + + SCORE_TYPE_FIELD_NUMBER: builtins.int + SCORE_FIELD_NUMBER: builtins.int + SCORE_DETAILS_FIELD_NUMBER: builtins.int + score_type: global___Score.ScoreType.ValueType + score: builtins.int + """Note: check score_type to know whether this is a melee score or curriculum score""" + @property + def score_details(self) -> global___ScoreDetails: ... + def __init__( + self, + *, + score_type: global___Score.ScoreType.ValueType | None = ..., + score: builtins.int | None = ..., + score_details: global___ScoreDetails | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["score", b"score", "score_details", b"score_details", "score_type", b"score_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["score", b"score", "score_details", b"score_details", "score_type", b"score_type"]) -> None: ... + +global___Score = Score + +@typing_extensions.final +class CategoryScoreDetails(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + NONE_FIELD_NUMBER: builtins.int + ARMY_FIELD_NUMBER: builtins.int + ECONOMY_FIELD_NUMBER: builtins.int + TECHNOLOGY_FIELD_NUMBER: builtins.int + UPGRADE_FIELD_NUMBER: builtins.int + none: builtins.float + """Used when no other category is configured in game data""" + army: builtins.float + economy: builtins.float + technology: builtins.float + upgrade: builtins.float + def __init__( + self, + *, + none: builtins.float | None = ..., + army: builtins.float | None = ..., + economy: builtins.float | None = ..., + technology: builtins.float | None = ..., + upgrade: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["army", b"army", "economy", b"economy", "none", b"none", "technology", b"technology", "upgrade", b"upgrade"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["army", b"army", "economy", b"economy", "none", b"none", "technology", b"technology", "upgrade", b"upgrade"]) -> None: ... + +global___CategoryScoreDetails = CategoryScoreDetails + +@typing_extensions.final +class VitalScoreDetails(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + LIFE_FIELD_NUMBER: builtins.int + SHIELDS_FIELD_NUMBER: builtins.int + ENERGY_FIELD_NUMBER: builtins.int + life: builtins.float + shields: builtins.float + energy: builtins.float + def __init__( + self, + *, + life: builtins.float | None = ..., + shields: builtins.float | None = ..., + energy: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["energy", b"energy", "life", b"life", "shields", b"shields"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["energy", b"energy", "life", b"life", "shields", b"shields"]) -> None: ... + +global___VitalScoreDetails = VitalScoreDetails + +@typing_extensions.final +class ScoreDetails(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + IDLE_PRODUCTION_TIME_FIELD_NUMBER: builtins.int + IDLE_WORKER_TIME_FIELD_NUMBER: builtins.int + TOTAL_VALUE_UNITS_FIELD_NUMBER: builtins.int + TOTAL_VALUE_STRUCTURES_FIELD_NUMBER: builtins.int + KILLED_VALUE_UNITS_FIELD_NUMBER: builtins.int + KILLED_VALUE_STRUCTURES_FIELD_NUMBER: builtins.int + COLLECTED_MINERALS_FIELD_NUMBER: builtins.int + COLLECTED_VESPENE_FIELD_NUMBER: builtins.int + COLLECTION_RATE_MINERALS_FIELD_NUMBER: builtins.int + COLLECTION_RATE_VESPENE_FIELD_NUMBER: builtins.int + SPENT_MINERALS_FIELD_NUMBER: builtins.int + SPENT_VESPENE_FIELD_NUMBER: builtins.int + FOOD_USED_FIELD_NUMBER: builtins.int + KILLED_MINERALS_FIELD_NUMBER: builtins.int + KILLED_VESPENE_FIELD_NUMBER: builtins.int + LOST_MINERALS_FIELD_NUMBER: builtins.int + LOST_VESPENE_FIELD_NUMBER: builtins.int + FRIENDLY_FIRE_MINERALS_FIELD_NUMBER: builtins.int + FRIENDLY_FIRE_VESPENE_FIELD_NUMBER: builtins.int + USED_MINERALS_FIELD_NUMBER: builtins.int + USED_VESPENE_FIELD_NUMBER: builtins.int + TOTAL_USED_MINERALS_FIELD_NUMBER: builtins.int + TOTAL_USED_VESPENE_FIELD_NUMBER: builtins.int + TOTAL_DAMAGE_DEALT_FIELD_NUMBER: builtins.int + TOTAL_DAMAGE_TAKEN_FIELD_NUMBER: builtins.int + TOTAL_HEALED_FIELD_NUMBER: builtins.int + CURRENT_APM_FIELD_NUMBER: builtins.int + CURRENT_EFFECTIVE_APM_FIELD_NUMBER: builtins.int + idle_production_time: builtins.float + """Sum of time any available structure able to produce a unit is not. The time stacks, as in, three idle barracks will increase idle_production_time three times quicker than just one.""" + idle_worker_time: builtins.float + """Sum of time any worker is not mining. Note a worker building is not idle and three idle workers will increase this value three times quicker than just one.""" + total_value_units: builtins.float + """Sum of minerals and vespene spent on completed units.""" + total_value_structures: builtins.float + """Sum of minerals and vespene spent on completed structures.""" + killed_value_units: builtins.float + """Sum of minerals and vespene of units, belonging to the opponent, that the player has destroyed.""" + killed_value_structures: builtins.float + """Sum of minerals and vespene of structures, belonging to the opponent, that the player has destroyed.""" + collected_minerals: builtins.float + """Sum of minerals collected by the player.""" + collected_vespene: builtins.float + """Sum of vespene collected by the player.""" + collection_rate_minerals: builtins.float + """Estimated income of minerals over the next minute based on the players current income. The unit is minerals per minute.""" + collection_rate_vespene: builtins.float + """Estimated income of vespene over the next minute based on the players current income. The unit is vespene per minute.""" + spent_minerals: builtins.float + """Sum of spent minerals at the moment it is spent. For example, this number is incremented by 50 the moment an scv is queued in a command center. It is decremented by 50 if that unit is canceled.""" + spent_vespene: builtins.float + """Sum of spent vespene at the moment it is spent. For example, this number is incremented by 50 when a reaper is queued but decremented by 50 if it is canceled.""" + @property + def food_used(self) -> global___CategoryScoreDetails: + """The following entries contains floating point values for the following catgories: + none - There is no category defined in game data. + army - This category includes all military units but not workers. + economy - This category contains town halls, supply structures, vespene buildings and workers. + technology - This category is any structure that produces units or upgrades, Barracks and Engineering Bays both fall in this category, for example. + upgrade - This category is upgrades such as warp gate or weapons upgrades. + + Sum of food, or supply, utilized in the categories above. + """ + @property + def killed_minerals(self) -> global___CategoryScoreDetails: + """Sum of enemies catagories destroyed in minerals.""" + @property + def killed_vespene(self) -> global___CategoryScoreDetails: + """Sum of enemies catagories destroyed in vespene.""" + @property + def lost_minerals(self) -> global___CategoryScoreDetails: + """ Sum of lost minerals for the player in each category.""" + @property + def lost_vespene(self) -> global___CategoryScoreDetails: + """Sum of lost vespene for the player in each category.""" + @property + def friendly_fire_minerals(self) -> global___CategoryScoreDetails: + """Sum of the lost minerals via destroying the players own units/buildings.""" + @property + def friendly_fire_vespene(self) -> global___CategoryScoreDetails: + """Sum of the lost vespene via destroying the players own units/buildings.""" + @property + def used_minerals(self) -> global___CategoryScoreDetails: + """Sum of used minerals for the player in each category for each existing unit or upgrade. Therefore if a unit died worth 50 mierals this number will be decremented by 50.""" + @property + def used_vespene(self) -> global___CategoryScoreDetails: + """Sum of used vespene for the player in each category. Therefore if a unit died worth 50 vespene this number will be decremented by 50.""" + @property + def total_used_minerals(self) -> global___CategoryScoreDetails: + """Sum of used minerals throughout the entire game for each category. Unliked used_minerals, this value is never decremented.""" + @property + def total_used_vespene(self) -> global___CategoryScoreDetails: + """Sum of used vespene throughout the entire game for each category. Unliked used_vespene, this value is never decremented.""" + @property + def total_damage_dealt(self) -> global___VitalScoreDetails: + """Sum of damage dealt to the player's opponent for each category.""" + @property + def total_damage_taken(self) -> global___VitalScoreDetails: + """Sum of damage taken by the player for each category.""" + @property + def total_healed(self) -> global___VitalScoreDetails: + """Sum of health healed by the player. Note that technology can be healed (by queens) or repaired (by scvs).""" + current_apm: builtins.float + """Recent raw APM.""" + current_effective_apm: builtins.float + """Recent effective APM.""" + def __init__( + self, + *, + idle_production_time: builtins.float | None = ..., + idle_worker_time: builtins.float | None = ..., + total_value_units: builtins.float | None = ..., + total_value_structures: builtins.float | None = ..., + killed_value_units: builtins.float | None = ..., + killed_value_structures: builtins.float | None = ..., + collected_minerals: builtins.float | None = ..., + collected_vespene: builtins.float | None = ..., + collection_rate_minerals: builtins.float | None = ..., + collection_rate_vespene: builtins.float | None = ..., + spent_minerals: builtins.float | None = ..., + spent_vespene: builtins.float | None = ..., + food_used: global___CategoryScoreDetails | None = ..., + killed_minerals: global___CategoryScoreDetails | None = ..., + killed_vespene: global___CategoryScoreDetails | None = ..., + lost_minerals: global___CategoryScoreDetails | None = ..., + lost_vespene: global___CategoryScoreDetails | None = ..., + friendly_fire_minerals: global___CategoryScoreDetails | None = ..., + friendly_fire_vespene: global___CategoryScoreDetails | None = ..., + used_minerals: global___CategoryScoreDetails | None = ..., + used_vespene: global___CategoryScoreDetails | None = ..., + total_used_minerals: global___CategoryScoreDetails | None = ..., + total_used_vespene: global___CategoryScoreDetails | None = ..., + total_damage_dealt: global___VitalScoreDetails | None = ..., + total_damage_taken: global___VitalScoreDetails | None = ..., + total_healed: global___VitalScoreDetails | None = ..., + current_apm: builtins.float | None = ..., + current_effective_apm: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["collected_minerals", b"collected_minerals", "collected_vespene", b"collected_vespene", "collection_rate_minerals", b"collection_rate_minerals", "collection_rate_vespene", b"collection_rate_vespene", "current_apm", b"current_apm", "current_effective_apm", b"current_effective_apm", "food_used", b"food_used", "friendly_fire_minerals", b"friendly_fire_minerals", "friendly_fire_vespene", b"friendly_fire_vespene", "idle_production_time", b"idle_production_time", "idle_worker_time", b"idle_worker_time", "killed_minerals", b"killed_minerals", "killed_value_structures", b"killed_value_structures", "killed_value_units", b"killed_value_units", "killed_vespene", b"killed_vespene", "lost_minerals", b"lost_minerals", "lost_vespene", b"lost_vespene", "spent_minerals", b"spent_minerals", "spent_vespene", b"spent_vespene", "total_damage_dealt", b"total_damage_dealt", "total_damage_taken", b"total_damage_taken", "total_healed", b"total_healed", "total_used_minerals", b"total_used_minerals", "total_used_vespene", b"total_used_vespene", "total_value_structures", b"total_value_structures", "total_value_units", b"total_value_units", "used_minerals", b"used_minerals", "used_vespene", b"used_vespene"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["collected_minerals", b"collected_minerals", "collected_vespene", b"collected_vespene", "collection_rate_minerals", b"collection_rate_minerals", "collection_rate_vespene", b"collection_rate_vespene", "current_apm", b"current_apm", "current_effective_apm", b"current_effective_apm", "food_used", b"food_used", "friendly_fire_minerals", b"friendly_fire_minerals", "friendly_fire_vespene", b"friendly_fire_vespene", "idle_production_time", b"idle_production_time", "idle_worker_time", b"idle_worker_time", "killed_minerals", b"killed_minerals", "killed_value_structures", b"killed_value_structures", "killed_value_units", b"killed_value_units", "killed_vespene", b"killed_vespene", "lost_minerals", b"lost_minerals", "lost_vespene", b"lost_vespene", "spent_minerals", b"spent_minerals", "spent_vespene", b"spent_vespene", "total_damage_dealt", b"total_damage_dealt", "total_damage_taken", b"total_damage_taken", "total_healed", b"total_healed", "total_used_minerals", b"total_used_minerals", "total_used_vespene", b"total_used_vespene", "total_value_structures", b"total_value_structures", "total_value_units", b"total_value_units", "used_minerals", b"used_minerals", "used_vespene", b"used_vespene"]) -> None: ... + +global___ScoreDetails = ScoreDetails diff --git a/stubs/s2clientprotocol/s2clientprotocol/spatial_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/spatial_pb2.pyi new file mode 100644 index 000000000..1e2559038 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/spatial_pb2.pyi @@ -0,0 +1,436 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import s2clientprotocol.common_pb2 +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class ObservationFeatureLayer(google.protobuf.message.Message): + """ + Observation - Feature Layer + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + RENDERS_FIELD_NUMBER: builtins.int + MINIMAP_RENDERS_FIELD_NUMBER: builtins.int + @property + def renders(self) -> global___FeatureLayers: ... + @property + def minimap_renders(self) -> global___FeatureLayersMinimap: ... + def __init__( + self, + *, + renders: global___FeatureLayers | None = ..., + minimap_renders: global___FeatureLayersMinimap | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["minimap_renders", b"minimap_renders", "renders", b"renders"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["minimap_renders", b"minimap_renders", "renders", b"renders"]) -> None: ... + +global___ObservationFeatureLayer = ObservationFeatureLayer + +@typing_extensions.final +class FeatureLayers(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HEIGHT_MAP_FIELD_NUMBER: builtins.int + VISIBILITY_MAP_FIELD_NUMBER: builtins.int + CREEP_FIELD_NUMBER: builtins.int + POWER_FIELD_NUMBER: builtins.int + PLAYER_ID_FIELD_NUMBER: builtins.int + UNIT_TYPE_FIELD_NUMBER: builtins.int + SELECTED_FIELD_NUMBER: builtins.int + UNIT_HIT_POINTS_FIELD_NUMBER: builtins.int + UNIT_HIT_POINTS_RATIO_FIELD_NUMBER: builtins.int + UNIT_ENERGY_FIELD_NUMBER: builtins.int + UNIT_ENERGY_RATIO_FIELD_NUMBER: builtins.int + UNIT_SHIELDS_FIELD_NUMBER: builtins.int + UNIT_SHIELDS_RATIO_FIELD_NUMBER: builtins.int + PLAYER_RELATIVE_FIELD_NUMBER: builtins.int + UNIT_DENSITY_AA_FIELD_NUMBER: builtins.int + UNIT_DENSITY_FIELD_NUMBER: builtins.int + EFFECTS_FIELD_NUMBER: builtins.int + HALLUCINATIONS_FIELD_NUMBER: builtins.int + CLOAKED_FIELD_NUMBER: builtins.int + BLIP_FIELD_NUMBER: builtins.int + BUFFS_FIELD_NUMBER: builtins.int + BUFF_DURATION_FIELD_NUMBER: builtins.int + ACTIVE_FIELD_NUMBER: builtins.int + BUILD_PROGRESS_FIELD_NUMBER: builtins.int + BUILDABLE_FIELD_NUMBER: builtins.int + PATHABLE_FIELD_NUMBER: builtins.int + PLACEHOLDER_FIELD_NUMBER: builtins.int + @property + def height_map(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Terrain height. World space units of [-200, 200] encoded into [0, 255].""" + @property + def visibility_map(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. 0=Hidden, 1=Fogged, 2=Visible, 3=FullHidden""" + @property + def creep(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Zerg creep.""" + @property + def power(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Protoss power.""" + @property + def player_id(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Participants: [1, 15] Neutral: 16""" + @property + def unit_type(self) -> s2clientprotocol.common_pb2.ImageData: + """int32. Unique identifier for type of unit.""" + @property + def selected(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Selected units.""" + @property + def unit_hit_points(self) -> s2clientprotocol.common_pb2.ImageData: + """int32.""" + @property + def unit_hit_points_ratio(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Ratio of current health to max health. [0%, 100%] encoded into [0, 255].""" + @property + def unit_energy(self) -> s2clientprotocol.common_pb2.ImageData: + """int32.""" + @property + def unit_energy_ratio(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Ratio of current energy to max energy. [0%, 100%] encoded into [0, 255].""" + @property + def unit_shields(self) -> s2clientprotocol.common_pb2.ImageData: + """int32.""" + @property + def unit_shields_ratio(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Ratio of current shields to max shields. [0%, 100%] encoded into [0, 255].""" + @property + def player_relative(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. See "Alliance" enum in raw.proto. Range: [1, 4]""" + @property + def unit_density_aa(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Density of units overlapping a pixel, anti-aliased. [0.0, 16.0f] encoded into [0, 255].""" + @property + def unit_density(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Count of units overlapping a pixel.""" + @property + def effects(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Visuals of persistent abilities. (eg. Psistorm)""" + @property + def hallucinations(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether the unit here is a hallucination.""" + @property + def cloaked(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether the unit here is cloaked. Hidden units will show up too, but with less details in other layers.""" + @property + def blip(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether the unit here is a blip.""" + @property + def buffs(self) -> s2clientprotocol.common_pb2.ImageData: + """int32. One of the buffs applied to this unit. Extras are ignored.""" + @property + def buff_duration(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Ratio of buff remaining. [0%, 100%] encoded into [0, 255].""" + @property + def active(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether the unit here is active.""" + @property + def build_progress(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. How far along the building is building something. [0%, 100%] encoded into [0, 255].""" + @property + def buildable(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether a building can be built here.""" + @property + def pathable(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether a unit can walk here.""" + @property + def placeholder(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether the unit here is a placeholder building to be constructed.""" + def __init__( + self, + *, + height_map: s2clientprotocol.common_pb2.ImageData | None = ..., + visibility_map: s2clientprotocol.common_pb2.ImageData | None = ..., + creep: s2clientprotocol.common_pb2.ImageData | None = ..., + power: s2clientprotocol.common_pb2.ImageData | None = ..., + player_id: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_type: s2clientprotocol.common_pb2.ImageData | None = ..., + selected: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_hit_points: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_hit_points_ratio: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_energy: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_energy_ratio: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_shields: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_shields_ratio: s2clientprotocol.common_pb2.ImageData | None = ..., + player_relative: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_density_aa: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_density: s2clientprotocol.common_pb2.ImageData | None = ..., + effects: s2clientprotocol.common_pb2.ImageData | None = ..., + hallucinations: s2clientprotocol.common_pb2.ImageData | None = ..., + cloaked: s2clientprotocol.common_pb2.ImageData | None = ..., + blip: s2clientprotocol.common_pb2.ImageData | None = ..., + buffs: s2clientprotocol.common_pb2.ImageData | None = ..., + buff_duration: s2clientprotocol.common_pb2.ImageData | None = ..., + active: s2clientprotocol.common_pb2.ImageData | None = ..., + build_progress: s2clientprotocol.common_pb2.ImageData | None = ..., + buildable: s2clientprotocol.common_pb2.ImageData | None = ..., + pathable: s2clientprotocol.common_pb2.ImageData | None = ..., + placeholder: s2clientprotocol.common_pb2.ImageData | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["active", b"active", "blip", b"blip", "buff_duration", b"buff_duration", "buffs", b"buffs", "build_progress", b"build_progress", "buildable", b"buildable", "cloaked", b"cloaked", "creep", b"creep", "effects", b"effects", "hallucinations", b"hallucinations", "height_map", b"height_map", "pathable", b"pathable", "placeholder", b"placeholder", "player_id", b"player_id", "player_relative", b"player_relative", "power", b"power", "selected", b"selected", "unit_density", b"unit_density", "unit_density_aa", b"unit_density_aa", "unit_energy", b"unit_energy", "unit_energy_ratio", b"unit_energy_ratio", "unit_hit_points", b"unit_hit_points", "unit_hit_points_ratio", b"unit_hit_points_ratio", "unit_shields", b"unit_shields", "unit_shields_ratio", b"unit_shields_ratio", "unit_type", b"unit_type", "visibility_map", b"visibility_map"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["active", b"active", "blip", b"blip", "buff_duration", b"buff_duration", "buffs", b"buffs", "build_progress", b"build_progress", "buildable", b"buildable", "cloaked", b"cloaked", "creep", b"creep", "effects", b"effects", "hallucinations", b"hallucinations", "height_map", b"height_map", "pathable", b"pathable", "placeholder", b"placeholder", "player_id", b"player_id", "player_relative", b"player_relative", "power", b"power", "selected", b"selected", "unit_density", b"unit_density", "unit_density_aa", b"unit_density_aa", "unit_energy", b"unit_energy", "unit_energy_ratio", b"unit_energy_ratio", "unit_hit_points", b"unit_hit_points", "unit_hit_points_ratio", b"unit_hit_points_ratio", "unit_shields", b"unit_shields", "unit_shields_ratio", b"unit_shields_ratio", "unit_type", b"unit_type", "visibility_map", b"visibility_map"]) -> None: ... + +global___FeatureLayers = FeatureLayers + +@typing_extensions.final +class FeatureLayersMinimap(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + HEIGHT_MAP_FIELD_NUMBER: builtins.int + VISIBILITY_MAP_FIELD_NUMBER: builtins.int + CREEP_FIELD_NUMBER: builtins.int + CAMERA_FIELD_NUMBER: builtins.int + PLAYER_ID_FIELD_NUMBER: builtins.int + PLAYER_RELATIVE_FIELD_NUMBER: builtins.int + SELECTED_FIELD_NUMBER: builtins.int + ALERTS_FIELD_NUMBER: builtins.int + BUILDABLE_FIELD_NUMBER: builtins.int + PATHABLE_FIELD_NUMBER: builtins.int + UNIT_TYPE_FIELD_NUMBER: builtins.int + @property + def height_map(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Terrain height. World space units of [-200, 200] encoded into [0, 255].""" + @property + def visibility_map(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. 0=Hidden, 1=Fogged, 2=Visible, 3=FullHidden""" + @property + def creep(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Zerg creep.""" + @property + def camera(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Area covered by the camera.""" + @property + def player_id(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. Participants: [1, 15] Neutral: 16""" + @property + def player_relative(self) -> s2clientprotocol.common_pb2.ImageData: + """uint8. See "Alliance" enum in raw.proto. Range: [1, 4]""" + @property + def selected(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Selected units.""" + @property + def alerts(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Shows 'UnitAttacked' alert location.""" + @property + def buildable(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether a building can be built here.""" + @property + def pathable(self) -> s2clientprotocol.common_pb2.ImageData: + """1-bit. Whether a unit can walk here.""" + @property + def unit_type(self) -> s2clientprotocol.common_pb2.ImageData: + """Cheat layers, enable with SpatialCameraSetup.allow_cheating_layers. + int32. Unique identifier for type of unit. + """ + def __init__( + self, + *, + height_map: s2clientprotocol.common_pb2.ImageData | None = ..., + visibility_map: s2clientprotocol.common_pb2.ImageData | None = ..., + creep: s2clientprotocol.common_pb2.ImageData | None = ..., + camera: s2clientprotocol.common_pb2.ImageData | None = ..., + player_id: s2clientprotocol.common_pb2.ImageData | None = ..., + player_relative: s2clientprotocol.common_pb2.ImageData | None = ..., + selected: s2clientprotocol.common_pb2.ImageData | None = ..., + alerts: s2clientprotocol.common_pb2.ImageData | None = ..., + buildable: s2clientprotocol.common_pb2.ImageData | None = ..., + pathable: s2clientprotocol.common_pb2.ImageData | None = ..., + unit_type: s2clientprotocol.common_pb2.ImageData | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["alerts", b"alerts", "buildable", b"buildable", "camera", b"camera", "creep", b"creep", "height_map", b"height_map", "pathable", b"pathable", "player_id", b"player_id", "player_relative", b"player_relative", "selected", b"selected", "unit_type", b"unit_type", "visibility_map", b"visibility_map"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["alerts", b"alerts", "buildable", b"buildable", "camera", b"camera", "creep", b"creep", "height_map", b"height_map", "pathable", b"pathable", "player_id", b"player_id", "player_relative", b"player_relative", "selected", b"selected", "unit_type", b"unit_type", "visibility_map", b"visibility_map"]) -> None: ... + +global___FeatureLayersMinimap = FeatureLayersMinimap + +@typing_extensions.final +class ObservationRender(google.protobuf.message.Message): + """ + Observation - Rendered + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + MAP_FIELD_NUMBER: builtins.int + MINIMAP_FIELD_NUMBER: builtins.int + @property + def map(self) -> s2clientprotocol.common_pb2.ImageData: ... + @property + def minimap(self) -> s2clientprotocol.common_pb2.ImageData: ... + def __init__( + self, + *, + map: s2clientprotocol.common_pb2.ImageData | None = ..., + minimap: s2clientprotocol.common_pb2.ImageData | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["map", b"map", "minimap", b"minimap"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["map", b"map", "minimap", b"minimap"]) -> None: ... + +global___ObservationRender = ObservationRender + +@typing_extensions.final +class ActionSpatial(google.protobuf.message.Message): + """ + Action + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_COMMAND_FIELD_NUMBER: builtins.int + CAMERA_MOVE_FIELD_NUMBER: builtins.int + UNIT_SELECTION_POINT_FIELD_NUMBER: builtins.int + UNIT_SELECTION_RECT_FIELD_NUMBER: builtins.int + @property + def unit_command(self) -> global___ActionSpatialUnitCommand: ... + @property + def camera_move(self) -> global___ActionSpatialCameraMove: ... + @property + def unit_selection_point(self) -> global___ActionSpatialUnitSelectionPoint: ... + @property + def unit_selection_rect(self) -> global___ActionSpatialUnitSelectionRect: ... + def __init__( + self, + *, + unit_command: global___ActionSpatialUnitCommand | None = ..., + camera_move: global___ActionSpatialCameraMove | None = ..., + unit_selection_point: global___ActionSpatialUnitSelectionPoint | None = ..., + unit_selection_rect: global___ActionSpatialUnitSelectionRect | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "camera_move", b"camera_move", "unit_command", b"unit_command", "unit_selection_point", b"unit_selection_point", "unit_selection_rect", b"unit_selection_rect"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "camera_move", b"camera_move", "unit_command", b"unit_command", "unit_selection_point", b"unit_selection_point", "unit_selection_rect", b"unit_selection_rect"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["action", b"action"]) -> typing_extensions.Literal["unit_command", "camera_move", "unit_selection_point", "unit_selection_rect"] | None: ... + +global___ActionSpatial = ActionSpatial + +@typing_extensions.final +class ActionSpatialUnitCommand(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + TARGET_SCREEN_COORD_FIELD_NUMBER: builtins.int + TARGET_MINIMAP_COORD_FIELD_NUMBER: builtins.int + QUEUE_COMMAND_FIELD_NUMBER: builtins.int + ability_id: builtins.int + @property + def target_screen_coord(self) -> s2clientprotocol.common_pb2.PointI: ... + @property + def target_minimap_coord(self) -> s2clientprotocol.common_pb2.PointI: ... + queue_command: builtins.bool + """Equivalent to shift+command.""" + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + target_screen_coord: s2clientprotocol.common_pb2.PointI | None = ..., + target_minimap_coord: s2clientprotocol.common_pb2.PointI | None = ..., + queue_command: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "queue_command", b"queue_command", "target", b"target", "target_minimap_coord", b"target_minimap_coord", "target_screen_coord", b"target_screen_coord"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "queue_command", b"queue_command", "target", b"target", "target_minimap_coord", b"target_minimap_coord", "target_screen_coord", b"target_screen_coord"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["target", b"target"]) -> typing_extensions.Literal["target_screen_coord", "target_minimap_coord"] | None: ... + +global___ActionSpatialUnitCommand = ActionSpatialUnitCommand + +@typing_extensions.final +class ActionSpatialCameraMove(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CENTER_MINIMAP_FIELD_NUMBER: builtins.int + @property + def center_minimap(self) -> s2clientprotocol.common_pb2.PointI: + """Simulates a click on the minimap to move the camera.""" + def __init__( + self, + *, + center_minimap: s2clientprotocol.common_pb2.PointI | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["center_minimap", b"center_minimap"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["center_minimap", b"center_minimap"]) -> None: ... + +global___ActionSpatialCameraMove = ActionSpatialCameraMove + +@typing_extensions.final +class ActionSpatialUnitSelectionPoint(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Type: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionSpatialUnitSelectionPoint._Type.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Select: ActionSpatialUnitSelectionPoint._Type.ValueType # 1 + """Equivalent to normal click. Changes selection to unit.""" + Toggle: ActionSpatialUnitSelectionPoint._Type.ValueType # 2 + """Equivalent to shift+click. Toggle selection of unit.""" + AllType: ActionSpatialUnitSelectionPoint._Type.ValueType # 3 + """Equivalent to control+click. Selects all units of a given type.""" + AddAllType: ActionSpatialUnitSelectionPoint._Type.ValueType # 4 + """Equivalent to shift+control+click. Selects all units of a given type.""" + + class Type(_Type, metaclass=_TypeEnumTypeWrapper): ... + Select: ActionSpatialUnitSelectionPoint.Type.ValueType # 1 + """Equivalent to normal click. Changes selection to unit.""" + Toggle: ActionSpatialUnitSelectionPoint.Type.ValueType # 2 + """Equivalent to shift+click. Toggle selection of unit.""" + AllType: ActionSpatialUnitSelectionPoint.Type.ValueType # 3 + """Equivalent to control+click. Selects all units of a given type.""" + AddAllType: ActionSpatialUnitSelectionPoint.Type.ValueType # 4 + """Equivalent to shift+control+click. Selects all units of a given type.""" + + SELECTION_SCREEN_COORD_FIELD_NUMBER: builtins.int + TYPE_FIELD_NUMBER: builtins.int + @property + def selection_screen_coord(self) -> s2clientprotocol.common_pb2.PointI: ... + type: global___ActionSpatialUnitSelectionPoint.Type.ValueType + def __init__( + self, + *, + selection_screen_coord: s2clientprotocol.common_pb2.PointI | None = ..., + type: global___ActionSpatialUnitSelectionPoint.Type.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["selection_screen_coord", b"selection_screen_coord", "type", b"type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["selection_screen_coord", b"selection_screen_coord", "type", b"type"]) -> None: ... + +global___ActionSpatialUnitSelectionPoint = ActionSpatialUnitSelectionPoint + +@typing_extensions.final +class ActionSpatialUnitSelectionRect(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SELECTION_SCREEN_COORD_FIELD_NUMBER: builtins.int + SELECTION_ADD_FIELD_NUMBER: builtins.int + @property + def selection_screen_coord(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[s2clientprotocol.common_pb2.RectangleI]: + """Eventually this should not be an array, but a single field (multiple would be cheating).""" + selection_add: builtins.bool + """Equivalent to shift+drag. Adds units to selection.""" + def __init__( + self, + *, + selection_screen_coord: collections.abc.Iterable[s2clientprotocol.common_pb2.RectangleI] | None = ..., + selection_add: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["selection_add", b"selection_add"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["selection_add", b"selection_add", "selection_screen_coord", b"selection_screen_coord"]) -> None: ... + +global___ActionSpatialUnitSelectionRect = ActionSpatialUnitSelectionRect diff --git a/stubs/s2clientprotocol/s2clientprotocol/ui_pb2.pyi b/stubs/s2clientprotocol/s2clientprotocol/ui_pb2.pyi new file mode 100644 index 000000000..9490cde97 --- /dev/null +++ b/stubs/s2clientprotocol/s2clientprotocol/ui_pb2.pyi @@ -0,0 +1,523 @@ +""" +@generated by mypy-protobuf. Do not edit manually! +isort:skip_file +""" +import builtins +import collections.abc +import google.protobuf.descriptor +import google.protobuf.internal.containers +import google.protobuf.internal.enum_type_wrapper +import google.protobuf.message +import sys +import typing + +if sys.version_info >= (3, 10): + import typing as typing_extensions +else: + import typing_extensions + +DESCRIPTOR: google.protobuf.descriptor.FileDescriptor + +@typing_extensions.final +class ObservationUI(google.protobuf.message.Message): + """ + Observation + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + GROUPS_FIELD_NUMBER: builtins.int + SINGLE_FIELD_NUMBER: builtins.int + MULTI_FIELD_NUMBER: builtins.int + CARGO_FIELD_NUMBER: builtins.int + PRODUCTION_FIELD_NUMBER: builtins.int + @property + def groups(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlGroup]: ... + @property + def single(self) -> global___SinglePanel: ... + @property + def multi(self) -> global___MultiPanel: ... + @property + def cargo(self) -> global___CargoPanel: ... + @property + def production(self) -> global___ProductionPanel: ... + def __init__( + self, + *, + groups: collections.abc.Iterable[global___ControlGroup] | None = ..., + single: global___SinglePanel | None = ..., + multi: global___MultiPanel | None = ..., + cargo: global___CargoPanel | None = ..., + production: global___ProductionPanel | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["cargo", b"cargo", "multi", b"multi", "panel", b"panel", "production", b"production", "single", b"single"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["cargo", b"cargo", "groups", b"groups", "multi", b"multi", "panel", b"panel", "production", b"production", "single", b"single"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["panel", b"panel"]) -> typing_extensions.Literal["single", "multi", "cargo", "production"] | None: ... + +global___ObservationUI = ObservationUI + +@typing_extensions.final +class ControlGroup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CONTROL_GROUP_INDEX_FIELD_NUMBER: builtins.int + LEADER_UNIT_TYPE_FIELD_NUMBER: builtins.int + COUNT_FIELD_NUMBER: builtins.int + control_group_index: builtins.int + leader_unit_type: builtins.int + count: builtins.int + def __init__( + self, + *, + control_group_index: builtins.int | None = ..., + leader_unit_type: builtins.int | None = ..., + count: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["control_group_index", b"control_group_index", "count", b"count", "leader_unit_type", b"leader_unit_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["control_group_index", b"control_group_index", "count", b"count", "leader_unit_type", b"leader_unit_type"]) -> None: ... + +global___ControlGroup = ControlGroup + +@typing_extensions.final +class UnitInfo(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_TYPE_FIELD_NUMBER: builtins.int + PLAYER_RELATIVE_FIELD_NUMBER: builtins.int + HEALTH_FIELD_NUMBER: builtins.int + SHIELDS_FIELD_NUMBER: builtins.int + ENERGY_FIELD_NUMBER: builtins.int + TRANSPORT_SLOTS_TAKEN_FIELD_NUMBER: builtins.int + BUILD_PROGRESS_FIELD_NUMBER: builtins.int + ADD_ON_FIELD_NUMBER: builtins.int + MAX_HEALTH_FIELD_NUMBER: builtins.int + MAX_SHIELDS_FIELD_NUMBER: builtins.int + MAX_ENERGY_FIELD_NUMBER: builtins.int + unit_type: builtins.int + player_relative: builtins.int + health: builtins.int + shields: builtins.int + energy: builtins.int + transport_slots_taken: builtins.int + build_progress: builtins.float + """Range: [0.0, 1.0]""" + @property + def add_on(self) -> global___UnitInfo: ... + max_health: builtins.int + max_shields: builtins.int + max_energy: builtins.int + def __init__( + self, + *, + unit_type: builtins.int | None = ..., + player_relative: builtins.int | None = ..., + health: builtins.int | None = ..., + shields: builtins.int | None = ..., + energy: builtins.int | None = ..., + transport_slots_taken: builtins.int | None = ..., + build_progress: builtins.float | None = ..., + add_on: global___UnitInfo | None = ..., + max_health: builtins.int | None = ..., + max_shields: builtins.int | None = ..., + max_energy: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["add_on", b"add_on", "build_progress", b"build_progress", "energy", b"energy", "health", b"health", "max_energy", b"max_energy", "max_health", b"max_health", "max_shields", b"max_shields", "player_relative", b"player_relative", "shields", b"shields", "transport_slots_taken", b"transport_slots_taken", "unit_type", b"unit_type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["add_on", b"add_on", "build_progress", b"build_progress", "energy", b"energy", "health", b"health", "max_energy", b"max_energy", "max_health", b"max_health", "max_shields", b"max_shields", "player_relative", b"player_relative", "shields", b"shields", "transport_slots_taken", b"transport_slots_taken", "unit_type", b"unit_type"]) -> None: ... + +global___UnitInfo = UnitInfo + +@typing_extensions.final +class SinglePanel(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_FIELD_NUMBER: builtins.int + ATTACK_UPGRADE_LEVEL_FIELD_NUMBER: builtins.int + ARMOR_UPGRADE_LEVEL_FIELD_NUMBER: builtins.int + SHIELD_UPGRADE_LEVEL_FIELD_NUMBER: builtins.int + BUFFS_FIELD_NUMBER: builtins.int + @property + def unit(self) -> global___UnitInfo: ... + attack_upgrade_level: builtins.int + armor_upgrade_level: builtins.int + shield_upgrade_level: builtins.int + @property + def buffs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ... + def __init__( + self, + *, + unit: global___UnitInfo | None = ..., + attack_upgrade_level: builtins.int | None = ..., + armor_upgrade_level: builtins.int | None = ..., + shield_upgrade_level: builtins.int | None = ..., + buffs: collections.abc.Iterable[builtins.int] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["armor_upgrade_level", b"armor_upgrade_level", "attack_upgrade_level", b"attack_upgrade_level", "shield_upgrade_level", b"shield_upgrade_level", "unit", b"unit"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["armor_upgrade_level", b"armor_upgrade_level", "attack_upgrade_level", b"attack_upgrade_level", "buffs", b"buffs", "shield_upgrade_level", b"shield_upgrade_level", "unit", b"unit"]) -> None: ... + +global___SinglePanel = SinglePanel + +@typing_extensions.final +class MultiPanel(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNITS_FIELD_NUMBER: builtins.int + @property + def units(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UnitInfo]: ... + def __init__( + self, + *, + units: collections.abc.Iterable[global___UnitInfo] | None = ..., + ) -> None: ... + def ClearField(self, field_name: typing_extensions.Literal["units", b"units"]) -> None: ... + +global___MultiPanel = MultiPanel + +@typing_extensions.final +class CargoPanel(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_FIELD_NUMBER: builtins.int + PASSENGERS_FIELD_NUMBER: builtins.int + SLOTS_AVAILABLE_FIELD_NUMBER: builtins.int + @property + def unit(self) -> global___UnitInfo: ... + @property + def passengers(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UnitInfo]: ... + slots_available: builtins.int + """TODO: Change to cargo size""" + def __init__( + self, + *, + unit: global___UnitInfo | None = ..., + passengers: collections.abc.Iterable[global___UnitInfo] | None = ..., + slots_available: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["slots_available", b"slots_available", "unit", b"unit"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["passengers", b"passengers", "slots_available", b"slots_available", "unit", b"unit"]) -> None: ... + +global___CargoPanel = CargoPanel + +@typing_extensions.final +class BuildItem(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + BUILD_PROGRESS_FIELD_NUMBER: builtins.int + ability_id: builtins.int + build_progress: builtins.float + """Range: [0.0, 1.0]""" + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + build_progress: builtins.float | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "build_progress", b"build_progress"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id", "build_progress", b"build_progress"]) -> None: ... + +global___BuildItem = BuildItem + +@typing_extensions.final +class ProductionPanel(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_FIELD_NUMBER: builtins.int + BUILD_QUEUE_FIELD_NUMBER: builtins.int + PRODUCTION_QUEUE_FIELD_NUMBER: builtins.int + @property + def unit(self) -> global___UnitInfo: ... + @property + def build_queue(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UnitInfo]: + """build_queue ONLY gives information about units that are being produced. + Use production_queue instead to see both units being trained as well as research in the queue. + """ + @property + def production_queue(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BuildItem]: ... + def __init__( + self, + *, + unit: global___UnitInfo | None = ..., + build_queue: collections.abc.Iterable[global___UnitInfo] | None = ..., + production_queue: collections.abc.Iterable[global___BuildItem] | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["unit", b"unit"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["build_queue", b"build_queue", "production_queue", b"production_queue", "unit", b"unit"]) -> None: ... + +global___ProductionPanel = ProductionPanel + +@typing_extensions.final +class ActionUI(google.protobuf.message.Message): + """ + Action + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + CONTROL_GROUP_FIELD_NUMBER: builtins.int + SELECT_ARMY_FIELD_NUMBER: builtins.int + SELECT_WARP_GATES_FIELD_NUMBER: builtins.int + SELECT_LARVA_FIELD_NUMBER: builtins.int + SELECT_IDLE_WORKER_FIELD_NUMBER: builtins.int + MULTI_PANEL_FIELD_NUMBER: builtins.int + CARGO_PANEL_FIELD_NUMBER: builtins.int + PRODUCTION_PANEL_FIELD_NUMBER: builtins.int + TOGGLE_AUTOCAST_FIELD_NUMBER: builtins.int + @property + def control_group(self) -> global___ActionControlGroup: ... + @property + def select_army(self) -> global___ActionSelectArmy: ... + @property + def select_warp_gates(self) -> global___ActionSelectWarpGates: ... + @property + def select_larva(self) -> global___ActionSelectLarva: ... + @property + def select_idle_worker(self) -> global___ActionSelectIdleWorker: ... + @property + def multi_panel(self) -> global___ActionMultiPanel: ... + @property + def cargo_panel(self) -> global___ActionCargoPanelUnload: ... + @property + def production_panel(self) -> global___ActionProductionPanelRemoveFromQueue: ... + @property + def toggle_autocast(self) -> global___ActionToggleAutocast: ... + def __init__( + self, + *, + control_group: global___ActionControlGroup | None = ..., + select_army: global___ActionSelectArmy | None = ..., + select_warp_gates: global___ActionSelectWarpGates | None = ..., + select_larva: global___ActionSelectLarva | None = ..., + select_idle_worker: global___ActionSelectIdleWorker | None = ..., + multi_panel: global___ActionMultiPanel | None = ..., + cargo_panel: global___ActionCargoPanelUnload | None = ..., + production_panel: global___ActionProductionPanelRemoveFromQueue | None = ..., + toggle_autocast: global___ActionToggleAutocast | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "cargo_panel", b"cargo_panel", "control_group", b"control_group", "multi_panel", b"multi_panel", "production_panel", b"production_panel", "select_army", b"select_army", "select_idle_worker", b"select_idle_worker", "select_larva", b"select_larva", "select_warp_gates", b"select_warp_gates", "toggle_autocast", b"toggle_autocast"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "cargo_panel", b"cargo_panel", "control_group", b"control_group", "multi_panel", b"multi_panel", "production_panel", b"production_panel", "select_army", b"select_army", "select_idle_worker", b"select_idle_worker", "select_larva", b"select_larva", "select_warp_gates", b"select_warp_gates", "toggle_autocast", b"toggle_autocast"]) -> None: ... + def WhichOneof(self, oneof_group: typing_extensions.Literal["action", b"action"]) -> typing_extensions.Literal["control_group", "select_army", "select_warp_gates", "select_larva", "select_idle_worker", "multi_panel", "cargo_panel", "production_panel", "toggle_autocast"] | None: ... + +global___ActionUI = ActionUI + +@typing_extensions.final +class ActionControlGroup(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _ControlGroupAction: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ControlGroupActionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionControlGroup._ControlGroupAction.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Recall: ActionControlGroup._ControlGroupAction.ValueType # 1 + """Equivalent to number hotkey. Replaces current selection with control group.""" + Set: ActionControlGroup._ControlGroupAction.ValueType # 2 + """Equivalent to Control + number hotkey. Sets control group to current selection.""" + Append: ActionControlGroup._ControlGroupAction.ValueType # 3 + """Equivalent to Shift + number hotkey. Adds current selection into control group.""" + SetAndSteal: ActionControlGroup._ControlGroupAction.ValueType # 4 + """Equivalent to Control + Alt + number hotkey. Sets control group to current selection. Units are removed from other control groups.""" + AppendAndSteal: ActionControlGroup._ControlGroupAction.ValueType # 5 + """Equivalent to Shift + Alt + number hotkey. Adds current selection into control group. Units are removed from other control groups.""" + + class ControlGroupAction(_ControlGroupAction, metaclass=_ControlGroupActionEnumTypeWrapper): ... + Recall: ActionControlGroup.ControlGroupAction.ValueType # 1 + """Equivalent to number hotkey. Replaces current selection with control group.""" + Set: ActionControlGroup.ControlGroupAction.ValueType # 2 + """Equivalent to Control + number hotkey. Sets control group to current selection.""" + Append: ActionControlGroup.ControlGroupAction.ValueType # 3 + """Equivalent to Shift + number hotkey. Adds current selection into control group.""" + SetAndSteal: ActionControlGroup.ControlGroupAction.ValueType # 4 + """Equivalent to Control + Alt + number hotkey. Sets control group to current selection. Units are removed from other control groups.""" + AppendAndSteal: ActionControlGroup.ControlGroupAction.ValueType # 5 + """Equivalent to Shift + Alt + number hotkey. Adds current selection into control group. Units are removed from other control groups.""" + + ACTION_FIELD_NUMBER: builtins.int + CONTROL_GROUP_INDEX_FIELD_NUMBER: builtins.int + action: global___ActionControlGroup.ControlGroupAction.ValueType + control_group_index: builtins.int + def __init__( + self, + *, + action: global___ActionControlGroup.ControlGroupAction.ValueType | None = ..., + control_group_index: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["action", b"action", "control_group_index", b"control_group_index"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["action", b"action", "control_group_index", b"control_group_index"]) -> None: ... + +global___ActionControlGroup = ActionControlGroup + +@typing_extensions.final +class ActionSelectArmy(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SELECTION_ADD_FIELD_NUMBER: builtins.int + selection_add: builtins.bool + def __init__( + self, + *, + selection_add: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["selection_add", b"selection_add"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["selection_add", b"selection_add"]) -> None: ... + +global___ActionSelectArmy = ActionSelectArmy + +@typing_extensions.final +class ActionSelectWarpGates(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + SELECTION_ADD_FIELD_NUMBER: builtins.int + selection_add: builtins.bool + def __init__( + self, + *, + selection_add: builtins.bool | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["selection_add", b"selection_add"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["selection_add", b"selection_add"]) -> None: ... + +global___ActionSelectWarpGates = ActionSelectWarpGates + +@typing_extensions.final +class ActionSelectLarva(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + def __init__( + self, + ) -> None: ... + +global___ActionSelectLarva = ActionSelectLarva + +@typing_extensions.final +class ActionSelectIdleWorker(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Type: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionSelectIdleWorker._Type.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + Set: ActionSelectIdleWorker._Type.ValueType # 1 + """Equivalent to click with no modifiers. Replaces selection with single idle worker.""" + Add: ActionSelectIdleWorker._Type.ValueType # 2 + """Equivalent to shift+click. Adds single idle worker to current selection.""" + All: ActionSelectIdleWorker._Type.ValueType # 3 + """Equivalent to control+click. Selects all idle workers.""" + AddAll: ActionSelectIdleWorker._Type.ValueType # 4 + """Equivalent to shift+control+click. Adds all idle workers to current selection.""" + + class Type(_Type, metaclass=_TypeEnumTypeWrapper): ... + Set: ActionSelectIdleWorker.Type.ValueType # 1 + """Equivalent to click with no modifiers. Replaces selection with single idle worker.""" + Add: ActionSelectIdleWorker.Type.ValueType # 2 + """Equivalent to shift+click. Adds single idle worker to current selection.""" + All: ActionSelectIdleWorker.Type.ValueType # 3 + """Equivalent to control+click. Selects all idle workers.""" + AddAll: ActionSelectIdleWorker.Type.ValueType # 4 + """Equivalent to shift+control+click. Adds all idle workers to current selection.""" + + TYPE_FIELD_NUMBER: builtins.int + type: global___ActionSelectIdleWorker.Type.ValueType + def __init__( + self, + *, + type: global___ActionSelectIdleWorker.Type.ValueType | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["type", b"type"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["type", b"type"]) -> None: ... + +global___ActionSelectIdleWorker = ActionSelectIdleWorker + +@typing_extensions.final +class ActionMultiPanel(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _Type: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _TypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ActionMultiPanel._Type.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + SingleSelect: ActionMultiPanel._Type.ValueType # 1 + """Click on icon""" + DeselectUnit: ActionMultiPanel._Type.ValueType # 2 + """Shift Click on icon""" + SelectAllOfType: ActionMultiPanel._Type.ValueType # 3 + """Control Click on icon.""" + DeselectAllOfType: ActionMultiPanel._Type.ValueType # 4 + """Control+Shift Click on icon.""" + + class Type(_Type, metaclass=_TypeEnumTypeWrapper): ... + SingleSelect: ActionMultiPanel.Type.ValueType # 1 + """Click on icon""" + DeselectUnit: ActionMultiPanel.Type.ValueType # 2 + """Shift Click on icon""" + SelectAllOfType: ActionMultiPanel.Type.ValueType # 3 + """Control Click on icon.""" + DeselectAllOfType: ActionMultiPanel.Type.ValueType # 4 + """Control+Shift Click on icon.""" + + TYPE_FIELD_NUMBER: builtins.int + UNIT_INDEX_FIELD_NUMBER: builtins.int + type: global___ActionMultiPanel.Type.ValueType + unit_index: builtins.int + def __init__( + self, + *, + type: global___ActionMultiPanel.Type.ValueType | None = ..., + unit_index: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["type", b"type", "unit_index", b"unit_index"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["type", b"type", "unit_index", b"unit_index"]) -> None: ... + +global___ActionMultiPanel = ActionMultiPanel + +@typing_extensions.final +class ActionCargoPanelUnload(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_INDEX_FIELD_NUMBER: builtins.int + unit_index: builtins.int + def __init__( + self, + *, + unit_index: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["unit_index", b"unit_index"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["unit_index", b"unit_index"]) -> None: ... + +global___ActionCargoPanelUnload = ActionCargoPanelUnload + +@typing_extensions.final +class ActionProductionPanelRemoveFromQueue(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + UNIT_INDEX_FIELD_NUMBER: builtins.int + unit_index: builtins.int + def __init__( + self, + *, + unit_index: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["unit_index", b"unit_index"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["unit_index", b"unit_index"]) -> None: ... + +global___ActionProductionPanelRemoveFromQueue = ActionProductionPanelRemoveFromQueue + +@typing_extensions.final +class ActionToggleAutocast(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + ABILITY_ID_FIELD_NUMBER: builtins.int + ability_id: builtins.int + def __init__( + self, + *, + ability_id: builtins.int | None = ..., + ) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["ability_id", b"ability_id"]) -> None: ... + +global___ActionToggleAutocast = ActionToggleAutocast