trigger fixes; strike waypoint fixes; m2k strike payload update

This commit is contained in:
Vasyl Horbachenko 2018-10-13 02:36:25 +03:00
parent 3f8b5c6c00
commit 4fc766a524
6 changed files with 10 additions and 9 deletions

View File

@ -371,6 +371,7 @@ PLANE_PAYLOAD_OVERRIDES = {
M_2000C: {
CAP: "Combat Air Patrol",
GroundAttack: "MK-82 Heavy Strike",
},
MiG_21Bis: {

View File

@ -54,15 +54,15 @@ class StrikeOperation(Operation):
continue
processed_groups.append(object.group_identifier)
category_counters[object.category] = category_counters.get(object.category, 0) + 1
markpoint_name = "{}{}".format(object.name_abbrev, category_counters[object.category])
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]))
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()}
self.airgen.generate_ground_attack_strikegroup(*assigned_units_split(planes_flights),
targets=targets,

View File

@ -9,11 +9,11 @@ from dcs.task import *
from dcs.terrain.terrain import NoParkingSlotError
TANKER_DISTANCE = 15000
TANKER_ALT = 10000
TANKER_ALT = 6000
TANKER_HEADING_OFFSET = 45
AWACS_DISTANCE = 150000
AWACS_ALT = 10000
AWACS_ALT = 15000
class AirSupportConflictGenerator:

View File

@ -85,7 +85,7 @@ class EnviromentGenerator:
self.mission.weather.clouds_thickness = random.randint(*WEATHER_CLOUD_THICKNESS)
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_2000 = Wind(wind_direction, wind_speed * 2)
self.mission.weather.wind_at_8000 = Wind(wind_direction, wind_speed * 3)

View File

@ -24,7 +24,7 @@ class GroundObjectsGenerator:
center = self.conflict.center
heading = self.conflict.heading - 90
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
position = self.conflict.find_ground_position(center.point_from_heading(heading, FARP_FRONTLINE_DISTANCE), heading)

View File

@ -112,10 +112,10 @@ class TriggersGenerator:
for unit in group.units:
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))
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(SetFlagValue())