mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Cleanup after cherry-picking...
This commit is contained in:
parent
f9e9c2793a
commit
785beffee0
@ -299,7 +299,6 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
|
|||||||
def clone_flight(flight: Flight) -> Flight:
|
def clone_flight(flight: Flight) -> Flight:
|
||||||
return Flight(
|
return Flight(
|
||||||
flight.package,
|
flight.package,
|
||||||
flight.country,
|
|
||||||
flight.squadron,
|
flight.squadron,
|
||||||
flight.count,
|
flight.count,
|
||||||
flight.flight_type,
|
flight.flight_type,
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class FactionLoader:
|
|||||||
try:
|
try:
|
||||||
with f.open("r", encoding="utf-8") as fdata:
|
with f.open("r", encoding="utf-8") as fdata:
|
||||||
data = json.load(fdata)
|
data = json.load(fdata)
|
||||||
factions[data["name"]] = Faction.from_json(data)
|
factions[data["name"]] = Faction.from_dict(data)
|
||||||
logging.info("Loaded faction : " + str(f))
|
logging.info("Loaded faction : " + str(f))
|
||||||
except Exception:
|
except Exception:
|
||||||
logging.exception(f"Unable to load faction : {f}")
|
logging.exception(f"Unable to load faction : {f}")
|
||||||
|
|||||||
@ -75,8 +75,10 @@ class ConvoyGenerator:
|
|||||||
unit_types = list(units.items())
|
unit_types = list(units.items())
|
||||||
main_unit_type, main_unit_count = unit_types[0]
|
main_unit_type, main_unit_count = unit_types[0]
|
||||||
|
|
||||||
|
faction = self.game.coalition_for(for_player).faction
|
||||||
|
|
||||||
group = self.mission.vehicle_group(
|
group = self.mission.vehicle_group(
|
||||||
self.game.coalition_for(for_player).faction.country,
|
faction.country,
|
||||||
name,
|
name,
|
||||||
main_unit_type.dcs_unit_type,
|
main_unit_type.dcs_unit_type,
|
||||||
position=position,
|
position=position,
|
||||||
|
|||||||
@ -251,7 +251,6 @@ class Settings:
|
|||||||
CAMPAIGN_MANAGEMENT_PAGE,
|
CAMPAIGN_MANAGEMENT_PAGE,
|
||||||
PILOTS_AND_SQUADRONS_SECTION,
|
PILOTS_AND_SQUADRONS_SECTION,
|
||||||
default=False,
|
default=False,
|
||||||
remember_player_choice=True,
|
|
||||||
detail="If set, squadrons will be limited to a maximum number of aircraft.",
|
detail="If set, squadrons will be limited to a maximum number of aircraft.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -180,3 +180,5 @@ VERSION = _build_version_string()
|
|||||||
#: * Support for defining squadron sizes.
|
#: * Support for defining squadron sizes.
|
||||||
#: * 'ground_forces' in yaml file to specify preset groups for TGOs,
|
#: * 'ground_forces' in yaml file to specify preset groups for TGOs,
|
||||||
#: given the group is available for the faction and the task matches
|
#: given the group is available for the faction and the task matches
|
||||||
|
|
||||||
|
CAMPAIGN_FORMAT_VERSION = (10, 6)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide6.QtWidgets import QComboBox
|
from PySide2.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.ato import FlightType
|
from game.ato import FlightType
|
||||||
from game.dcs.aircrafttype import AircraftType
|
from game.dcs.aircrafttype import AircraftType
|
||||||
|
|||||||
@ -169,6 +169,7 @@ class SquadronLiverySelector(QComboBox):
|
|||||||
self.addItem("No available liveries (using DCS default)")
|
self.addItem("No available liveries (using DCS default)")
|
||||||
self.setEnabled(False)
|
self.setEnabled(False)
|
||||||
|
|
||||||
|
|
||||||
class SquadronSizeSpinner(QSpinBox):
|
class SquadronSizeSpinner(QSpinBox):
|
||||||
def __init__(self, starting_size: int, parent: QWidget | None) -> None:
|
def __init__(self, starting_size: int, parent: QWidget | None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import pytest
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from dcs.mapping import Point
|
from dcs.mapping import Point
|
||||||
from dcs.terrain import Terrain
|
|
||||||
from game.ato.flighttype import FlightType
|
from game.ato.flighttype import FlightType
|
||||||
from game.theater.presetlocation import PresetLocation
|
from game.theater.presetlocation import PresetLocation
|
||||||
from game.theater.theatergroundobject import (
|
from game.theater.theatergroundobject import (
|
||||||
@ -21,6 +20,7 @@ from game.theater.controlpoint import OffMapSpawn
|
|||||||
from game.utils import Heading
|
from game.utils import Heading
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
def test_mission_types_friendly(mocker: Any) -> None:
|
def test_mission_types_friendly(mocker: Any) -> None:
|
||||||
"""
|
"""
|
||||||
Test the mission types that can be planned against friendly Theater Ground Objects
|
Test the mission types that can be planned against friendly Theater Ground Objects
|
||||||
@ -68,6 +68,7 @@ def test_mission_types_friendly(mocker: Any) -> None:
|
|||||||
assert mission_types == [FlightType.BARCAP]
|
assert mission_types == [FlightType.BARCAP]
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
def test_mission_types_enemy(mocker: Any) -> None:
|
def test_mission_types_enemy(mocker: Any) -> None:
|
||||||
"""
|
"""
|
||||||
Test the mission types that can be planned against enemy Theater Ground Objects
|
Test the mission types that can be planned against enemy Theater Ground Objects
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user