mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Added a new setting: "Maximum frontline length (km)"
It replaces the FRONTLINE_LENGTH constant, which was used previously. The default setting for the frontline length has been set to match the FRONTLINE_LENGTH value (80 km), but I feel the default should be a bit shorter. Discussion on the topic would be welcome.
This commit is contained in:
@@ -52,9 +52,8 @@ class CasFlightPlan(PatrollingFlightPlan[CasLayout]):
|
||||
|
||||
@property
|
||||
def engagement_distance(self) -> Distance:
|
||||
from game.missiongenerator.frontlineconflictdescription import FRONTLINE_LENGTH
|
||||
|
||||
return meters(FRONTLINE_LENGTH) / 2
|
||||
max_length = self.flight.coalition.game.settings.max_frontline_length * 1000
|
||||
return meters(max_length) / 2
|
||||
|
||||
@property
|
||||
def combat_speed_waypoints(self) -> set[FlightWaypoint]:
|
||||
@@ -79,7 +78,7 @@ class Builder(IBuilder[CasFlightPlan, CasLayout]):
|
||||
)
|
||||
|
||||
ingress, heading, distance = FrontLineConflictDescription.frontline_vector(
|
||||
location, self.theater
|
||||
location, self.theater, self.coalition.game.settings
|
||||
)
|
||||
center = ingress.point_from_heading(heading.degrees, distance / 2)
|
||||
egress = ingress.point_from_heading(heading.degrees, distance)
|
||||
|
||||
Reference in New Issue
Block a user