mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Generate ground forces on all active frontlines.
This commit is contained in:
parent
de96552f78
commit
65a54acd4f
@ -603,6 +603,10 @@ PLANE_PAYLOAD_OVERRIDES = {
|
||||
SEAD: "Stand Off 2"
|
||||
},
|
||||
|
||||
AH_64D:{
|
||||
CAS: "AGM-114K*16"
|
||||
},
|
||||
|
||||
A_10C: {
|
||||
CAS: "AGM-65D*2,AGM-65H*2,GBU-12*2,GBU-38*2,AIM-9*2,TGP,ECM,MK151*7",
|
||||
GroundAttack: "AGM-65K*2,GBU-12*8,AIM-9M*2.ECM,TGP",
|
||||
@ -628,6 +632,7 @@ PLANE_PAYLOAD_OVERRIDES = {
|
||||
},
|
||||
|
||||
Su_24M: {
|
||||
CAS: "S-24*6",
|
||||
SEAD: "Kh25MPU*2_Kh25ML*2_L-081"
|
||||
},
|
||||
|
||||
@ -636,6 +641,7 @@ PLANE_PAYLOAD_OVERRIDES = {
|
||||
},
|
||||
|
||||
Su_17M4: {
|
||||
CAS: "Kh-25MR*4,R-60M*2,Fuel*2",
|
||||
SEAD: "Kh25MPU*2_Kh25ML*2_,R60M*2_Fuel*2"
|
||||
},
|
||||
|
||||
|
||||
@ -53,22 +53,22 @@ class FrontlineAttackOperation(Operation):
|
||||
# ground units
|
||||
self.armorgen.generate_vec(self.attackers, self.defenders)
|
||||
|
||||
# strike group w/ heli support
|
||||
planes_flights = {k: v for k, v in self.strikegroup.items() if k in plane_map.values()}
|
||||
self.airgen.generate_cas_strikegroup(*assigned_units_split(planes_flights), at=self.attackers_starting_position)
|
||||
## strike group w/ heli support
|
||||
#planes_flights = {k: v for k, v in self.strikegroup.items() if k in plane_map.values()}
|
||||
#self.airgen.generate_cas_strikegroup(*assigned_units_split(planes_flights), at=self.attackers_starting_position)
|
||||
|
||||
heli_flights = {k: v for k, v in self.strikegroup.items() if k in helicopters.helicopter_map.values()}
|
||||
if heli_flights:
|
||||
self.briefinggen.append_frequency("FARP + Heli flights", "127.5 MHz AM")
|
||||
for farp, dict in zip(self.groundobjectgen.generate_farps(sum([x[0] for x in heli_flights.values()])),
|
||||
db.assignedunits_split_to_count(heli_flights, self.groundobjectgen.FARP_CAPACITY)):
|
||||
self.airgen.generate_cas_strikegroup(*assigned_units_split(dict),
|
||||
at=farp,
|
||||
escort=len(planes_flights) == 0)
|
||||
#heli_flights = {k: v for k, v in self.strikegroup.items() if k in helicopters.helicopter_map.values()}
|
||||
#if heli_flights:
|
||||
# self.briefinggen.append_frequency("FARP + Heli flights", "127.5 MHz AM")
|
||||
# for farp, dict in zip(self.groundobjectgen.generate_farps(sum([x[0] for x in heli_flights.values()])),
|
||||
# db.assignedunits_split_to_count(heli_flights, self.groundobjectgen.FARP_CAPACITY)):
|
||||
# self.airgen.generate_cas_strikegroup(*assigned_units_split(dict),
|
||||
# at=farp,
|
||||
# escort=len(planes_flights) == 0)
|
||||
|
||||
self.airgen.generate_attackers_escort(*assigned_units_split(self.escort), at=self.attackers_starting_position)
|
||||
#self.airgen.generate_attackers_escort(*assigned_units_split(self.escort), at=self.attackers_starting_position)
|
||||
|
||||
self.airgen.generate_defense(*assigned_units_split(self.interceptors), at=self.defenders_starting_position)
|
||||
#self.airgen.generate_defense(*assigned_units_split(self.interceptors), at=self.defenders_starting_position)
|
||||
|
||||
self.briefinggen.title = "Frontline CAS"
|
||||
self.briefinggen.description = "Provide CAS for the ground forces attacking enemy lines. Operation will be considered successful if total number of enemy units will be lower than your own by a factor of 1.5 (i.e. with 12 units from both sides, enemy forces need to be reduced to at least 8), meaning that you (and, probably, your wingmans) should concentrate on destroying the enemy units. Target base strength will be lowered as a result. Be advised that your flight will not attack anything until you explicitly tell them so by comms menu."
|
||||
|
||||
@ -145,17 +145,20 @@ class Operation:
|
||||
country = self.current_mission.country(self.game.player_country)
|
||||
else:
|
||||
country = self.current_mission.country(self.game.enemy_country)
|
||||
## # CAP
|
||||
## self.airgen.generate_patrol_group(cp, country)
|
||||
## # CAS
|
||||
## self.airgen.generate_patrol_cas(cp, country)
|
||||
## # SEAD
|
||||
## self.airgen.generate_dead_sead(cp, country)
|
||||
if cp.id in self.game.planners.keys():
|
||||
self.airgen.generate_flights(cp, country, self.game.planners[cp.id])
|
||||
|
||||
|
||||
|
||||
# Generate ground units on frontline everywhere
|
||||
for cp in self.game.theater.controlpoints:
|
||||
if cp.captured:
|
||||
for cp_enn in cp.connected_points:
|
||||
if not cp_enn.captured:
|
||||
conflict = Conflict.frontline_cas_conflict(self.attacker_name, self.defender_name,
|
||||
self.current_mission.country(self.attacker_country),
|
||||
self.current_mission.country(self.defender_country),
|
||||
cp, cp_enn, self.game.theater)
|
||||
armorgen = ArmorConflictGenerator(self.current_mission, conflict)
|
||||
armorgen.generate_vec(cp.base.armor, cp_enn.base.armor)
|
||||
|
||||
#Setup combined arms parameters
|
||||
self.current_mission.groundControl.pilot_can_control_vehicles = self.ca_slots > 0
|
||||
|
||||
@ -24,6 +24,7 @@ FIGHT_DISTANCE = 3500
|
||||
|
||||
|
||||
class ArmorConflictGenerator:
|
||||
|
||||
def __init__(self, mission: Mission, conflict: Conflict):
|
||||
self.m = mission
|
||||
self.conflict = conflict
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user