Fix some typing in preparation for pydcs types.

Not complete, but progress.

(cherry picked from commit 53f6a0b32b)
This commit is contained in:
Dan Albert
2021-07-08 22:50:55 -07:00
parent 19980e5d6b
commit 229a2cd7a4
30 changed files with 208 additions and 193 deletions

View File

@@ -70,20 +70,6 @@ class Operation:
cls._setup_mission_coalitions()
cls.current_mission.options.load_from_dict(options_dict)
@classmethod
def conflicts(cls) -> Iterable[Conflict]:
assert cls.game
for frontline in cls.game.theater.conflicts():
yield Conflict(
cls.game.theater,
frontline,
cls.game.player_faction.name,
cls.game.enemy_faction.name,
cls.game.player_country,
cls.game.enemy_country,
frontline.position,
)
@classmethod
def air_conflict(cls) -> Conflict:
assert cls.game
@@ -97,8 +83,8 @@ class Operation:
FrontLine(player_cp, enemy_cp),
cls.game.player_faction.name,
cls.game.enemy_faction.name,
cls.game.player_country,
cls.game.enemy_country,
cls.current_mission.country(cls.game.player_country),
cls.current_mission.country(cls.game.enemy_country),
mid_point,
)