mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix mypy issue.
This commit is contained in:
parent
11604671f8
commit
58481268f7
@ -18,7 +18,11 @@ from game import db
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
from .base import Base
|
||||
from .missiontarget import MissionTarget
|
||||
from .theatergroundobject import SamGroundObject, TheaterGroundObject
|
||||
from .theatergroundobject import (
|
||||
BaseDefenseGroundObject,
|
||||
SamGroundObject,
|
||||
TheaterGroundObject,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
@ -52,7 +56,7 @@ class ControlPoint(MissionTarget):
|
||||
self.full_name = name
|
||||
self.at = at
|
||||
self.connected_objectives: List[TheaterGroundObject] = []
|
||||
self.base_defenses: List[SamGroundObject] = []
|
||||
self.base_defenses: List[BaseDefenseGroundObject] = []
|
||||
|
||||
self.size = size
|
||||
self.importance = importance
|
||||
|
||||
@ -186,10 +186,14 @@ class MissileSiteGroundObject(TheaterGroundObject):
|
||||
)
|
||||
|
||||
|
||||
class BaseDefenseGroundObject(TheaterGroundObject):
|
||||
"""Base type for all base defenses."""
|
||||
|
||||
|
||||
# TODO: Differentiate types.
|
||||
# This type gets used both for AA sites (SAM, AAA, or SHORAD) but also for the
|
||||
# armor garrisons at airbases. These should each be split into their own types.
|
||||
class SamGroundObject(TheaterGroundObject):
|
||||
class SamGroundObject(BaseDefenseGroundObject):
|
||||
def __init__(self, name: str, group_id: int, position: Point,
|
||||
control_point: ControlPoint, for_airbase: bool) -> None:
|
||||
super().__init__(
|
||||
@ -218,7 +222,7 @@ class SamGroundObject(TheaterGroundObject):
|
||||
return super().group_name
|
||||
|
||||
|
||||
class EwrGroundObject(TheaterGroundObject):
|
||||
class EwrGroundObject(BaseDefenseGroundObject):
|
||||
def __init__(self, name: str, group_id: int, position: Point,
|
||||
control_point: ControlPoint) -> None:
|
||||
super().__init__(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user