mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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:
@@ -35,6 +35,7 @@ if TYPE_CHECKING:
|
||||
from game.sim.gameupdateevents import GameUpdateEvents
|
||||
from game.sim.simulationresults import SimulationResults
|
||||
from game.squadrons import Squadron, Pilot
|
||||
from game.theater.player import Player
|
||||
from game.transfers import TransferOrder
|
||||
from game.data.weapons import WeaponType
|
||||
from .flightmember import FlightMember
|
||||
@@ -174,7 +175,7 @@ class Flight(
|
||||
self.roster = FlightMembers.from_roster(self, self.roster)
|
||||
|
||||
@property
|
||||
def blue(self) -> bool:
|
||||
def blue(self) -> Player:
|
||||
return self.squadron.player
|
||||
|
||||
@property
|
||||
|
||||
@@ -11,7 +11,7 @@ from ..packagewaypoints import PackageWaypoints
|
||||
if TYPE_CHECKING:
|
||||
from game.coalition import Coalition
|
||||
from game.data.doctrine import Doctrine
|
||||
from game.theater import ConflictTheater
|
||||
from game.theater import ConflictTheater, Player
|
||||
from game.threatzones import ThreatZones
|
||||
from ..flight import Flight
|
||||
from ..package import Package
|
||||
@@ -71,7 +71,7 @@ class IBuilder(ABC, Generic[FlightPlanT, LayoutT]):
|
||||
return self.flight.coalition
|
||||
|
||||
@property
|
||||
def is_player(self) -> bool:
|
||||
def is_player(self) -> Player:
|
||||
return self.coalition.player
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user