mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Formatting + typing
This commit is contained in:
parent
b318bc4941
commit
e018ef7f11
@ -22,7 +22,9 @@ from dcs.task import (
|
|||||||
Transport,
|
Transport,
|
||||||
SEAD,
|
SEAD,
|
||||||
SwitchWaypoint,
|
SwitchWaypoint,
|
||||||
OptJettisonEmptyTanks, MainTask, PinpointStrike,
|
OptJettisonEmptyTanks,
|
||||||
|
MainTask,
|
||||||
|
PinpointStrike,
|
||||||
)
|
)
|
||||||
from dcs.unitgroup import FlyingGroup
|
from dcs.unitgroup import FlyingGroup
|
||||||
|
|
||||||
@ -344,10 +346,10 @@ class AircraftBehavior:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def configure_task(
|
def configure_task(
|
||||||
flight: Flight,
|
flight: Flight,
|
||||||
group: FlyingGroup[Any],
|
group: FlyingGroup[Any],
|
||||||
preferred_task: Type[MainTask],
|
preferred_task: Type[MainTask],
|
||||||
fallback_task: Optional[Type[MainTask]] = None
|
fallback_task: Optional[Type[MainTask]] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
# Not all aircraft are always compatible with the preferred task,
|
# Not all aircraft are always compatible with the preferred task,
|
||||||
# so a common fallback is to use CAS instead.
|
# so a common fallback is to use CAS instead.
|
||||||
|
|||||||
@ -27,7 +27,9 @@ class AntiShipIngressBuilder(PydcsWaypointBuilder):
|
|||||||
for group_name in group_names:
|
for group_name in group_names:
|
||||||
miz_group = self.mission.find_group(group_name)
|
miz_group = self.mission.find_group(group_name)
|
||||||
if miz_group is None:
|
if miz_group is None:
|
||||||
logging.error("Could not find group for Anti-Ship mission %s", group_name)
|
logging.error(
|
||||||
|
"Could not find group for Anti-Ship mission %s", group_name
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
task = AttackGroup(miz_group.id, weapon_type=WeaponType.Auto)
|
task = AttackGroup(miz_group.id, weapon_type=WeaponType.Auto)
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import copy
|
import copy
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from dcs import Point
|
from dcs import Point
|
||||||
from dcs.planes import B_17G, B_52H, Tu_22M3, B_1B
|
from dcs.planes import B_17G, B_52H, Tu_22M3, B_1B
|
||||||
@ -34,6 +35,7 @@ class StrikeIngressBuilder(PydcsWaypointBuilder):
|
|||||||
for t in targets:
|
for t in targets:
|
||||||
avg_spacing += center.distance_to_point(t.position)
|
avg_spacing += center.distance_to_point(t.position)
|
||||||
avg_spacing /= len(targets)
|
avg_spacing /= len(targets)
|
||||||
|
bombing: Union[CarpetBombing, Bombing]
|
||||||
if self.group.task == "Ground Attack":
|
if self.group.task == "Ground Attack":
|
||||||
bombing = CarpetBombing(
|
bombing = CarpetBombing(
|
||||||
center,
|
center,
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class NewGameWizard(QtWidgets.QWizard):
|
|||||||
no_player_navy=self.field("no_player_navy"),
|
no_player_navy=self.field("no_player_navy"),
|
||||||
no_enemy_navy=self.field("no_enemy_navy"),
|
no_enemy_navy=self.field("no_enemy_navy"),
|
||||||
tgo_config=campaign.load_ground_forces_config(),
|
tgo_config=campaign.load_ground_forces_config(),
|
||||||
squadrons_start_full=self.field("squadrons_start_full")
|
squadrons_start_full=self.field("squadrons_start_full"),
|
||||||
)
|
)
|
||||||
mod_settings = ModSettings(
|
mod_settings = ModSettings(
|
||||||
a4_skyhawk=self.field("a4_skyhawk"),
|
a4_skyhawk=self.field("a4_skyhawk"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user