mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Draw frozen combat on the map.
Very basic display. Draws the engagement footprint for air-to-air combat, a line from the flight to the target for IP, and lines from SAMs to their target for air defense. https://github.com/dcs-liberation/dcs_liberation/issues/1680
This commit is contained in:
@@ -18,14 +18,16 @@ from game.ato.flightstate import (
|
||||
from game.ato.starttype import StartType
|
||||
from gen.flights.traveltime import TotEstimator
|
||||
from .combat import CombatInitiator, FrozenCombat
|
||||
from .gameupdatecallbacks import GameUpdateCallbacks
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
|
||||
class AircraftSimulation:
|
||||
def __init__(self, game: Game) -> None:
|
||||
def __init__(self, game: Game, callbacks: GameUpdateCallbacks) -> None:
|
||||
self.game = game
|
||||
self.callbacks = callbacks
|
||||
self.combats: list[FrozenCombat] = []
|
||||
|
||||
def begin_simulation(self) -> None:
|
||||
@@ -38,7 +40,7 @@ class AircraftSimulation:
|
||||
|
||||
# Finish updating all flights before checking for combat so that the new
|
||||
# positions are used.
|
||||
CombatInitiator(self.game, self.combats).update_active_combats()
|
||||
CombatInitiator(self.game, self.combats, self.callbacks).update_active_combats()
|
||||
|
||||
# After updating all combat states, check for halts.
|
||||
for flight in self.iter_flights():
|
||||
|
||||
Reference in New Issue
Block a user