mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
trigger fixes; strike waypoint fixes; m2k strike payload update
This commit is contained in:
parent
3f8b5c6c00
commit
4fc766a524
@ -371,6 +371,7 @@ PLANE_PAYLOAD_OVERRIDES = {
|
|||||||
|
|
||||||
M_2000C: {
|
M_2000C: {
|
||||||
CAP: "Combat Air Patrol",
|
CAP: "Combat Air Patrol",
|
||||||
|
GroundAttack: "MK-82 Heavy Strike",
|
||||||
},
|
},
|
||||||
|
|
||||||
MiG_21Bis: {
|
MiG_21Bis: {
|
||||||
|
|||||||
@ -54,15 +54,15 @@ class StrikeOperation(Operation):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
processed_groups.append(object.group_identifier)
|
processed_groups.append(object.group_identifier)
|
||||||
|
|
||||||
category_counters[object.category] = category_counters.get(object.category, 0) + 1
|
category_counters[object.category] = category_counters.get(object.category, 0) + 1
|
||||||
markpoint_name = "{}{}".format(object.name_abbrev, category_counters[object.category])
|
markpoint_name = "{}{}".format(object.name_abbrev, category_counters[object.category])
|
||||||
targets.append((markpoint_name, object.position))
|
targets.append((markpoint_name, object.position))
|
||||||
self.briefinggen.append_target(str(object))
|
|
||||||
self.briefinggen.append_waypoint("TARGET {} (TP {})".format(str(object), markpoint_name))
|
|
||||||
|
|
||||||
targets.sort(key=lambda x: self.from_cp.position.distance_to_point(x[1]))
|
targets.sort(key=lambda x: self.from_cp.position.distance_to_point(x[1]))
|
||||||
|
|
||||||
|
for (name, markpoint_name) in targets:
|
||||||
|
self.briefinggen.append_waypoint("TARGET {} (TP {})".format(str(name), markpoint_name))
|
||||||
|
|
||||||
planes_flights = {k: v for k, v in self.strikegroup.items() if k in plane_map.values()}
|
planes_flights = {k: v for k, v in self.strikegroup.items() if k in plane_map.values()}
|
||||||
self.airgen.generate_ground_attack_strikegroup(*assigned_units_split(planes_flights),
|
self.airgen.generate_ground_attack_strikegroup(*assigned_units_split(planes_flights),
|
||||||
targets=targets,
|
targets=targets,
|
||||||
|
|||||||
@ -9,11 +9,11 @@ from dcs.task import *
|
|||||||
from dcs.terrain.terrain import NoParkingSlotError
|
from dcs.terrain.terrain import NoParkingSlotError
|
||||||
|
|
||||||
TANKER_DISTANCE = 15000
|
TANKER_DISTANCE = 15000
|
||||||
TANKER_ALT = 10000
|
TANKER_ALT = 6000
|
||||||
TANKER_HEADING_OFFSET = 45
|
TANKER_HEADING_OFFSET = 45
|
||||||
|
|
||||||
AWACS_DISTANCE = 150000
|
AWACS_DISTANCE = 150000
|
||||||
AWACS_ALT = 10000
|
AWACS_ALT = 15000
|
||||||
|
|
||||||
|
|
||||||
class AirSupportConflictGenerator:
|
class AirSupportConflictGenerator:
|
||||||
|
|||||||
@ -85,7 +85,7 @@ class EnviromentGenerator:
|
|||||||
self.mission.weather.clouds_thickness = random.randint(*WEATHER_CLOUD_THICKNESS)
|
self.mission.weather.clouds_thickness = random.randint(*WEATHER_CLOUD_THICKNESS)
|
||||||
|
|
||||||
wind_direction = random.randint(0, 360)
|
wind_direction = random.randint(0, 360)
|
||||||
wind_speed = random.randint(0, 13)
|
wind_speed = random.randint(0, 4)
|
||||||
self.mission.weather.wind_at_ground = Wind(wind_direction, wind_speed)
|
self.mission.weather.wind_at_ground = Wind(wind_direction, wind_speed)
|
||||||
self.mission.weather.wind_at_2000 = Wind(wind_direction, wind_speed * 2)
|
self.mission.weather.wind_at_2000 = Wind(wind_direction, wind_speed * 2)
|
||||||
self.mission.weather.wind_at_8000 = Wind(wind_direction, wind_speed * 3)
|
self.mission.weather.wind_at_8000 = Wind(wind_direction, wind_speed * 3)
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class GroundObjectsGenerator:
|
|||||||
center = self.conflict.center
|
center = self.conflict.center
|
||||||
heading = self.conflict.heading - 90
|
heading = self.conflict.heading - 90
|
||||||
else:
|
else:
|
||||||
center, heading = self.conflict.frontline_position(self.conflict.from_cp, self.conflict.to_cp)
|
center, heading = self.conflict.frontline_position(self.conflict.theater, self.conflict.from_cp, self.conflict.to_cp)
|
||||||
heading -= 90
|
heading -= 90
|
||||||
|
|
||||||
position = self.conflict.find_ground_position(center.point_from_heading(heading, FARP_FRONTLINE_DISTANCE), heading)
|
position = self.conflict.find_ground_position(center.point_from_heading(heading, FARP_FRONTLINE_DISTANCE), heading)
|
||||||
|
|||||||
@ -112,10 +112,10 @@ class TriggersGenerator:
|
|||||||
for unit in group.units:
|
for unit in group.units:
|
||||||
push_trigger.add_condition(UnitAltitudeHigherAGL(unit.id, PUSH_TRIGGER_ACTIVATION_AGL))
|
push_trigger.add_condition(UnitAltitudeHigherAGL(unit.id, PUSH_TRIGGER_ACTIVATION_AGL))
|
||||||
|
|
||||||
if group.units[0].is_human():
|
if not group.units[0].is_human():
|
||||||
push_trigger.add_action(AITaskPush(group.id, 1))
|
push_trigger.add_action(AITaskPush(group.id, 1))
|
||||||
|
|
||||||
message_string = self.mission.string("Task force is in the air, proceed with the objective (activate waypoint 3).")
|
message_string = self.mission.string("Task force is in the air, proceed with the objective.")
|
||||||
push_trigger.add_action(MessageToAll(message_string, clearview=True))
|
push_trigger.add_action(MessageToAll(message_string, clearview=True))
|
||||||
push_trigger.add_action(SetFlagValue())
|
push_trigger.add_action(SetFlagValue())
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user