mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Remove dead code.
This commit is contained in:
parent
2ae820fb20
commit
95836a217c
@ -1,26 +0,0 @@
|
|||||||
from PySide2.QtCore import Property, QObject, Signal
|
|
||||||
|
|
||||||
from game.server.leaflet import LeafletPoly, ShapelyUtil
|
|
||||||
from game.sim.combat.aircombat import AirCombat
|
|
||||||
from game.theater import ConflictTheater
|
|
||||||
|
|
||||||
|
|
||||||
class AirCombatJs(QObject):
|
|
||||||
footprintChanged = Signal()
|
|
||||||
|
|
||||||
def __init__(self, combat: AirCombat, theater: ConflictTheater) -> None:
|
|
||||||
super().__init__()
|
|
||||||
self.combat = combat
|
|
||||||
self.theater = theater
|
|
||||||
self._footprint = self._make_footprint()
|
|
||||||
|
|
||||||
@Property(type=list, notify=footprintChanged)
|
|
||||||
def footprint(self) -> list[LeafletPoly]:
|
|
||||||
return self._footprint
|
|
||||||
|
|
||||||
def refresh(self) -> None:
|
|
||||||
self._footprint = self._make_footprint()
|
|
||||||
self.footprintChanged.emit()
|
|
||||||
|
|
||||||
def _make_footprint(self) -> list[LeafletPoly]:
|
|
||||||
return ShapelyUtil.polys_to_leaflet(self.combat.footprint, self.theater)
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
from PySide2.QtCore import Property, QObject, Signal
|
|
||||||
|
|
||||||
from game.sim.combat.atip import AtIp
|
|
||||||
from qt_ui.models import GameModel
|
|
||||||
from .flightjs import FlightJs
|
|
||||||
|
|
||||||
|
|
||||||
class IpCombatJs(QObject):
|
|
||||||
flightChanged = Signal()
|
|
||||||
|
|
||||||
def __init__(self, combat: AtIp, game_model: GameModel) -> None:
|
|
||||||
super().__init__()
|
|
||||||
assert game_model.game is not None
|
|
||||||
self.combat = combat
|
|
||||||
self.theater = game_model.game.theater
|
|
||||||
self._flight = FlightJs(
|
|
||||||
combat.flight,
|
|
||||||
selected=False,
|
|
||||||
ato_model=game_model.ato_model_for(combat.flight.squadron.player),
|
|
||||||
)
|
|
||||||
|
|
||||||
@Property(FlightJs, notify=flightChanged)
|
|
||||||
def flight(self) -> FlightJs:
|
|
||||||
return self._flight
|
|
||||||
|
|
||||||
def refresh(self) -> None:
|
|
||||||
pass
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
from PySide2.QtCore import Property, QObject, Signal
|
|
||||||
|
|
||||||
from game.sim.combat.defendingsam import DefendingSam
|
|
||||||
from qt_ui.models import GameModel
|
|
||||||
from .flightjs import FlightJs
|
|
||||||
from .groundobjectjs import GroundObjectJs
|
|
||||||
|
|
||||||
|
|
||||||
class SamCombatJs(QObject):
|
|
||||||
flightChanged = Signal()
|
|
||||||
airDefensesChanged = Signal()
|
|
||||||
|
|
||||||
def __init__(self, combat: DefendingSam, game_model: GameModel) -> None:
|
|
||||||
super().__init__()
|
|
||||||
assert game_model.game is not None
|
|
||||||
self.combat = combat
|
|
||||||
self._flight = FlightJs(
|
|
||||||
combat.flight,
|
|
||||||
selected=False,
|
|
||||||
ato_model=game_model.ato_model_for(combat.flight.squadron.player),
|
|
||||||
)
|
|
||||||
self._air_defenses = [
|
|
||||||
GroundObjectJs(tgo, game_model.game) for tgo in self.combat.air_defenses
|
|
||||||
]
|
|
||||||
|
|
||||||
@Property(FlightJs, notify=flightChanged)
|
|
||||||
def flight(self) -> FlightJs:
|
|
||||||
return self._flight
|
|
||||||
|
|
||||||
@Property(list, notify=airDefensesChanged)
|
|
||||||
def airDefenses(self) -> list[GroundObjectJs]:
|
|
||||||
return self._air_defenses
|
|
||||||
|
|
||||||
def refresh(self) -> None:
|
|
||||||
pass
|
|
||||||
Loading…
x
Reference in New Issue
Block a user