Air Assault for C-130 mod

Resolves #49
This commit is contained in:
Raffson
2022-12-27 19:48:09 +01:00
parent d26fc84316
commit c37c56c879
9 changed files with 114 additions and 16 deletions

View File

@@ -121,6 +121,52 @@ local unitPayloads = {
[1] = 31,
},
},
[9] = {
["displayName"] = "Retribution CAS",
["name"] = "Retribution CAS",
["pylons"] = {
[1] = {
["CLSID"] = "Herc_JATO",
["num"] = 1,
},
[2] = {
["CLSID"] = "{Herc_105mm_Howitzer}",
["num"] = 8,
},
[3] = {
["CLSID"] = "{Herc_M61_Vulcan_Rotary_Cannon}",
["num"] = 6,
},
[4] = {
["CLSID"] = "{Herc_GAU_23A_Chain_Gun}",
["num"] = 7,
},
[5] = {
["CLSID"] = "Herc_BattleStation_TGP",
["num"] = 9,
},
},
["tasks"] = {
[1] = 35,
[2] = 31,
},
},
[10] = {
["name"] = "Retribution Air Assault",
["pylons"] = {
[1] = {
["CLSID"] = "Herc_Soldier_Squad",
["num"] = 12,
},
[2] = {
["CLSID"] = "Herc_JATO",
["num"] = 1,
},
},
["tasks"] = {
[1] = 32,
},
},
},
["tasks"] = {
},

View File

@@ -490,11 +490,11 @@ function Hercules_Cargo.Cargo_Initialize(initiator, Cargo_Contents, Cargo_Type_n
Herc_Cargo[Herc_j].all_cargo_survive_to_the_ground = true
else
------------------------------------------------------------------------------
if Hercules_Cargo.Calculate_Object_Height_AGL(Cargo_Drop_initiator) < 100.0 then--aircraft more than 10m but less than 100m above ground
if Hercules_Cargo.Calculate_Object_Height_AGL(Cargo_Drop_initiator) < 152.4 then--aircraft more than 30ft but less than 500ft above ground
Herc_Cargo[Herc_j].all_cargo_gets_destroyed = true
else
------------------------------------------------------------------------------
Herc_Cargo[Herc_j].destroy_cargo_dropped_without_parachute = true--aircraft more than 100m above ground
Herc_Cargo[Herc_j].destroy_cargo_dropped_without_parachute = true--aircraft more than 152.4m (500ft)above ground
end
end
end
@@ -568,7 +568,7 @@ function Hercules_Cargo.Hercules_Cargo_Drop_Events:onEvent(Cargo_Drop_Event)
local Cargo_Container_Enclosed = Hercules_Cargo.types[GT_DisplayName]['container']
Hercules_Cargo.Cargo_Initialize(Cargo_Drop_Event.initiator, Cargo_Drop_Event.weapon, GT_Name, Cargo_Container_Enclosed)
end
end
end
end
world.addEventHandler(Hercules_Cargo.Hercules_Cargo_Drop_Events)