Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank
2024-01-01 21:54:51 +01:00
50 changed files with 2571 additions and 1278 deletions

View File

@@ -890,7 +890,7 @@ _ATIS = {}
--- ATIS class version.
-- @field #string version
ATIS.version = "0.10.4"
ATIS.version = "1.0.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -1528,12 +1528,12 @@ end
--- Use SRS Simple-Text-To-Speech for transmissions. No sound files necessary.
-- @param #ATIS self
-- @param #string PathToSRS Path to SRS directory.
-- @param #string PathToSRS Path to SRS directory (only necessary if SRS exe backend is used).
-- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Culture Culture, e.g. "en-GB" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Port SRS port. Default 5002.
-- @param #string GoogleKey Path to Google JSON-Key.
-- @param #string GoogleKey Path to Google JSON-Key (SRS exe backend) or Google API key (DCS-gRPC backend).
-- @return #ATIS self
function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey)
if PathToSRS or MSRS.path then

View File

@@ -8212,7 +8212,7 @@ function AIRBOSS:OnEventBirth( EventData )
self:E( EventData )
return
end
if EventData.IniUnit == nil then
if EventData.IniUnit == nil and (not EventData.IniObjectCategory == Object.Category.STATIC) then
self:E( self.lid .. "ERROR: EventData.IniUnit=nil in event BIRTH!" )
self:E( EventData )
return
@@ -11197,7 +11197,7 @@ function AIRBOSS:_AttitudeMonitor( playerData )
end
text = text .. string.format( "\nPitch=%.1f° | Roll=%.1f° | Yaw=%.1f°", pitch, roll, yaw )
text = text .. string.format( "\nClimb Angle=%.1f° | Rate=%d ft/min", unit:GetClimbAngle(), velo.y * 196.85 )
local dist = self:_GetOptLandingCoordinate():Get3DDistance( playerData.unit )
local dist = self:_GetOptLandingCoordinate():Get3DDistance( playerData.unit:GetVec3() )
-- Get player velocity in km/h.
local vplayer = playerData.unit:GetVelocityKMH()
-- Get carrier velocity in km/h.
@@ -14957,7 +14957,7 @@ function AIRBOSS:SetSRSPilotVoice( Voice, Gender, Culture )
self.PilotRadio.gender = Gender or "male"
self.PilotRadio.culture = Culture or "en-US"
if (not Voice) and self.SRS and self.SRS.google then
if (not Voice) and self.SRS and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J
end

View File

@@ -1861,6 +1861,7 @@ function ARMYGROUP:_UpdateEngageTarget()
else
-- Could not get position of target (not alive any more?) ==> Disengage.
self:T(self.lid.."Could not get position of target ==> Disengage!")
self:Disengage()
end
@@ -1868,6 +1869,7 @@ function ARMYGROUP:_UpdateEngageTarget()
else
-- Target not alive any more ==> Disengage.
self:T(self.lid.."Target not ALIVE ==> Disengage!")
self:Disengage()
end

View File

@@ -31,7 +31,7 @@
-- @image OPS_CSAR.jpg
-- Date: May 2023
-- Last: Update Oct 2024
-- Last: Update Dec 2024
-------------------------------------------------------------------------
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM

View File

