Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank 2022-04-01 12:09:33 +02:00
commit 20ae7945e0
5 changed files with 926 additions and 880 deletions

View File

@ -269,6 +269,10 @@
-- --
-- A troop transport mission can be created with the @{#AUFTRAG.NewTROOPTRANSPORT}() function. -- A troop transport mission can be created with the @{#AUFTRAG.NewTROOPTRANSPORT}() function.
-- --
-- ## HOVER
--
-- A mission for a helicoptre or VSTOL plane to Hover at a point for a certain amount of time can be created with the @{#AUFTRAG.NewHOVER}() function.
--
-- # Ground Missions -- # Ground Missions
-- --
-- ## ARTY -- ## ARTY
@ -281,7 +285,7 @@
-- --
-- # Options and Parameters -- # Options and Parameters
-- --
-- -- TODO
-- --
-- # Assigning Missions -- # Assigning Missions
-- --
@ -1769,7 +1773,7 @@ end
--- **[GROUND]** Create a ARMORATTACK mission. Armoured ground group(s) will go to the zone and attack. --- **[GROUND]** Create a ARMORATTACK mission. Armoured ground group(s) will go to the zone and attack.
-- @param #AUFTRAG self -- @param #AUFTRAG self
-- @param Wrapper.Positionable#POSITIONABLE Target The target to attack. Can be a GROUP, UNIT or STATIC object. -- @param Ops.Target#TARGET Target The target to attack. Can be a GROUP, UNIT or STATIC object.
-- @param #number Speed Speed in knots. -- @param #number Speed Speed in knots.
-- @param #string Formation The attack formation, e.g. "Wedge", "Vee" etc. -- @param #string Formation The attack formation, e.g. "Wedge", "Vee" etc.
-- @return #AUFTRAG self -- @return #AUFTRAG self
@ -1783,7 +1787,7 @@ function AUFTRAG:NewARMORATTACK(Target, Speed, Formation)
mission.optionROE=ENUMS.ROE.OpenFire mission.optionROE=ENUMS.ROE.OpenFire
mission.optionAlarm=ENUMS.AlarmState.Auto mission.optionAlarm=ENUMS.AlarmState.Auto
mission.optionFormation="Off Road" mission.optionFormation="On Road"
mission.optionAttackFormation=Formation or "Wedge" mission.optionAttackFormation=Formation or "Wedge"
mission.missionFraction=1.0 mission.missionFraction=1.0
@ -5125,6 +5129,8 @@ function AUFTRAG:GetDCSMissionTask(TaskControllable)
-- We create a "fake" DCS task and pass the parameters to the ARMYGROUP. -- We create a "fake" DCS task and pass the parameters to the ARMYGROUP.
local param={} local param={}
param.zone=self:GetObjective() param.zone=self:GetObjective()
param.tVec2=param.zone:GetVec2()
param.tzone=ZONE_RADIUS:New("ARMORATTACK-Zone-"..self.auftragsnummer,param.tVec2,1000)
param.action="Wedge" param.action="Wedge"
param.speed=self.missionSpeed param.speed=self.missionSpeed

View File

@ -870,8 +870,12 @@ do
-- --
-- ## 5. Support for Hercules mod by Anubis -- ## 5. Support for Hercules mod by Anubis
-- --
-- Basic support for the Hercules mod By Anubis has been build into CTLD. Currently this does **not** cover objects and troops which can -- Basic support for the Hercules mod By Anubis has been build into CTLD - that is you can load/drop/build the same objects as the helicopters.
-- be loaded from the Rearm/Refuel menu, i.e. you can drop them into the field, but you cannot use them in functions scripted with this class. -- To also cover objects and troops which can be loaded from the groud crew Rearm/Refuel menu, you need to use @{#CTLD_HERCULES.New}() and link
-- this object to your CTLD setup. In this case, do **not** use the `Hercules_Cargo.lua` or `Hercules_Cargo_CTLD.lua` which are part of the mod
-- in your mission!
--
-- ### 5.1 Create an own CTLD instance and allow the usage of the Hercules mod:
-- --
-- local my_ctld = CTLD:New(coalition.side.BLUE,{"Helicargo", "Hercules"},"Lufttransportbrigade I") -- local my_ctld = CTLD:New(coalition.side.BLUE,{"Helicargo", "Hercules"},"Lufttransportbrigade I")
-- --
@ -882,10 +886,33 @@ do
-- my_ctld.HercMaxAngels = 2000 -- for troop/cargo drop via chute in meters, ca 6000 ft -- my_ctld.HercMaxAngels = 2000 -- for troop/cargo drop via chute in meters, ca 6000 ft
-- my_ctld.HercMaxSpeed = 77 -- 77mps or 270kph or 150kn -- my_ctld.HercMaxSpeed = 77 -- 77mps or 270kph or 150kn
-- --
-- Hint: you can **only** airdrop from the Hercules if you are "in parameters", i.e. at or below `HercMaxSpeed` and in the AGL bracket between
-- `HercMinAngels` and `HercMaxAngels`!
--
-- Also, the following options need to be set to `true`: -- Also, the following options need to be set to `true`:
-- --
-- my_ctld.useprefix = true -- this is true by default and MUST BE ON. -- my_ctld.useprefix = true -- this is true by default and MUST BE ON.
-- --
-- ### 5.2 Integrate Hercules ground crew loadable objects
--
-- Add ground crew loadable objects to your CTLD instance like so, where `my_ctld` is the previously created CTLD instance:
--
-- local herccargo = CTLD_HERCULES:New("blue", "Hercules Test", my_ctld)
--
-- You also need:
--
-- * A template called "Infantry" for 10 Paratroopers (as set via herccargo.infantrytemplate).
-- * Depending on what you are loading with the help of the ground crew, there are 42 more templates for the various vehicles that are loadable.
--
-- There's a **quick check output in the `dcs.log`** which tells you what's there and what not.
-- E.g.:
-- ...Checking template for APC BTR-82A Air [24998lb] (BTR-82A) ... MISSING)
-- ...Checking template for ART 2S9 NONA Skid [19030lb] (SAU 2-C9) ... MISSING)
-- ...Checking template for EWR SBORKA Air [21624lb] (Dog Ear radar) ... MISSING)
-- ...Checking template for Transport Tigr Air [15900lb] (Tigr_233036) ... OK)
--
-- Expected template names are the ones in the rounded brackets.
--
-- Standard transport capabilities as per the real Hercules are: -- Standard transport capabilities as per the real Hercules are:
-- --
-- ["Hercules"] = {type="Hercules", crates=true, troops=true, cratelimit = 7, trooplimit = 64}, -- 19t cargo, 64 paratroopers -- ["Hercules"] = {type="Hercules", crates=true, troops=true, cratelimit = 7, trooplimit = 64}, -- 19t cargo, 64 paratroopers
@ -3787,8 +3814,8 @@ end
local ucoord = Unit:GetCoordinate() local ucoord = Unit:GetCoordinate()
local gheight = ucoord:GetLandHeight() local gheight = ucoord:GetLandHeight()
local aheight = uheight - gheight -- height above ground local aheight = uheight - gheight -- height above ground
local maxh = self.HercMinAngels-- 1500m local minh = self.HercMinAngels-- 1500m
local minh = self.HercMaxAngels -- 5000m local maxh = self.HercMaxAngels -- 5000m
local maxspeed = self.HercMaxSpeed -- 77 mps local maxspeed = self.HercMaxSpeed -- 77 mps
-- DONE: TEST - Speed test for Herc, should not be above 280kph/150kn -- DONE: TEST - Speed test for Herc, should not be above 280kph/150kn
local kmspeed = uspeed * 3.6 local kmspeed = uspeed * 3.6

