mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fixed mypy error
This commit is contained in:
parent
c0fa135bf6
commit
368bf08ade
@ -9,7 +9,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
from typing import Dict, Iterator, Optional, TYPE_CHECKING, Type
|
from typing import Dict, Iterator, Optional, TYPE_CHECKING, Type, List
|
||||||
|
|
||||||
from dcs import Mission, Point
|
from dcs import Mission, Point
|
||||||
from dcs.country import Country
|
from dcs.country import Country
|
||||||
@ -130,13 +130,13 @@ class MissileSiteGenerator(GenericGroundObjectGenerator):
|
|||||||
else:
|
else:
|
||||||
logging.info("Couldn't setup missile site to fire, group was not generated.")
|
logging.info("Couldn't setup missile site to fire, group was not generated.")
|
||||||
|
|
||||||
def possible_missile_targets(self, vg: Group) -> [Point]:
|
def possible_missile_targets(self, vg: Group) -> List[Point]:
|
||||||
"""
|
"""
|
||||||
Find enemy control points in range
|
Find enemy control points in range
|
||||||
:param vg: Vehicle group we are searching a target for (There is always only oe group right now)
|
:param vg: Vehicle group we are searching a target for (There is always only oe group right now)
|
||||||
:return: List of possible missile targets
|
:return: List of possible missile targets
|
||||||
"""
|
"""
|
||||||
targets: [Point] = []
|
targets: List[Point] = []
|
||||||
for cp in self.game.theater.controlpoints:
|
for cp in self.game.theater.controlpoints:
|
||||||
if cp.captured != self.ground_object.control_point.captured:
|
if cp.captured != self.ground_object.control_point.captured:
|
||||||
distance = cp.position.distance_to_point(vg.position)
|
distance = cp.position.distance_to_point(vg.position)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user