mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
When using 'isinstance', TYPE_CHECKING is NOT ENOUGH!!!
This commit is contained in:
parent
5d506ca97e
commit
a98c9ffe8d
@ -4,12 +4,11 @@ import random
|
|||||||
from typing import Union, TYPE_CHECKING, Tuple
|
from typing import Union, TYPE_CHECKING, Tuple
|
||||||
|
|
||||||
from game.theater.interfaces.CTLD import CTLD
|
from game.theater.interfaces.CTLD import CTLD
|
||||||
|
from game.theater import ControlPoint
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from dcs import Point
|
from dcs import Point
|
||||||
|
|
||||||
from game.theater import ControlPoint
|
|
||||||
|
|
||||||
|
|
||||||
def generate_random_ctld_point(cp: Union[ControlPoint, CTLD]) -> Point:
|
def generate_random_ctld_point(cp: Union[ControlPoint, CTLD]) -> Point:
|
||||||
if isinstance(cp, CTLD) and cp.ctld_zones:
|
if isinstance(cp, CTLD) and cp.ctld_zones:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user