mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
persistent time and weather between regular and quick missions; defense AA for frontline CAS
This commit is contained in:
@@ -10,7 +10,7 @@ from dcs.task import *
|
||||
from dcs.terrain.terrain import NoParkingSlotError
|
||||
|
||||
SPREAD_DISTANCE_FACTOR = 1, 2
|
||||
ESCORT_MAX_DIST = 30000
|
||||
ESCORT_MAX_DIST = 80000
|
||||
WORKAROUND_WAYP_DIST = 1000
|
||||
|
||||
WARM_START_ALTITUDE = 4600
|
||||
@@ -20,7 +20,7 @@ RTB_ALTITUDE = 4600
|
||||
TRANSPORT_LANDING_ALT = 4600
|
||||
HELI_ALT = 900
|
||||
|
||||
WARM_START_AIRSPEED = 540
|
||||
WARM_START_AIRSPEED = 550
|
||||
INTERCEPTION_AIRSPEED = 1000
|
||||
|
||||
INTERCEPT_MAX_DISTANCE = 80000
|
||||
@@ -117,7 +117,7 @@ class AircraftConflictGenerator:
|
||||
airport=None,
|
||||
position=pos,
|
||||
altitude=alt,
|
||||
speed=WARM_START_AIRSPEED + random.randint(500, 3000),
|
||||
speed=WARM_START_AIRSPEED,
|
||||
maintask=None,
|
||||
start_type=StartType.Warm,
|
||||
group_size=count)
|
||||
|
||||
@@ -87,8 +87,11 @@ class Conflict:
|
||||
@classmethod
|
||||
def _find_ground_location(cls, initial: Point, max_distance: int, heading: int, theater: ConflictTheater) -> Point:
|
||||
for _ in range(0, int(max_distance), 800):
|
||||
if theater.is_on_land(initial):
|
||||
return initial
|
||||
for _ in range(3):
|
||||
if theater.is_on_land(initial):
|
||||
return initial
|
||||
|
||||
initial = initial.random_point_within(1000, 1000)
|
||||
|
||||
initial = initial.point_from_heading(heading, 800)
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ RANDOM_TIME = {
|
||||
|
||||
RANDOM_WEATHER = {
|
||||
1: 5, # heavy rain
|
||||
2: 20, # rain
|
||||
3: 30, # dynamic
|
||||
2: 30, # rain
|
||||
3: 40, # dynamic
|
||||
4: 50, # clear
|
||||
5: 100, # random
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ class TriggersGenerator:
|
||||
activation_trigger_zone = self.mission.triggers.add_triggerzone(self.conflict.position, zone_size, name="Activation zone")
|
||||
activation_trigger = TriggerOnce(Event.NoEvent, "Activation trigger")
|
||||
activation_trigger.add_condition(PartOfCoalitionInZone(player_coalition, activation_trigger_zone.id))
|
||||
activation_trigger.add_condition(FlagIsTrue())
|
||||
for group in activate_by_trigger:
|
||||
activation_trigger.add_action(ActivateGroup(group.id))
|
||||
|
||||
@@ -94,6 +95,7 @@ class TriggersGenerator:
|
||||
push_trigger.add_action(AITaskPush(group.id, 1))
|
||||
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())
|
||||
|
||||
self.mission.triggerrules.triggers.append(push_trigger)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user