mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix type errors with Flight.start_type in the UI.
Also reorders the enum so that iteration shows the order we want in the UI by default. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1672
This commit is contained in:
@@ -9,7 +9,7 @@ class StartType(Enum):
|
||||
IN_FLIGHT.
|
||||
"""
|
||||
|
||||
IN_FLIGHT = "In Flight"
|
||||
RUNWAY = "Runway"
|
||||
COLD = "Cold"
|
||||
WARM = "Warm"
|
||||
RUNWAY = "Runway"
|
||||
IN_FLIGHT = "In Flight"
|
||||
|
||||
@@ -56,6 +56,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from game.ato.starttype import StartType
|
||||
from game.commander.tasks.compound.nextaction import PlanNextAction
|
||||
from game.commander.tasks.theatercommandertask import TheaterCommanderTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
@@ -70,7 +71,7 @@ class TheaterCommander(Planner[TheaterState, TheaterCommanderTask]):
|
||||
def __init__(self, game: Game, player: bool) -> None:
|
||||
super().__init__(
|
||||
PlanNextAction(
|
||||
aircraft_cold_start=game.settings.default_start_type == "Cold"
|
||||
aircraft_cold_start=game.settings.default_start_type is StartType.COLD
|
||||
)
|
||||
)
|
||||
self.game = game
|
||||
|
||||
Reference in New Issue
Block a user