@@ -1228,7 +1228,7 @@ CTLD.UnitTypeCapabilities = {
--- CTLD class version.
-- @field #string version
CTLD.version="1.0.44"
CTLD.version="1.0.45"
--- Instantiate a new CTLD.
-- @param #CTLD self
@@ -1443,6 +1443,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
-- @param #number delay Delay in seconds.
--- Triggers the FSM event "Stop". Stops the CTLD and all its event handlers.
-- @function [parent=#CTLD] Stop
-- @param #CTLD self
--- Triggers the FSM event "Stop" after a delay. Stops the CTLD and all its event handlers.
@@ -2454,11 +2455,13 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop, pack)
realcargo = CTLD_CARGO:New(self.CargoCounter,cratename,templ,sorte,true,false,cratesneeded,self.Spawned_Crates[self.CrateCounter],true,cargotype.PerCrateMass,nil,subcat)
table.insert(droppedcargo,realcargo)
else
realcargo = CTLD_CARGO:New(self.CargoCounter,cratename,templ,sorte,false,false,cratesneeded,self.Spawned_Crates[self.CrateCounter],false,cargotype.PerCrateMass,nil,subcat)
Cargo:RemoveStock()
realcargo = CTLD_CARGO:New(self.CargoCounter,cratename,templ,sorte,false,false,cratesneeded,self.Spawned_Crates[self.CrateCounter],false,cargotype.PerCrateMass,nil,subcat)
end
table.insert(self.Spawned_Cargo, realcargo)
end
if not (drop or pack) then
Cargo:RemoveStock()
end
local text = string.format("Crates for %s have been positioned near you!",cratename)
if drop then
text = string.format("Crates for %s have been dropped!",cratename)
@@ -3824,7 +3827,7 @@ end
-- @param #CTLD_CARGO.Enum Type Type of cargo. I.e. VEHICLE or FOB. VEHICLE will move to destination zones when dropped/build, FOB stays put.
-- @param #number NoCrates Number of crates needed to build this cargo.
-- @param #number PerCrateMass Mass in kg of each crate
-- @param #number Stock Number of groups in stock. Nil for unlimited.
-- @param #number Stock Number of buildable groups in stock. Nil for unlimited.
-- @param #string SubCategory Name of sub-category (optional).
function CTLD:AddCratesCargo(Name,Templates,Type,NoCrates,PerCrateMass,Stock,SubCategory)
self:T(self.lid .. " AddCratesCargo")

View File

@@ -141,14 +141,14 @@
-- -- **Note** If you need different tanker types, i.e. Boom and Drogue, set them up at different AirWings!
-- -- Add a tanker point
-- mywing:AddPatrolPointTanker(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone Tanker"):GetCoordinate(),20000,280,270,50)
-- -- Add an AWACS squad - Radio 251 AM, TACAN 51Y
-- -- Add a tanker squad - Radio 251 AM, TACAN 51Y
-- mywing:AddTankerSquadron("Blue Tanker","Tanker Ops Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.EXCELLENT,602,nil,251,radio.modulation.AM,51)
--
-- ### Add an AWACS (optional)
--
-- -- Add an AWACS point
-- mywing:AddPatrolPointAwacs(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone AWACS"):GetCoordinate(),25000,300,270,50)
-- -- Add a tanker squad - Radio 251 AM, TACAN 51Y
-- -- Add an AWACS squad - Radio 251 AM, TACAN 51Y
-- mywing:AddAWACSSquadron("Blue AWACS","AWACS Ops Kutaisi",AIRBASE.Caucasus.Kutaisi,20,AI.Skill.AVERAGE,702,nil,271,radio.modulation.AM)
--
-- # Fine-Tuning

View File

@@ -4424,14 +4424,11 @@ end
-- Misc Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Add parking guard in front of a parking aircraft.
--- [INTERNAL] Add parking guard in front of a parking aircraft - delayed for MP.
-- @param #FLIGHTCONTROL self
-- @param Wrapper.Unit#UNIT unit The aircraft.
function FLIGHTCONTROL:SpawnParkingGuard(unit)
if unit and self.parkingGuard then
-- Position of the unit.
function FLIGHTCONTROL:_SpawnParkingGuard(unit)
-- Position of the unit.
local coordinate=unit:GetCoordinate()
-- Parking spot.
@@ -4478,6 +4475,17 @@ function FLIGHTCONTROL:SpawnParkingGuard(unit)
else
self:E(self.lid.."ERROR: Parking Guard already exists!")
end
end
--- Add parking guard in front of a parking aircraft.
-- @param #FLIGHTCONTROL self
-- @param Wrapper.Unit#UNIT unit The aircraft.
function FLIGHTCONTROL:SpawnParkingGuard(unit)
if unit and self.parkingGuard then
-- Schedule delay so in MP we get the heading of the client's plane
self:ScheduleOnce(1,FLIGHTCONTROL._SpawnParkingGuard,self,unit)
end

View File

@@ -526,11 +526,11 @@ function TARGET:IsAlive()
for _,_target in pairs(self.targets) do
local target=_target --Ops.Target#TARGET.Object
if target.Status==TARGET.ObjectStatus.ALIVE then
if target.Status~=TARGET.ObjectStatus.DEAD then
return true
end
end
return false
end