Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ dev = [

[tool.setuptools]
license-files = []
package-dir = { sc2 = "sc2" }
package-dir = { sc2 = "sc2", s2clientprotocol = "s2clientprotocol" }

[tool.setuptools.package-data]
sc2 = ["py.typed", "*.pyi"]

[build-system]
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-a-build-backend
Expand Down
Empty file added s2clientprotocol/__init__.pyi
Empty file.
26 changes: 26 additions & 0 deletions s2clientprotocol/common_pb2.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# https://github.com/Blizzard/s2client-proto/blob/bff45dae1fc685e6acbaae084670afb7d1c0832c/s2clientprotocol/common.proto
from enum import Enum
from google.protobuf.message import Message

class PointI(Message):
x: int
y: int
def __init__(self, x: int = ..., y: int = ...) -> None: ...

class Point2D(Message):
x: float
y: float
def __init__(self, x: float = ..., y: float = ...) -> None: ...

class Point(Message):
x: float
y: float
z: float
def __init__(self, x: float = ..., y: float = ..., z: float = ...) -> None: ...

class Race(Enum):
NoRace: int
Terran: int
Zerg: int
Protoss: int
Random: int
2 changes: 1 addition & 1 deletion sc2/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def return_NOTAUNIT() -> UnitTypeId:
UnitTypeId.EXTRACTORRICH,
}
# pyre-ignore[11]
DAMAGE_BONUS_PER_UPGRADE: dict[UnitTypeId, dict[TargetType, Any]] = {
DAMAGE_BONUS_PER_UPGRADE: dict[UnitTypeId, dict[int, Any]] = {
#
# Protoss
#
Expand Down
5 changes: 1 addition & 4 deletions sc2/data.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# pyre-ignore-all-errors[16, 19]
"""For the list of enums, see here
https://github.com/Blizzard/s2client-api/blob/d9ba0a33d6ce9d233c2a4ee988360c188fbe9dbf/include/sc2api/sc2_gametypes.h
https://github.com/Blizzard/s2client-api/blob/d9ba0a33d6ce9d233c2a4ee988360c188fbe9dbf/include/sc2api/sc2_action.h
https://github.com/Blizzard/s2client-api/blob/d9ba0a33d6ce9d233c2a4ee988360c188fbe9dbf/include/sc2api/sc2_unit.h
https://github.com/Blizzard/s2client-api/blob/d9ba0a33d6ce9d233c2a4ee988360c188fbe9dbf/include/sc2api/sc2_data.h
https://github.com/Blizzard/s2client-proto/tree/bff45dae1fc685e6acbaae084670afb7d1c0832c/s2clientprotocol
"""

from __future__ import annotations
Expand Down
Loading
Loading