mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Use exact name matching when picking targets.
Inexact name matching targets the first group that partially matches the given group name. aa|71 will match aa|7. The inexact match that was here was only needed for an early attempt to use skynet where group names were not used consistently. That's no longer a problem so we don't need this workaround. Fixes https://github.com/Khopa/dcs_liberation/issues/676
This commit is contained in:
@@ -1478,10 +1478,7 @@ class BaiIngressBuilder(PydcsWaypointBuilder):
|
||||
|
||||
target_group = self.package.target
|
||||
if isinstance(target_group, TheaterGroundObject):
|
||||
# Match search is used due to TheaterGroundObject.name not matching
|
||||
# the Mission group name because of SkyNet prefixes.
|
||||
tgroup = self.mission.find_group(target_group.group_name,
|
||||
search="match")
|
||||
tgroup = self.mission.find_group(target_group.group_name)
|
||||
if tgroup is not None:
|
||||
task = AttackGroup(tgroup.id, weapon_type=WeaponType.Auto)
|
||||
task.params["attackQtyLimit"] = False
|
||||
@@ -1531,10 +1528,7 @@ class DeadIngressBuilder(PydcsWaypointBuilder):
|
||||
|
||||
target_group = self.package.target
|
||||
if isinstance(target_group, TheaterGroundObject):
|
||||
# Match search is used due to TheaterGroundObject.name not matching
|
||||
# the Mission group name because of SkyNet prefixes.
|
||||
tgroup = self.mission.find_group(target_group.group_name,
|
||||
search="match")
|
||||
tgroup = self.mission.find_group(target_group.group_name)
|
||||
if tgroup is not None:
|
||||
task = AttackGroup(tgroup.id, weapon_type=WeaponType.Guided)
|
||||
task.params["expend"] = "All"
|
||||
@@ -1597,10 +1591,7 @@ class SeadIngressBuilder(PydcsWaypointBuilder):
|
||||
|
||||
target_group = self.package.target
|
||||
if isinstance(target_group, TheaterGroundObject):
|
||||
# Match search is used due to TheaterGroundObject.name not matching
|
||||
# the Mission group name because of SkyNet prefixes.
|
||||
tgroup = self.mission.find_group(target_group.group_name,
|
||||
search="match")
|
||||
tgroup = self.mission.find_group(target_group.group_name)
|
||||
if tgroup is not None:
|
||||
waypoint.add_task(EngageTargetsInZone(
|
||||
position=tgroup.position,
|
||||
|
||||
Reference in New Issue
Block a user