mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
There are some TODOs here but th behavior is flagged off by default. The biggest TODO here is that the time spent frozen is not simulated, so flights that are engaged by SAMs will unfreeze, move slightly, then re- freeze. https://github.com/dcs-liberation/dcs_liberation/issues/1680
24 lines
770 B
Python
24 lines
770 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import TYPE_CHECKING
|
|
|
|
from game.unitmap import FlyingUnit
|
|
|
|
if TYPE_CHECKING:
|
|
from game.ato import Flight
|
|
from game.squadrons import Pilot
|
|
|
|
|
|
# TODO: Serialize for bug reproducibility.
|
|
# Any bugs filed that can only be reproduced with auto-resolved combat results will not
|
|
# be reproducible since we cannot replay the auto-resolution that the player saw. We
|
|
# need to be able to serialize this data so bug repro can include the auto-resolved
|
|
# results.
|
|
@dataclass
|
|
class SimulationResults:
|
|
air_losses: list[FlyingUnit] = field(default_factory=list)
|
|
|
|
def kill_pilot(self, flight: Flight, pilot: Pilot) -> None:
|
|
self.air_losses.append(FlyingUnit(flight, pilot))
|