mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Store the owning coalition in ControlPoint.
This is needed fairly often, and we have a lot of Game being passed around to ControlPoint methods specifically to support this. Just store the owning Coalition directly in the ControlPoint to clean up. I haven't cleaned up *every* API here, but did that aircraft allocations as an example.
This commit is contained in:
@@ -157,10 +157,7 @@ class ObjectiveFinder:
|
||||
for control_point in self.enemy_control_points():
|
||||
if not isinstance(control_point, Airfield):
|
||||
continue
|
||||
if (
|
||||
control_point.allocated_aircraft(self.game).total_present
|
||||
>= min_aircraft
|
||||
):
|
||||
if control_point.allocated_aircraft().total_present >= min_aircraft:
|
||||
airfields.append(control_point)
|
||||
return self._targets_by_range(airfields)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user