JTAC support

This commit is contained in:
Khopa
2020-08-12 03:13:51 +02:00
parent bff33e6992
commit 2a50768db1
36 changed files with 809 additions and 29 deletions

View File

@@ -46,5 +46,5 @@ Australia_2005 = {
"HMAS Adelaide"
], "boat":[
"ArleighBurkeGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -54,5 +54,5 @@ BLUEFOR_COLDWAR = {
"LHA-4 Nassau",
"LHA-5 Peleliu"
], "boat": [
]
], "has_jtac": True
}

View File

@@ -61,5 +61,5 @@ BLUEFOR_COLDWAR_A4 = {
], "boat": [
], "requirements": {
"Community A-4E": "https://heclak.github.io/community-a4e-c/",
}
}, "has_jtac": True
}

View File

@@ -64,5 +64,5 @@ BLUEFOR_COLDWAR_MODS = {
], "requirements": {
"MB-339A": "http://www.freccetricolorivirtuali.net/",
"Community A-4E": "https://heclak.github.io/community-a4e-c/",
}
}, "has_jtac": True
}

View File

@@ -78,5 +78,5 @@ BLUEFOR_MODERN = {
"LHA-5 Peleliu"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -39,5 +39,5 @@ Canada_2005 = {
Ticonderoga_class,
], "boat":[
"ArleighBurkeGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -73,5 +73,5 @@ China_2010 = {
"002 Shandong",
], "boat":[
"Type54GroupGenerator"
]
], "has_jtac": True
}

View File

@@ -42,5 +42,5 @@ France_1995 = {
AirDefence.SAM_Roland_ADS
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -57,5 +57,5 @@ France_2005 = {
"L9015 Dixmude"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -75,5 +75,5 @@ France_2005_Modded = {
], "requirements": {
"frenchpack V3.5": "https://forums.eagle.ru/showthread.php?t=279974",
"RAFALE 2.5.5": "https://www.digitalcombatsimulator.com/fr/files/3307478/",
}
}, "has_jtac": True
}

View File

@@ -51,5 +51,5 @@ India_2010 = {
"INS Vikramaditya"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator", "MolniyaGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -35,5 +35,5 @@ Israel_2000 = {
AirDefence.SAM_Avenger_M1097
], "boat": [
"ArleighBurkeGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -44,5 +44,5 @@ Italy_1990 = {
"Cavour",
], "boat":[
"OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -48,5 +48,5 @@ Italy_1990_MB339 = {
"OliverHazardPerryGroupGenerator"
], "requirements": {
"MB-339A": "http://www.freccetricolorivirtuali.net/",
}
}, "has_jtac": True
}

View File

@@ -50,5 +50,5 @@ Japan_2005 = {
"Ise",
], "boat":[
"ArleighBurkeGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -34,5 +34,5 @@ Netherlands_1990 = {
AirDefence.SAM_Avenger_M1097
], "boat": [
"OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -36,5 +36,5 @@ Pakistan_2015 = {
AirDefence.AAA_ZU_23_Closed
], "boat": [
"Type54GroupGenerator", "OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -46,5 +46,5 @@ Spain_1990 = {
"Juan Carlos I",
], "boat":[
"OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -27,5 +27,5 @@ Sweden_1990 = {
],
"shorad": [
AirDefence.SAM_Avenger_M1097
]
], "has_jtac": True
}

View File

@@ -38,5 +38,5 @@ Turkey_2005 = {
AirDefence.SPAAA_ZSU_23_4_Shilka
], "boat":[
"OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -32,5 +32,5 @@ UAE_2005 = {
Armed_speedboat,
], "boat":[
"OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -48,5 +48,5 @@ UnitedKingdom_1990 = {
"HMS Ark Royal",
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -61,5 +61,5 @@ USA_1990 = {
"LHA-5 Peleliu"
], "boat":[
"ArleighBurkeGroupGenerator", "OliverHazardPerryGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -66,5 +66,5 @@ USA_2005 = {
"LHA-5 Peleliu"
], "boat":[
"ArleighBurkeGroupGenerator"
]
], "has_jtac": True
}

View File

@@ -75,6 +75,7 @@ class Game:
self.__culling_points = self.compute_conflicts_position()
self.__frontlineData = []
self.__destroyed_units = []
self.jtacs = []
self.savepath = ""
self.sanitize_sides()

View File

@@ -157,6 +157,7 @@ class Operation:
self.airgen.generate_flights(cp, country, self.game.planners[cp.id])
# Generate ground units on frontline everywhere
self.game.jtacs = []
for player_cp, enemy_cp in self.game.theater.conflicts(True):
conflict = Conflict.frontline_cas_conflict(self.attacker_name, self.defender_name,
self.current_mission.country(self.attacker_country),
@@ -175,14 +176,14 @@ class Operation:
else:
self.current_mission.groundControl.red_tactical_commander = self.ca_slots
# triggers
# Triggers
if self.game.is_player_attack(self.conflict.attackers_country):
cp = self.conflict.from_cp
else:
cp = self.conflict.to_cp
self.triggersgen.generate()
# options
# Options
self.forcedoptionsgen.generate()
# Generate Visuals Smoke Effects
@@ -195,6 +196,18 @@ class Operation:
load_mist.add_action(DoScript(String(f.read())))
self.current_mission.triggerrules.triggers.append(load_mist)
# Load Ciribob's JTACAutoLase script
load_autolase = TriggerStart(comment="Load JTAC script")
with open("./resources/scripts/JTACAutoLase.lua") as f:
script = f.read()
script = script + "\n"
for jtac in self.game.jtacs:
script = script + "\n" + "JTACAutoLase('" + str(jtac[2]) + "', " + str(jtac[1]) + ", true, \"vehicle\")" + "\n"
load_autolase.add_action(DoScript(String(script)))
self.current_mission.triggerrules.triggers.append(load_autolase)
load_dcs_libe = TriggerStart(comment="Load DCS Liberation Script")
with open("./resources/scripts/dcs_liberation.lua") as f:
script = f.read()

View File

@@ -24,6 +24,7 @@ class Settings:
self.sams = True # Legacy parameter do not use
self.cold_start = False # Legacy parameter do not use
self.version = None
self.include_jtac_if_available = True
# Performance oriented
self.perf_red_alert_state = True