mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Check for available aircraft as task precondition.
This makes it so that the mission planning effects are applied only if the package can be fulfilled. For example, breakthrough will be used only if all the BAI missions were fulfilled, not if they will *attempt* to be fulfilled.
This commit is contained in:
@@ -5,16 +5,12 @@ from typing import TYPE_CHECKING
|
||||
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.htn import PrimitiveTask
|
||||
from game.profiling import MultiEventTracer
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from gen.flights.ai_flight_planner import CoalitionMissionPlanner
|
||||
from game.coalition import Coalition
|
||||
|
||||
|
||||
# TODO: Refactor so that we don't need to call up to the mission planner.
|
||||
class TheaterCommanderTask(PrimitiveTask[TheaterState]):
|
||||
@abstractmethod
|
||||
def execute(
|
||||
self, mission_planner: CoalitionMissionPlanner, tracer: MultiEventTracer
|
||||
) -> None:
|
||||
def execute(self, coalition: Coalition) -> None:
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user