mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
strike operations fixes
This commit is contained in:
parent
61a237d1ae
commit
40bfb6fa88
@ -354,6 +354,7 @@ PLANE_PAYLOAD_OVERRIDES = {
|
|||||||
|
|
||||||
A_10C: {
|
A_10C: {
|
||||||
CAS: "AGM-65D*2,AGM-65H*2,GBU-12*2,GBU-38*2,AIM-9*2,TGP,ECM,MK151*7",
|
CAS: "AGM-65D*2,AGM-65H*2,GBU-12*2,GBU-38*2,AIM-9*2,TGP,ECM,MK151*7",
|
||||||
|
GroundAttack: "AGM-65K*2,GBU-12*8,AIM-9M*2.ECM,TGP",
|
||||||
},
|
},
|
||||||
|
|
||||||
Ka_50: {
|
Ka_50: {
|
||||||
|
|||||||
@ -84,11 +84,15 @@ class AircraftConflictGenerator:
|
|||||||
override_loadout = db.PLANE_PAYLOAD_OVERRIDES[unit_type]
|
override_loadout = db.PLANE_PAYLOAD_OVERRIDES[unit_type]
|
||||||
if type(override_loadout) == dict:
|
if type(override_loadout) == dict:
|
||||||
if for_task in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
|
if for_task in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
|
||||||
group.load_loadout(db.PLANE_PAYLOAD_OVERRIDES[unit_type][for_task])
|
payload_name = db.PLANE_PAYLOAD_OVERRIDES[unit_type][for_task]
|
||||||
|
group.load_loadout(payload_name)
|
||||||
did_load_loadout = True
|
did_load_loadout = True
|
||||||
|
logging.info("Loaded overridden payload for {} - {} for task {}".format(unit_type, payload_name, for_task))
|
||||||
elif "*" in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
|
elif "*" in db.PLANE_PAYLOAD_OVERRIDES[unit_type]:
|
||||||
group.load_loadout(db.PLANE_PAYLOAD_OVERRIDES[unit_type]["*"])
|
payload_name = db.PLANE_PAYLOAD_OVERRIDES[unit_type]["*"]
|
||||||
|
group.load_loadout(payload_name)
|
||||||
did_load_loadout = True
|
did_load_loadout = True
|
||||||
|
logging.info("Loaded overridden payload for {} - {} for task {}".format(unit_type, payload_name, for_task))
|
||||||
elif issubclass(override_loadout, MainTask):
|
elif issubclass(override_loadout, MainTask):
|
||||||
group.load_task_default_loadout(override_loadout)
|
group.load_task_default_loadout(override_loadout)
|
||||||
did_load_loadout = True
|
did_load_loadout = True
|
||||||
@ -275,12 +279,12 @@ class AircraftConflictGenerator:
|
|||||||
escort_until_waypoint = None
|
escort_until_waypoint = None
|
||||||
|
|
||||||
for name, pos in targets:
|
for name, pos in targets:
|
||||||
waypoint = group.add_waypoint(pos, WARM_START_ALTITUDE, WARM_START_AIRSPEED, self.m.translation.create_string(name))
|
waypoint = group.add_waypoint(pos, 0, WARM_START_AIRSPEED, self.m.translation.create_string(name))
|
||||||
if escort_until_waypoint is None:
|
if escort_until_waypoint is None:
|
||||||
escort_until_waypoint = waypoint
|
escort_until_waypoint = waypoint
|
||||||
|
|
||||||
group.task = CAS.name
|
group.task = GroundAttack.name
|
||||||
self._setup_group(group, CAS, client_count)
|
self._setup_group(group, GroundAttack, client_count)
|
||||||
self.escort_targets.append((group, group.points.index(escort_until_waypoint)))
|
self.escort_targets.append((group, group.points.index(escort_until_waypoint)))
|
||||||
self._rtb_for(group, self.conflict.from_cp, at)
|
self._rtb_for(group, self.conflict.from_cp, at)
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit fae126689132d643d317252adfb03184042a0ded
|
Subproject commit fce769c41d1db9a48d5c264101750510a9db1fcc
|
||||||
@ -39,9 +39,9 @@ class EventResultsMenu(Menu):
|
|||||||
|
|
||||||
if not self.finished:
|
if not self.finished:
|
||||||
|
|
||||||
header("You are clear for takeoff !")
|
header("You are clear for takeoff!")
|
||||||
|
|
||||||
label("In DCS, open and play the mission :")
|
label("In DCS, open and play the mission:")
|
||||||
label("liberation_nextturn", "italic")
|
label("liberation_nextturn", "italic")
|
||||||
label("or")
|
label("or")
|
||||||
label("liberation_nextturn_quick", "italic")
|
label("liberation_nextturn_quick", "italic")
|
||||||
@ -78,7 +78,6 @@ class EventResultsMenu(Menu):
|
|||||||
header("Operation failed", "title-red")
|
header("Operation failed", "title-red")
|
||||||
|
|
||||||
header("Player losses")
|
header("Player losses")
|
||||||
|
|
||||||
for unit_type, count in self.player_losses.items():
|
for unit_type, count in self.player_losses.items():
|
||||||
Label(self.frame, text=db.unit_type_name(unit_type), **STYLES["widget"]).grid(row=row)
|
Label(self.frame, text=db.unit_type_name(unit_type), **STYLES["widget"]).grid(row=row)
|
||||||
Label(self.frame, text="{}".format(count), **STYLES["widget"]).grid(column=1, row=row)
|
Label(self.frame, text="{}".format(count), **STYLES["widget"]).grid(column=1, row=row)
|
||||||
@ -89,6 +88,7 @@ class EventResultsMenu(Menu):
|
|||||||
if self.debriefing.destroyed_objects:
|
if self.debriefing.destroyed_objects:
|
||||||
Label(self.frame, text="Ground assets", **STYLES["widget"]).grid(row=row)
|
Label(self.frame, text="Ground assets", **STYLES["widget"]).grid(row=row)
|
||||||
Label(self.frame, text="{}".format(len(self.debriefing.destroyed_objects)), **STYLES["widget"]).grid(column=1, row=row)
|
Label(self.frame, text="{}".format(len(self.debriefing.destroyed_objects)), **STYLES["widget"]).grid(column=1, row=row)
|
||||||
|
row += 1
|
||||||
|
|
||||||
for unit_type, count in self.enemy_losses.items():
|
for unit_type, count in self.enemy_losses.items():
|
||||||
if count == 0:
|
if count == 0:
|
||||||
|
|||||||
@ -171,11 +171,10 @@ class Debriefing:
|
|||||||
|
|
||||||
for mission_id in self._dead_objects:
|
for mission_id in self._dead_objects:
|
||||||
for group in mission.country(enemy.name).static_group + mission.country(enemy.name).vehicle_group:
|
for group in mission.country(enemy.name).static_group + mission.country(enemy.name).vehicle_group:
|
||||||
if group.id == mission_id:
|
if mission_id in [x.id for x in group.units]:
|
||||||
|
logging.info("debriefing: connected id {} to group {}".format(mission_id, str(group.name)))
|
||||||
self.destroyed_objects.append(str(group.name))
|
self.destroyed_objects.append(str(group.name))
|
||||||
|
|
||||||
self.destroyed_objects += self._dead_defense
|
|
||||||
|
|
||||||
|
|
||||||
def debriefing_directory_location() -> str:
|
def debriefing_directory_location() -> str:
|
||||||
return os.path.join(base_path(), "liberation_debriefings")
|
return os.path.join(base_path(), "liberation_debriefings")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user