mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Formatting
This commit is contained in:
parent
e71ff17a23
commit
7e51061582
@ -36,7 +36,9 @@ class Builder(FormationAttackBuilder[EscortFlightPlan, FormationAttackLayout]):
|
||||
refuel = builder.refuel(self.package.waypoints.refuel)
|
||||
initial = None
|
||||
if self.package.primary_task == FlightType.STRIKE:
|
||||
initial = builder.escort_hold(self.package.waypoints.initial, Distance.from_feet(20000))
|
||||
initial = builder.escort_hold(
|
||||
self.package.waypoints.initial, Distance.from_feet(20000)
|
||||
)
|
||||
|
||||
return FormationAttackLayout(
|
||||
departure=builder.takeoff(self.flight.departure),
|
||||
|
||||
@ -193,7 +193,9 @@ class FormationAttackBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
|
||||
)
|
||||
initial = None
|
||||
if self.package.primary_task == FlightType.STRIKE:
|
||||
ingress = builder.nav(self.package.waypoints.ingress, Distance.from_feet(20000))
|
||||
ingress = builder.nav(
|
||||
self.package.waypoints.ingress, Distance.from_feet(20000)
|
||||
)
|
||||
initial = builder.ingress(
|
||||
ingress_type, self.package.waypoints.initial, self.package.target
|
||||
)
|
||||
|
||||
@ -21,7 +21,8 @@ from dcs.task import (
|
||||
RunwayAttack,
|
||||
Transport,
|
||||
SEAD,
|
||||
SwitchWaypoint, OptJettisonEmptyTanks,
|
||||
SwitchWaypoint,
|
||||
OptJettisonEmptyTanks,
|
||||
)
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
|
||||
|
||||
@ -60,11 +60,11 @@ class JoinPointBuilder(PydcsWaypointBuilder):
|
||||
waypoint.tasks.append(ecm_option)
|
||||
|
||||
def configure_escort_tasks(
|
||||
self,
|
||||
waypoint: MovingPoint,
|
||||
target_types: List[str],
|
||||
max_dist: float = 30.0,
|
||||
vertical_spacing: float = 2000.0,
|
||||
self,
|
||||
waypoint: MovingPoint,
|
||||
target_types: List[str],
|
||||
max_dist: float = 30.0,
|
||||
vertical_spacing: float = 2000.0,
|
||||
) -> None:
|
||||
|
||||
rx = (random.random() + 0.1) * 1000
|
||||
@ -84,5 +84,6 @@ class JoinPointBuilder(PydcsWaypointBuilder):
|
||||
engagement_max_dist=int(nautical_miles(max_dist).meters),
|
||||
lastwpt=lastwpt,
|
||||
targets=target_types,
|
||||
position=pos)
|
||||
position=pos,
|
||||
)
|
||||
)
|
||||
|
||||
@ -6,9 +6,7 @@ from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
class RefuelPointBuilder(PydcsWaypointBuilder):
|
||||
def add_tasks(self, waypoint: MovingPoint) -> None:
|
||||
refuel = ControlledTask(
|
||||
RefuelingTaskAction()
|
||||
)
|
||||
refuel = ControlledTask(RefuelingTaskAction())
|
||||
refuel.start_probability(10)
|
||||
waypoint.add_task(refuel)
|
||||
return super().add_tasks(waypoint)
|
||||
|
||||
@ -22,6 +22,7 @@ class SplitPointBuilder(PydcsWaypointBuilder):
|
||||
waypoint.speed = mach(0.85, Distance.from_feet(20000)).meters_per_second
|
||||
waypoint.ETA_locked = False
|
||||
if self.flight is self.package.primary_flight:
|
||||
script_code = f"trigger.action.setUserFlag(\"split-{id(self.package)}\", true)"
|
||||
script = RunScript(script_code)
|
||||
script = RunScript(
|
||||
f'trigger.action.setUserFlag("split-{id(self.package)}", true)'
|
||||
)
|
||||
waypoint.tasks.append(script)
|
||||
@ -91,7 +91,6 @@ class MissionInfoGenerator:
|
||||
if len(flight.client_units) > 0:
|
||||
self.player_flights.append(flight)
|
||||
|
||||
|
||||
def add_jtac(self, jtac: JtacInfo) -> None:
|
||||
"""Adds a JTAC to the mission.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user