refactor of previous commits

refactor to enum

typing and many other fixes

fix tests

attempt to fix some typescript

more typescript fixes

more typescript test fixes

revert all API changes

update to pydcs

mypy fixes

Use properties to check if player is blue/red/neutral

update requirements.txt

black -_-

bump pydcs and fix mypy

add opponent property

bump pydcs
This commit is contained in:
Eclipse/Druss99
2025-01-17 17:02:07 -05:00
committed by Raffson
parent 362ce66f80
commit 31c80dfd02
78 changed files with 739 additions and 350 deletions

View File

@@ -24,7 +24,7 @@ from game.radio.tacan import TacanChannel
from game.server import EventStream
from game.sim.gameupdateevents import GameUpdateEvents
from game.squadrons.squadron import Pilot, Squadron
from game.theater import NavalControlPoint
from game.theater import NavalControlPoint, Player
from game.theater.missiontarget import MissionTarget
from game.transfers import PendingTransfers, TransferOrder
from qt_ui.simcontroller import SimController
@@ -564,8 +564,8 @@ class GameModel:
self.allocated_icls: list[int] = list()
self.init_comms_registry()
def ato_model_for(self, player: bool) -> AtoModel:
if player:
def ato_model_for(self, player: Player) -> AtoModel:
if player.is_blue:
return self.ato_model
return self.red_ato_model