mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Implemented new options in settings:
- Pretense: Extra friendly zone connections - Add connections from each zone to this many closest friendly zones, which don't have an existing supply route defined in the campaign. - Number of cargo planes per side - Number of AI SEAD flights per control point / zone - Number of AI CAS flights per control point / zone - Number of AI BAI flights per control point / zone - Number of AI Strike flights per control point / zone - Number of AI BARCAP flights per control point / zone - Number of AI aircraft per flight - Number of player flights per aircraft type at each base - Number of AI cargo planes per side Implemented CAS helo mission handling for Pretense. Implemented separate pretense_air_groups container for storing/referencing Flight objects. Tweaked the supply costs of SAM sites and Command centers. Will no longer generate player air starts at roadbases either. Restored the missing DEAD flights to Pretense. Removed spawning of frontline units and moved the JTAC spawning to pretensemissiongenerator.py
This commit is contained in:
@@ -290,11 +290,9 @@ class GroundObjectGenerator:
|
||||
# All alive Ships
|
||||
ship_units.append(unit)
|
||||
if vehicle_units:
|
||||
vg = self.create_vehicle_group(group.group_name, vehicle_units)
|
||||
vg.hidden_on_mfd = self.ground_object.hide_on_mfd
|
||||
self.create_vehicle_group(group.group_name, vehicle_units)
|
||||
if ship_units:
|
||||
sg = self.create_ship_group(group.group_name, ship_units)
|
||||
sg.hidden_on_mfd = self.ground_object.hide_on_mfd
|
||||
self.create_ship_group(group.group_name, ship_units)
|
||||
|
||||
def create_vehicle_group(
|
||||
self, group_name: str, units: list[TheaterUnit]
|
||||
@@ -827,30 +825,45 @@ class HelipadGenerator:
|
||||
else:
|
||||
self.helipads.append(sg)
|
||||
|
||||
# Generate a FARP Ammo and Fuel stack for each pad
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=Fortification.FARP_Fuel_Depot,
|
||||
position=pad.position.point_from_heading(helipad.heading.degrees, 35),
|
||||
heading=pad.heading + 180,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=Fortification.FARP_Ammo_Dump_Coating,
|
||||
position=pad.position.point_from_heading(
|
||||
helipad.heading.degrees, 35
|
||||
).point_from_heading(helipad.heading.degrees + 90, 10),
|
||||
heading=pad.heading + 90,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ws"),
|
||||
_type=Fortification.Windsock,
|
||||
position=helipad.point_from_heading(helipad.heading.degrees + 45, 35),
|
||||
heading=pad.heading,
|
||||
)
|
||||
if self.game.position_culled(helipad):
|
||||
cull_farp_statics = True
|
||||
if self.cp.coalition.player:
|
||||
for package in self.cp.coalition.ato.packages:
|
||||
for flight in package.flights:
|
||||
if flight.squadron.location == self.cp:
|
||||
cull_farp_statics = False
|
||||
break
|
||||
elif flight.divert and flight.divert == self.cp:
|
||||
cull_farp_statics = False
|
||||
break
|
||||
else:
|
||||
cull_farp_statics = False
|
||||
|
||||
if not cull_farp_statics:
|
||||
# Generate a FARP Ammo and Fuel stack for each pad
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=Fortification.FARP_Fuel_Depot,
|
||||
position=pad.position.point_from_heading(helipad.heading.degrees, 35),
|
||||
heading=pad.heading + 180,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=Fortification.FARP_Ammo_Dump_Coating,
|
||||
position=pad.position.point_from_heading(
|
||||
helipad.heading.degrees, 35
|
||||
).point_from_heading(helipad.heading.degrees + 90, 10),
|
||||
heading=pad.heading + 90,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ws"),
|
||||
_type=Fortification.Windsock,
|
||||
position=helipad.point_from_heading(helipad.heading.degrees + 45, 35),
|
||||
heading=pad.heading,
|
||||
)
|
||||
|
||||
def append_helipad(
|
||||
self,
|
||||
@@ -927,61 +940,76 @@ class GroundSpawnRoadbaseGenerator:
|
||||
country.id
|
||||
)
|
||||
|
||||
# Generate ammo truck/farp and fuel truck/stack for each pad
|
||||
if self.game.settings.ground_start_trucks_roadbase:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=tanker_type,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 315,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=ammo_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
).point_from_heading(ground_spawn[0].heading.degrees + 180, 10),
|
||||
group_size=1,
|
||||
heading=pad.heading + 315,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
if self.game.position_culled(ground_spawn[0]):
|
||||
cull_farp_statics = True
|
||||
if self.cp.coalition.player:
|
||||
for package in self.cp.coalition.ato.packages:
|
||||
for flight in package.flights:
|
||||
if flight.squadron.location == self.cp:
|
||||
cull_farp_statics = False
|
||||
break
|
||||
elif flight.divert and flight.divert == self.cp:
|
||||
cull_farp_statics = False
|
||||
break
|
||||
else:
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=Fortification.FARP_Fuel_Depot,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
),
|
||||
heading=pad.heading + 270,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=Fortification.FARP_Ammo_Dump_Coating,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
).point_from_heading(ground_spawn[0].heading.degrees + 180, 10),
|
||||
heading=pad.heading + 180,
|
||||
)
|
||||
if self.game.settings.ground_start_ground_power_trucks_roadbase:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_power"),
|
||||
_type=power_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
).point_from_heading(ground_spawn[0].heading.degrees + 180, 20),
|
||||
group_size=1,
|
||||
heading=pad.heading + 315,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
cull_farp_statics = False
|
||||
|
||||
if not cull_farp_statics:
|
||||
# Generate ammo truck/farp and fuel truck/stack for each pad
|
||||
if self.game.settings.ground_start_trucks_roadbase:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=tanker_type,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 315,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=ammo_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
).point_from_heading(ground_spawn[0].heading.degrees + 180, 10),
|
||||
group_size=1,
|
||||
heading=pad.heading + 315,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
else:
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=Fortification.FARP_Fuel_Depot,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
),
|
||||
heading=pad.heading + 270,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=Fortification.FARP_Ammo_Dump_Coating,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
).point_from_heading(ground_spawn[0].heading.degrees + 180, 10),
|
||||
heading=pad.heading + 180,
|
||||
)
|
||||
if self.game.settings.ground_start_ground_power_trucks_roadbase:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_power"),
|
||||
_type=power_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
ground_spawn[0].heading.degrees + 90, 35
|
||||
).point_from_heading(ground_spawn[0].heading.degrees + 180, 20),
|
||||
group_size=1,
|
||||
heading=pad.heading + 315,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
|
||||
def generate(self) -> None:
|
||||
try:
|
||||
@@ -1044,61 +1072,76 @@ class GroundSpawnGenerator:
|
||||
country.id
|
||||
)
|
||||
|
||||
# Generate a FARP Ammo and Fuel stack for each pad
|
||||
if self.game.settings.ground_start_trucks:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=tanker_type,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 175, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 45,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=ammo_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 185, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 45,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
if self.game.position_culled(vtol_pad[0]):
|
||||
cull_farp_statics = True
|
||||
if self.cp.coalition.player:
|
||||
for package in self.cp.coalition.ato.packages:
|
||||
for flight in package.flights:
|
||||
if flight.squadron.location == self.cp:
|
||||
cull_farp_statics = False
|
||||
break
|
||||
elif flight.divert and flight.divert == self.cp:
|
||||
cull_farp_statics = False
|
||||
break
|
||||
else:
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=Fortification.FARP_Fuel_Depot,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 180, 45
|
||||
),
|
||||
heading=pad.heading,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=Fortification.FARP_Ammo_Dump_Coating,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 180, 35
|
||||
),
|
||||
heading=pad.heading + 270,
|
||||
)
|
||||
if self.game.settings.ground_start_ground_power_trucks:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_power"),
|
||||
_type=power_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 185, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 45,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
cull_farp_statics = False
|
||||
|
||||
if not cull_farp_statics:
|
||||
# Generate a FARP Ammo and Fuel stack for each pad
|
||||
if self.game.settings.ground_start_trucks:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=tanker_type,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 175, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 45,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=ammo_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 185, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 45,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
else:
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_fuel"),
|
||||
_type=Fortification.FARP_Fuel_Depot,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 180, 45
|
||||
),
|
||||
heading=pad.heading,
|
||||
)
|
||||
self.m.static_group(
|
||||
country=country,
|
||||
name=(name + "_ammo"),
|
||||
_type=Fortification.FARP_Ammo_Dump_Coating,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 180, 35
|
||||
),
|
||||
heading=pad.heading + 270,
|
||||
)
|
||||
if self.game.settings.ground_start_ground_power_trucks:
|
||||
self.m.vehicle_group(
|
||||
country=country,
|
||||
name=(name + "_power"),
|
||||
_type=power_truck_type,
|
||||
position=pad.position.point_from_heading(
|
||||
vtol_pad[0].heading.degrees - 185, 35
|
||||
),
|
||||
group_size=1,
|
||||
heading=pad.heading + 45,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
|
||||
def generate(self) -> None:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user