mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
number of fixes
This commit is contained in:
parent
933e064079
commit
8f4094ee98
@ -8,6 +8,8 @@ class StrikeOperation(Operation):
|
||||
escort = None # type: db.AssignedUnitsDict
|
||||
interceptors = None # type: db.AssignedUnitsDict
|
||||
|
||||
trigger_radius = TRIGGER_RADIUS_ALL_MAP
|
||||
|
||||
def setup(self,
|
||||
strikegroup: db.AssignedUnitsDict,
|
||||
escort: db.AssignedUnitsDict,
|
||||
|
||||
10
gen/armor.py
10
gen/armor.py
@ -20,6 +20,8 @@ FRONTLINE_CAS_FIGHTS_COUNT = 4, 8
|
||||
FRONTLINE_CAS_GROUP_MIN = 1, 2
|
||||
FRONTLINE_CAS_PADDING = 12000
|
||||
|
||||
FIGHT_DISTANCE = 1500
|
||||
|
||||
|
||||
class ArmorConflictGenerator:
|
||||
def __init__(self, mission: Mission, conflict: Conflict):
|
||||
@ -56,8 +58,8 @@ class ArmorConflictGenerator:
|
||||
|
||||
def _generate_fight_at(self, attackers: db.ArmorDict, defenders: db.ArmorDict, position: Point):
|
||||
if attackers:
|
||||
attack_pos = position.point_from_heading(self.conflict.heading - 90, 8000)
|
||||
attack_dest = position.point_from_heading(self.conflict.heading + 90, 25000)
|
||||
attack_pos = position.point_from_heading(self.conflict.heading - 90, FIGHT_DISTANCE)
|
||||
attack_dest = position.point_from_heading(self.conflict.heading + 90, FIGHT_DISTANCE * 2)
|
||||
for type, count in attackers.items():
|
||||
self._generate_group(
|
||||
side=self.conflict.attackers_side,
|
||||
@ -68,8 +70,8 @@ class ArmorConflictGenerator:
|
||||
)
|
||||
|
||||
if defenders:
|
||||
def_pos = position.point_from_heading(self.conflict.heading + 90, 4000)
|
||||
def_dest = position.point_from_heading(self.conflict.heading - 90, 25000)
|
||||
def_pos = position.point_from_heading(self.conflict.heading + 90, FIGHT_DISTANCE)
|
||||
def_dest = position.point_from_heading(self.conflict.heading - 90, FIGHT_DISTANCE * 2)
|
||||
for type, count in defenders.items():
|
||||
self._generate_group(
|
||||
side=self.conflict.defenders_side,
|
||||
|
||||
@ -127,9 +127,9 @@ class EnviromentGenerator:
|
||||
# sometimes clouds are randomized way too low and need to be fixed
|
||||
self.mission.weather.clouds_base = max(self.mission.weather.clouds_base, WEATHER_CLOUD_BASE_MIN)
|
||||
|
||||
if self.mission.weather.wind_at_ground == 0:
|
||||
if self.mission.weather.wind_at_ground.speed == 0:
|
||||
# frontline smokes look silly w/o any wind
|
||||
self.mission.weather.wind_at_ground = random.randint(1, 2)
|
||||
self._generate_wind(1)
|
||||
|
||||
def generate(self) -> EnvironmentSettings:
|
||||
self._gen_random_time()
|
||||
|
||||
@ -28,6 +28,9 @@ class GroundObjectsGenerator:
|
||||
heading -= 90
|
||||
|
||||
position = self.conflict.find_ground_position(center.point_from_heading(heading, FARP_FRONTLINE_DISTANCE), heading)
|
||||
if not position:
|
||||
return
|
||||
|
||||
for i, _ in enumerate(range(0, number_of_units, self.FARP_CAPACITY)):
|
||||
position = position.point_from_heading(0, i * 275)
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ TRIGGER_RADIUS_MINIMUM = 20000
|
||||
TRIGGER_RADIUS_SMALL = 50000
|
||||
TRIGGER_RADIUS_MEDIUM = 100000
|
||||
TRIGGER_RADIUS_LARGE = 150000
|
||||
TRIGGER_RADIUS_ALL_MAP = 3000000
|
||||
|
||||
|
||||
class Silence(Option):
|
||||
@ -53,14 +54,16 @@ class TriggersGenerator:
|
||||
vehicle_group.late_activation = True
|
||||
activate_by_trigger.append(vehicle_group)
|
||||
|
||||
"""
|
||||
conflict_distance = player_cp.position.distance_to_point(self.conflict.position)
|
||||
minimum_radius = max(conflict_distance - TRIGGER_MIN_DISTANCE_FROM_START, TRIGGER_RADIUS_MINIMUM)
|
||||
if minimum_radius < 0:
|
||||
minimum_radius = 0
|
||||
|
||||
result_radius = min(minimum_radius, radius)
|
||||
"""
|
||||
|
||||
activation_trigger_zone = self.mission.triggers.add_triggerzone(self.conflict.position, result_radius, name="Activation zone")
|
||||
activation_trigger_zone = self.mission.triggers.add_triggerzone(self.conflict.position, radius, 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())
|
||||
|
||||
@ -33,7 +33,6 @@ class CaucasusTheater(ConflictTheater):
|
||||
gelendzhik = ControlPoint.from_airport(caucasus.Gelendzhik, COAST_DR_E, SIZE_BIG, 1.1)
|
||||
maykop = ControlPoint.from_airport(caucasus.Maykop_Khanskaya, LAND, SIZE_LARGE, IMPORTANCE_HIGH)
|
||||
krasnodar = ControlPoint.from_airport(caucasus.Krasnodar_Center, LAND, SIZE_LARGE, IMPORTANCE_HIGH)
|
||||
novorossiysk = ControlPoint.from_airport(caucasus.Novorossiysk, COAST_DR_E, SIZE_BIG, 1.2)
|
||||
krymsk = ControlPoint.from_airport(caucasus.Krymsk, LAND, SIZE_LARGE, 1.2)
|
||||
anapa = ControlPoint.from_airport(caucasus.Anapa_Vityazevo, LAND, SIZE_LARGE, IMPORTANCE_HIGH)
|
||||
|
||||
|
||||
@ -54,6 +54,7 @@ class EventResultsMenu(Menu):
|
||||
pg.start(10)
|
||||
row += 1
|
||||
|
||||
"""
|
||||
Label(self.frame, text="Cheat operation results: ", **STYLES["strong"]).grid(column=0, row=row,
|
||||
columnspan=2, sticky=NSEW,
|
||||
pady=5)
|
||||
@ -69,6 +70,7 @@ class EventResultsMenu(Menu):
|
||||
Button(self.frame, text="some player losses", command=self.simulate_result(0.8, 0),
|
||||
**STYLES["btn-warning"]).grid(column=1, row=row, padx=5, pady=5)
|
||||
row += 1
|
||||
"""
|
||||
|
||||
else:
|
||||
row = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user