View File

@ -4748,11 +4748,15 @@ function OPSGROUP:RouteToMission(mission, delay)
local armorwaypointcoord = nil local armorwaypointcoord = nil
if mission.type==AUFTRAG.Type.ARMORATTACK then if mission.type==AUFTRAG.Type.ARMORATTACK then
local target=mission.engageTarget:GetObject() -- Wrapper.Positionable#POSITIONABLE local target=mission.engageTarget:GetObject() -- Wrapper.Positionable#POSITIONABLE
local zone = ZONE_RADIUS:New("AttackZone",target:GetVec2(),1000) --BASE:I({mission.DCStask})
--BASE:I({mission.DCStask.params})
--local zone = ZONE_RADIUS:New("AttackZone",target:GetVec2(),1000)
local zone = mission.DCStask.params.tzone -- Core.Zone#ZONE_RADIUS
-- final WP -- final WP
waypointcoord=zone:GetRandomCoordinate(0, 100, surfacetypes) -- Core.Point#COORDINATE waypointcoord=zone:GetRandomCoordinate(0, 100, surfacetypes) -- Core.Point#COORDINATE
-- Ingress - add formation to this one -- Ingress - add formation to this one
armorwaypointcoord = zone:GetRandomCoordinate(1000, 500, surfacetypes) -- Core.Point#COORDINATE armorwaypointcoord = zone:GetRandomCoordinate(1000, 500, surfacetypes) -- Core.Point#COORDINATE
self:__EngageTarget(2,target)
end end
-- Add enroute tasks. -- Add enroute tasks.

