Cleanup after cherry-picking...

This commit is contained in:
Raffson
2023-05-14 21:34:28 +02:00
parent f9e9c2793a
commit 785beffee0
8 changed files with 10 additions and 6 deletions

View File

@@ -299,7 +299,6 @@ class Flight(SidcDescribable, RadioFrequencyContainer, TacanContainer):
def clone_flight(flight: Flight) -> Flight:
return Flight(
flight.package,
flight.country,
flight.squadron,
flight.count,
flight.flight_type,

View File

@@ -41,7 +41,7 @@ class FactionLoader:
try:
with f.open("r", encoding="utf-8") as 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))
except Exception:
logging.exception(f"Unable to load faction : {f}")

View File

@@ -75,8 +75,10 @@ class ConvoyGenerator:
unit_types = list(units.items())
main_unit_type, main_unit_count = unit_types[0]
faction = self.game.coalition_for(for_player).faction
group = self.mission.vehicle_group(
self.game.coalition_for(for_player).faction.country,
faction.country,
name,
main_unit_type.dcs_unit_type,
position=position,

View File

@@ -251,7 +251,6 @@ class Settings:
CAMPAIGN_MANAGEMENT_PAGE,
PILOTS_AND_SQUADRONS_SECTION,
default=False,
remember_player_choice=True,
detail="If set, squadrons will be limited to a maximum number of aircraft.",
)

View File

@@ -180,3 +180,5 @@ VERSION = _build_version_string()
#: * Support for defining squadron sizes.
#: * 'ground_forces' in yaml file to specify preset groups for TGOs,
#: given the group is available for the faction and the task matches
CAMPAIGN_FORMAT_VERSION = (10, 6)