Halt sim on A2A contact.

https://github.com/dcs-liberation/dcs_liberation/issues/1681
This commit is contained in:
Dan Albert
2021-10-27 00:45:39 -07:00
parent 9839787b6d
commit b2cbf4b6f4
13 changed files with 202 additions and 64 deletions

View File

@@ -2,13 +2,15 @@ from __future__ import annotations
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from typing import TYPE_CHECKING
from typing import Optional, TYPE_CHECKING
from game.ato.starttype import StartType
if TYPE_CHECKING:
from game.ato.flight import Flight
from game.settings import Settings
from game.sim.aircraftengagementzones import AircraftEngagementZones
from game.threatzones import ThreatPoly
class FlightState(ABC):
@@ -20,7 +22,7 @@ class FlightState(ABC):
def on_game_tick(self, time: datetime, duration: timedelta) -> None:
...
def should_halt_sim(self) -> bool:
def should_halt_sim(self, enemy_aircraft_coverage: AircraftEngagementZones) -> bool:
return False
@property
@@ -32,3 +34,6 @@ class FlightState(ABC):
@abstractmethod
def spawn_type(self) -> StartType:
...
def a2a_commit_region(self) -> Optional[ThreatPoly]:
return None