mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add (very!) rough simulation of frozen combat.
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
This commit is contained in:
23
game/sim/simulationresults.py
Normal file
23
game/sim/simulationresults.py
Normal file
@@ -0,0 +1,23 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user