Skip to content

Commit

Permalink
Clarify AirAssault flight plan method name.
Browse files Browse the repository at this point in the history
`engagement_distance` is used elsewhere to mean commit distance, so this
looked like a bug when I stumbled across it. Rename it to be more
explicit.
  • Loading branch information
DanAlbert committed Nov 19, 2022
1 parent 541ac6f commit 38f4b27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions game/ato/flightplans/airassault.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ def depart_time_for_waypoint(self, waypoint: FlightWaypoint) -> timedelta | None
return None

@property
def engagement_distance(self) -> Distance:
# The radius of the WaypointZone created at the target location
def ctld_target_zone_radius(self) -> Distance:
return meters(2500)

@property
Expand Down
7 changes: 4 additions & 3 deletions game/missiongenerator/logisticsgenerator.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from typing import Any, Optional

from dcs import Mission
from dcs.unitgroup import FlyingGroup
from dcs.statics import Fortification
from dcs.unitgroup import FlyingGroup

from game.ato import Flight
from game.ato.flightplans.airassault import AirAssaultFlightPlan
from game.ato.flightwaypointtype import FlightWaypointType
from game.missiongenerator.missiondata import CargoInfo, LogisticsInfo
from game.settings.settings import Settings
from game.transfers import TransferOrder


ZONE_RADIUS = 300
CRATE_ZONE_RADIUS = 50

Expand Down Expand Up @@ -45,7 +46,7 @@ def generate_logistics(self) -> LogisticsInfo:
target_zone = f"{self.group.name}TARGET_ZONE"
self.mission.triggers.add_triggerzone(
self.flight.flight_plan.layout.target.position,
self.flight.flight_plan.engagement_distance.meters,
self.flight.flight_plan.ctld_target_zone_radius.meters,
False,
target_zone,
)
Expand Down

0 comments on commit 38f4b27

Please sign in to comment.