mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Rename frontline vector to bounds, add a class.
This isn't actually the data that callers usually want. Most of the callers just want the bounds. The heading and length are trivially computed from that. Add a class to contain the result so it's easier to refactor.
This commit is contained in:
@@ -77,11 +77,16 @@ class Builder(IBuilder[CasFlightPlan, CasLayout]):
|
||||
FrontLineConflictDescription,
|
||||
)
|
||||
|
||||
ingress, heading, distance = FrontLineConflictDescription.frontline_vector(
|
||||
bounds = FrontLineConflictDescription.frontline_bounds(
|
||||
location, self.theater, self.coalition.game.settings
|
||||
)
|
||||
center = ingress.point_from_heading(heading.degrees, distance / 2)
|
||||
egress = ingress.point_from_heading(heading.degrees, distance)
|
||||
ingress = bounds.left_position
|
||||
center = ingress.point_from_heading(
|
||||
bounds.heading_from_left_to_right.degrees, bounds.length / 2
|
||||
)
|
||||
egress = ingress.point_from_heading(
|
||||
bounds.heading_from_left_to_right.degrees, bounds.length
|
||||
)
|
||||
|
||||
ingress_distance = ingress.distance_to_point(self.flight.departure.position)
|
||||
egress_distance = egress.distance_to_point(self.flight.departure.position)
|
||||
|
||||
Reference in New Issue
Block a user