mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
AI Strike flight will bomb all their targets correctly
This commit is contained in:
@@ -46,8 +46,9 @@ INTERCEPT_MAX_DISTANCE = 200000
|
||||
class AircraftConflictGenerator:
|
||||
escort_targets = [] # type: typing.List[typing.Tuple[FlyingGroup, int]]
|
||||
|
||||
def __init__(self, mission: Mission, conflict: Conflict, settings: Settings):
|
||||
def __init__(self, mission: Mission, conflict: Conflict, settings: Settings, game):
|
||||
self.m = mission
|
||||
self.game = game
|
||||
self.settings = settings
|
||||
self.conflict = conflict
|
||||
self.escort_targets = []
|
||||
@@ -457,7 +458,12 @@ class AircraftConflictGenerator:
|
||||
for point in flight.points:
|
||||
group.add_waypoint(Point(point.x,point.y), point.alt)
|
||||
for t in point.targets:
|
||||
group.points[i].tasks.append(Bombing(t.position))
|
||||
if hasattr(t, "obj_name"):
|
||||
buildings = self.game.theater.find_ground_objects_by_obj_name(t.obj_name)
|
||||
for building in buildings:
|
||||
group.points[i].tasks.append(Bombing(building.position))
|
||||
else:
|
||||
group.points[i].tasks.append(Bombing(t.position))
|
||||
i = i + 1
|
||||
|
||||
|
||||
|
||||
@@ -57,11 +57,7 @@ class BriefingGenerator:
|
||||
self.description += "-"*50 + "\n"
|
||||
|
||||
for planner in self.game.planners.values():
|
||||
for flight in planner.cap_flights:
|
||||
self.add_flight_description(flight)
|
||||
for flight in planner.cas_flights:
|
||||
self.add_flight_description(flight)
|
||||
for flight in planner.sead_flights:
|
||||
for flight in planner.flights:
|
||||
self.add_flight_description(flight)
|
||||
|
||||
if self.freqs:
|
||||
@@ -82,7 +78,6 @@ class BriefingGenerator:
|
||||
self.description += "X"
|
||||
self.description += " " + str(cp.tacanI) + "\n"
|
||||
|
||||
|
||||
self.m.set_description_text(self.description)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user