Disallow squadrons from disabling mission types.

After this change, players will always have the final say in what
missions a squadron can be assigned to. Squadrons are not able to
influence the default auto-assignable missions either because that
property is always overridden by the campaign's air wing configuration
(the primary and secondary task properties). The `mission-types` field
of the squadron definition has been removed since it is no longer
capable of influencing anything. I haven't bothered cleaning up the now
useless data in all the existing squadrons though.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2785.
This commit is contained in:
Dan Albert
2023-04-17 19:21:10 -07:00
committed by Raffson
parent 5e2625ad21
commit 03c48376c4
6 changed files with 16 additions and 34 deletions

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
import itertools
from collections import defaultdict
from typing import Sequence, Iterator, TYPE_CHECKING, Optional
from typing import Iterator, Optional, Sequence, TYPE_CHECKING
from game.ato.closestairfields import ObjectiveDistanceCache
from game.dcs.aircrafttype import AircraftType

View File

@@ -1,8 +1,6 @@
from __future__ import annotations
import logging
from collections.abc import Iterable
from dataclasses import dataclass, field
from dataclasses import dataclass
from pathlib import Path
from typing import Optional, TYPE_CHECKING
@@ -38,7 +36,6 @@ class SquadronDef:
def capable_of(self, task: FlightType) -> bool:
"""Returns True if the squadron is capable of performing the given task.
A squadron may be capable of performing a task even if it will not be
automatically assigned to it.
"""