diff --git a/gen/aircraft.py b/gen/aircraft.py index f7d8422c..898190cf 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -455,15 +455,18 @@ class AircraftConflictGenerator: group.points[0].tasks.append(OptRestrictJettison(True)) i = 1 + bombing_point_found = False for point in flight.points: group.add_waypoint(Point(point.x,point.y), point.alt) - for t in point.targets: - 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)) + if not bombing_point_found: + for t in point.targets: + 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)) + bombing_point_found = True i = i + 1 diff --git a/gen/flights/ai_flight_planner.py b/gen/flights/ai_flight_planner.py index 72b87469..a7fce6d9 100644 --- a/gen/flights/ai_flight_planner.py +++ b/gen/flights/ai_flight_planner.py @@ -333,7 +333,7 @@ class FlightPlanner: point = FlightWaypoint(u.position.x, u.position.y, 0) point.description = "STRIKE " + "[" + str(location.obj_name) + "] : " + u.type + " #" + str(j) point.pretty_name = "STRIKE " + "[" + str(location.obj_name) + "] : " + u.type + " #" + str(j) - point.targets.append(location) + ingress_point.targets.append(location) flight.points.append(point) else: point = FlightWaypoint(location.position.x, location.position.y, 0) diff --git a/qt_ui/widgets/QPredefinedWaypointSelectionComboBox.py b/qt_ui/widgets/QPredefinedWaypointSelectionComboBox.py index e1093e65..2ee5ba33 100644 --- a/qt_ui/widgets/QPredefinedWaypointSelectionComboBox.py +++ b/qt_ui/widgets/QPredefinedWaypointSelectionComboBox.py @@ -105,6 +105,7 @@ class QPredefinedWaypointSelectionComboBox(QComboBox): wpt.name = wpt.name = "[" + str(ground_object.obj_name) + "] : " + ground_object.category + " #" + str(ground_object.object_id) wpt.pretty_name = wpt.name wpt.obj_name = ground_object.obj_name + wpt.targets.append(ground_object) if cp.captured: wpt.description = "Friendly Building" else: @@ -120,6 +121,7 @@ class QPredefinedWaypointSelectionComboBox(QComboBox): wpt = FlightWaypoint(u.position.x, u.position.y, 0) wpt.name = wpt.name = "[" + str(ground_object.obj_name) + "] : " + u.type + " #" + str(j) wpt.pretty_name = wpt.name + wpt.targets.append(u) wpt.obj_name = ground_object.obj_name if cp.captured: wpt.description = "Friendly unit : " + u.type diff --git a/theater/start_generator.py b/theater/start_generator.py index 7ebaf876..076a60e4 100644 --- a/theater/start_generator.py +++ b/theater/start_generator.py @@ -262,22 +262,22 @@ def generate_cp_ground_points(cp: ControlPoint, theater, game, group_id, templat g.group_id = group_id g.object_id = object_id g.cp_id = cp.id - g.airbase_gorup = False + g.airbase_group = False g.obj_name = obj_name g.dcs_identifier = object["type"] g.heading = object["heading"] g.position = Point(point.x + object["offset"].x, point.y + object["offset"].y) - if g.dcs_identifier == "AA": - if cp.captured: - faction = game.player_name - else: - faction = game.enemy_name - g.groups = [] - group = generate_anti_air_group(game, cp, g, faction) - if group is not None: - g.groups.append(group) + #if g.dcs_identifier == "AA": + # if cp.captured: + # faction = game.player_name + # else: + # faction = game.enemy_name + # g.groups = [] + # group = generate_anti_air_group(game, cp, g, faction) + # if group is not None: + # g.groups.append(group) cp.ground_objects.append(g) return group_id