View File

@ -990,8 +990,12 @@ function TARGET:GetTargetVec3(Target)
if object and object:IsAlive() then if object and object:IsAlive() then
local vec3=object:GetVec3() local vec3=object:GetVec3()
return vec3
if vec3 then
return vec3
else
return nil
end
else else
return nil return nil

View File

@ -316,6 +316,9 @@ AIRBASE.PersianGulf = {
-- * AIRBASE.TheChannel.Lympne -- * AIRBASE.TheChannel.Lympne
-- * AIRBASE.TheChannel.Detling -- * AIRBASE.TheChannel.Detling
-- * AIRBASE.TheChannel.High_Halden -- * AIRBASE.TheChannel.High_Halden
-- * AIRBASE.TheChannel.Biggin_Hill
-- * AIRBASE.TheChannel.Eastchurch
-- * AIRBASE.TheChannel.Headcorn
-- --
-- @field TheChannel -- @field TheChannel
AIRBASE.TheChannel = { AIRBASE.TheChannel = {
@ -328,6 +331,9 @@ AIRBASE.TheChannel = {
["Lympne"] = "Lympne", ["Lympne"] = "Lympne",
["Detling"] = "Detling", ["Detling"] = "Detling",
["High_Halden"] = "High Halden", ["High_Halden"] = "High Halden",
["Biggin_Hill"] = "Biggin Hill",
["Eastchurch"] = "Eastchurch",
["Headcorn"] = "Headcorn",
} }
--- Airbases of the Syria map: --- Airbases of the Syria map:
@ -346,7 +352,6 @@ AIRBASE.TheChannel = {
-- * AIRBASE.Syria.Wujah_Al_Hajar -- * AIRBASE.Syria.Wujah_Al_Hajar
-- * AIRBASE.Syria.Al_Dumayr -- * AIRBASE.Syria.Al_Dumayr
-- * AIRBASE.Syria.Gazipasa -- * AIRBASE.Syria.Gazipasa
-- * AIRBASE.Syria.Ru_Convoy_4
-- * AIRBASE.Syria.Hatay -- * AIRBASE.Syria.Hatay
-- * AIRBASE.Syria.Nicosia -- * AIRBASE.Syria.Nicosia
-- * AIRBASE.Syria.Pinarbashi -- * AIRBASE.Syria.Pinarbashi
@ -364,7 +369,6 @@ AIRBASE.TheChannel = {
-- * AIRBASE.Syria.Akrotiri -- * AIRBASE.Syria.Akrotiri
-- * AIRBASE.Syria.Naqoura -- * AIRBASE.Syria.Naqoura
-- * AIRBASE.Syria.Gaziantep -- * AIRBASE.Syria.Gaziantep
-- * AIRBASE.Syria.CVN_71
-- * AIRBASE.Syria.Sayqal -- * AIRBASE.Syria.Sayqal
-- * AIRBASE.Syria.Tiyas -- * AIRBASE.Syria.Tiyas
-- * AIRBASE.Syria.Shayrat -- * AIRBASE.Syria.Shayrat
@ -412,7 +416,7 @@ AIRBASE.Syria={
["Wujah_Al_Hajar"]="Wujah Al Hajar", ["Wujah_Al_Hajar"]="Wujah Al Hajar",
["Al_Dumayr"]="Al-Dumayr", ["Al_Dumayr"]="Al-Dumayr",
["Gazipasa"]="Gazipasa", ["Gazipasa"]="Gazipasa",
["Ru_Convoy_4"]="Ru Convoy-4", --["Ru_Convoy_4"]="Ru Convoy-4",
["Hatay"]="Hatay", ["Hatay"]="Hatay",
["Nicosia"]="Nicosia", ["Nicosia"]="Nicosia",
["Pinarbashi"]="Pinarbashi", ["Pinarbashi"]="Pinarbashi",
@ -460,6 +464,7 @@ AIRBASE.Syria={
["Ruwayshid"]="Ruwayshid", ["Ruwayshid"]="Ruwayshid",
["Sanliurfa"]="Sanliurfa", ["Sanliurfa"]="Sanliurfa",
["Tal_Siman"]="Tal Siman", ["Tal_Siman"]="Tal Siman",
["Deir_ez-Zor"] = "Deir ez-Zor",
} }
--- Airbases of the Mariana Islands map: --- Airbases of the Mariana Islands map: