Compare commits

..

28 Commits

Author SHA1 Message Date
Applevangelist
93a8d8bc2d Merge remote-tracking branch 'origin/master' into develop 2025-06-15 17:02:35 +02:00
Applevangelist
cbcc893ce5 #CTLD - avoid smoking runways on airbase zones 2025-06-15 17:01:58 +02:00
Applevangelist
c19713949d Merge remote-tracking branch 'origin/master' into develop 2025-06-15 15:42:57 +02:00
Applevangelist
54450935a1 Merge remote-tracking branch 'origin/develop' into develop 2025-06-15 15:42:37 +02:00
Applevangelist
d0f5712ca8 #AUFTRAG - Allow CAP Auftrag w/o Zone 2025-06-15 15:42:33 +02:00
Applevangelist
382b049c5f #AIRBASE - Syria and Sinai few names corrected 2025-06-15 15:38:12 +02:00
Thomas
6c2cc37abe Merge pull request #2315 from FlightControl-Master/master
Update Airbase.lua
2025-06-15 13:15:30 +02:00
Thomas
a53763221c Update Airbase.lua
Correct afb name gor Borg al arab on Sinai
2025-06-15 13:14:05 +02:00
Thomas
83447a3fb4 Merge pull request #2314 from FlightControl-Master/master
Csar
2025-06-15 10:19:19 +02:00
Thomas
b7bac28113 Merge pull request #2313 from FlightControl-Master/Applevangelist-patch-1
Update CSAR.lua
2025-06-15 10:18:01 +02:00
Thomas
a9edb16554 Update CSAR.lua
Make static and zone mash SETs dynamic
2025-06-15 10:17:32 +02:00
Applevangelist
52cbb7202c #EASYGCICAP - more noob catches 2025-06-12 09:09:38 +02:00
Frank
f6a8317c42 Merge branch 'develop' of https://github.com/FlightControl-Master/MOOSE into develop 2025-06-10 21:58:21 +02:00
Frank
2a9a7db9b8 OPSGROUP
- Improved behaviour when mission is unpaused and groups are teleported
2025-06-10 21:58:19 +02:00
Applevangelist
3aeec78f79 Merge remote-tracking branch 'origin/master' into develop 2025-06-10 18:05:58 +02:00
Applevangelist
0aeb1fc6af #UTILS - Small fix for GetReportingName to distinguish Shark from Mainstay 2025-06-10 18:05:02 +02:00
Applevangelist
26565d7549 #EASYGCICAP - Added noob/fatfinger checks for airbase static warehouses and CAP point airwing names 2025-06-10 09:25:00 +02:00
Applevangelist
62816f217b Merge remote-tracking branch 'origin/master' into develop 2025-06-08 18:43:35 +02:00
Applevangelist
eeeeda4e5e #POINT - Offset options for smoke 2025-06-08 18:43:01 +02:00
Applevangelist
95767c5ef4 AIRBOSS - Remove useless E Messages for non-debug 2025-06-01 12:20:08 +02:00
Applevangelist
f5881eda53 AIRBOSS - Remove useless E Messages for non-debug 2025-06-01 12:19:42 +02:00
Applevangelist
fca6faa3a8 xx 2025-05-30 20:51:04 +02:00
Thomas
c1997d9f70 Merge pull request #2311 from FlightControl-Master/Applevangelist-patch-1
Update CSAR.lua
2025-05-30 18:37:50 +02:00
Thomas
bb1caa6642 Update CSAR.lua 2025-05-30 18:37:38 +02:00
Thomas
638f083729 Merge pull request #2310 from shaji-Dev/develop
CSAR Downed Pilot Queue
2025-05-30 18:36:33 +02:00
shaji
59d41cf98b - [ADDED] Removes previous downed pilot with the same player name in Ejection event
- [ADDED] `useFIFOLimitReplacement` If true, it will remove the oldest downed pilot when a new one is added, if the limit is reached (FIFO queue), otherwise does not add downed pilots when the limit is reached.
2025-05-30 16:03:01 +02:00
Applevangelist
793adafda7 Merge remote-tracking branch 'origin/master' into develop 2025-05-30 11:14:33 +02:00
Applevangelist
dd5ca93f26 CSAR Small addition 2025-05-30 11:13:50 +02:00
11 changed files with 258 additions and 77 deletions

View File

@@ -59,6 +59,10 @@ do -- COORDINATE
-- * @{#COORDINATE.SmokeOrange}(): To smoke the point in orange. -- * @{#COORDINATE.SmokeOrange}(): To smoke the point in orange.
-- * @{#COORDINATE.SmokeWhite}(): To smoke the point in white. -- * @{#COORDINATE.SmokeWhite}(): To smoke the point in white.
-- * @{#COORDINATE.SmokeGreen}(): To smoke the point in green. -- * @{#COORDINATE.SmokeGreen}(): To smoke the point in green.
-- * @{#COORDINATE.SetSmokeOffsetDirection}(): To set an offset point direction for smoke.
-- * @{#COORDINATE.SetSmokeOffsetDistance}(): To set an offset point distance for smoke.
-- * @{#COORDINATE.SwitchSmokeOffsetOn}(): To set an offset point for smoke to on.
-- * @{#COORDINATE.SwitchSmokeOffsetOff}(): To set an offset point for smoke to off.
-- --
-- ## 2.2) Flare -- ## 2.2) Flare
-- --
@@ -2124,21 +2128,32 @@ do -- COORDINATE
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min. -- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds. -- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @param #string Name (Optional) Name if you want to stop the smoke early (normal duration: 5mins) -- @param #string Name (Optional) Name if you want to stop the smoke early (normal duration: 5mins)
-- @param #boolean Offset (Optional) If true, offset the smokle a bit.
-- @param #number Direction (Optional) If Offset is true this is the direction of the offset, 1-359 (degrees). Default random.
-- @param #number Distance (Optional) If Offset is true this is the distance of the offset in meters. Default random 10-20.
-- @return #COORDINATE self -- @return #COORDINATE self
function COORDINATE:Smoke( SmokeColor, Duration, Delay, Name) function COORDINATE:Smoke( SmokeColor, Duration, Delay, Name, Offset,Direction,Distance)
self:F2( { SmokeColor, Name, Duration, Delay } ) self:F2( { SmokeColor, Name, Duration, Delay, Offset } )
SmokeColor=SmokeColor or SMOKECOLOR.Green SmokeColor=SmokeColor or SMOKECOLOR.Green
if Delay and Delay>0 then if Delay and Delay>0 then
self:ScheduleOnce(Delay, COORDINATE.Smoke, self, SmokeColor, Duration, 0, Name) self:ScheduleOnce(Delay, COORDINATE.Smoke, self, SmokeColor, Duration, 0, Name, Direction,Distance)
else else
-- Create a name which is used to stop the smoke manually -- Create a name which is used to stop the smoke manually
self.firename = Name or "Smoke-"..math.random(1,100000) self.firename = Name or "Smoke-"..math.random(1,100000)
-- Create smoke -- Create smoke
trigger.action.smoke( self:GetVec3(), SmokeColor, self.firename ) if Offset or self.SmokeOffset then
local Angle = Direction or self:GetSmokeOffsetDirection()
local Distance = Distance or self:GetSmokeOffsetDistance()
local newpos = self:Translate(Distance,Angle,true,false)
local newvec3 = newpos:GetVec3()
trigger.action.smoke( newvec3, SmokeColor, self.firename )
else
trigger.action.smoke( self:GetVec3(), SmokeColor, self.firename )
end
-- Stop smoke -- Stop smoke
if Duration and Duration>0 then if Duration and Duration>0 then
@@ -2148,6 +2163,72 @@ do -- COORDINATE
return self return self
end end
--- Get the offset direction when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #number Direction in degrees.
function COORDINATE:GetSmokeOffsetDirection()
local direction = self.SmokeOffsetDirection or math.random(1,359)
return direction
end
--- Set the offset direction when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @param #number Direction (Optional) This is the direction of the offset, 1-359 (degrees). Default random.
-- @return #COORDINATE self
function COORDINATE:SetSmokeOffsetDirection(Direction)
if self then
self.SmokeOffsetDirection = Direction or math.random(1,359)
return self
else
COORDINATE.SmokeOffsetDirection = Direction or math.random(1,359)
end
end
--- Get the offset distance when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #number Distance Distance in meters.
function COORDINATE:GetSmokeOffsetDistance()
local distance = self.SmokeOffsetDistance or math.random(10,20)
return distance
end
--- Set the offset distance when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @param #number Distance (Optional) This is the distance of the offset in meters. Default random 10-20.
-- @return #COORDINATE self
function COORDINATE:SetSmokeOffsetDistance(Distance)
if self then
self.SmokeOffsetDistance = Distance or math.random(10,20)
return self
else
COORDINATE.SmokeOffsetDistance = Distance or math.random(10,20)
end
end
--- Set the offset on when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #COORDINATE self
function COORDINATE:SwitchSmokeOffsetOn()
if self then
self.SmokeOffset = true
return self
else
COORDINATE.SmokeOffset = true
end
end
--- Set the offset off when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #COORDINATE self
function COORDINATE:SwitchSmokeOffsetOff()
if self then
self.SmokeOffset = false
return self
else
COORDINATE.SmokeOffset = false
end
end
--- Stops smoking the point in a color. --- Stops smoking the point in a color.
-- @param #COORDINATE self -- @param #COORDINATE self

View File

@@ -3091,8 +3091,7 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
self.SRS:SetVolume(Volume or 1) self.SRS:SetVolume(Volume or 1)
--self.SRS:SetModulations(Modulations) --self.SRS:SetModulations(Modulations)
if GoogleCreds then if GoogleCreds then
self.SRS:SetProviderOptionsGoogle(GoogleCreds,GoogleCreds) self.SRS:SetGoogle(GoogleCreds)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
end end
if Voice then if Voice then
self.SRS:SetVoice(Voice) self.SRS:SetVoice(Voice)
@@ -3642,7 +3641,6 @@ function AIRBOSS:onafterStart( From, Event, To )
self:HandleEvent( EVENTS.PlayerLeaveUnit, self._PlayerLeft ) self:HandleEvent( EVENTS.PlayerLeaveUnit, self._PlayerLeft )
self:HandleEvent( EVENTS.MissionEnd ) self:HandleEvent( EVENTS.MissionEnd )
self:HandleEvent( EVENTS.RemoveUnit ) self:HandleEvent( EVENTS.RemoveUnit )
self:HandleEvent( EVENTS.UnitLost, self.OnEventRemoveUnit )
-- self.StatusScheduler=SCHEDULER:New(self) -- self.StatusScheduler=SCHEDULER:New(self)
-- self.StatusScheduler:Schedule(self, self._Status, {}, 1, 0.5) -- self.StatusScheduler:Schedule(self, self._Status, {}, 1, 0.5)
@@ -8743,13 +8741,13 @@ function AIRBOSS:OnEventRemoveUnit( EventData )
-- Nil checks. -- Nil checks.
if EventData == nil then if EventData == nil then
self:E( self.lid .. "ERROR: EventData=nil in event REMOVEUNIT!" ) self:T( self.lid .. "ERROR: EventData=nil in event REMOVEUNIT!" )
self:E( EventData ) self:T( EventData )
return return
end end
if EventData.IniUnit == nil then if EventData.IniUnit == nil then
self:E( self.lid .. "ERROR: EventData.IniUnit=nil in event REMOVEUNIT!" ) self:T( self.lid .. "ERROR: EventData.IniUnit=nil in event REMOVEUNIT!" )
self:E( EventData ) self:T( EventData )
return return
end end

View File

@@ -1428,7 +1428,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
mission:_SetLogID() mission:_SetLogID()
-- DCS task parameters: -- DCS task parameters:
mission.engageZone=ZoneCAP mission.engageZone=ZoneCAP or Coordinate
mission.engageTargetTypes=TargetTypes or {"Air"} mission.engageTargetTypes=TargetTypes or {"Air"}
-- Mission options: -- Mission options:
@@ -4822,6 +4822,11 @@ function AUFTRAG:CheckGroupsDone()
self:T(self.lid..string.format("CheckGroupsDone: Mission is STARTED state %s [FSM=%s] but count of alive OPSGROUP is zero. Mission DONE!", self.status, self:GetState())) self:T(self.lid..string.format("CheckGroupsDone: Mission is STARTED state %s [FSM=%s] but count of alive OPSGROUP is zero. Mission DONE!", self.status, self:GetState()))
return true return true
end end
if (self:IsStarted() or self:IsExecuting()) and self:CountOpsGroups()>0 then
self:T(self.lid..string.format("CheckGroupsDone: Mission is STARTED state %s [FSM=%s] and count of alive OPSGROUP > zero. Mission NOT DONE!", self.status, self:GetState()))
return true
end
return true return true
end end
@@ -6150,8 +6155,16 @@ function AUFTRAG:GetDCSMissionTask()
----------------- -----------------
-- CAP Mission -- -- CAP Mission --
----------------- -----------------
local DCStask=CONTROLLABLE.EnRouteTaskEngageTargetsInZone(nil, self.engageZone:GetVec2(), self.engageZone:GetRadius(), self.engageTargetTypes, Priority) local Vec2 = self.engageZone:GetVec2()
local Radius
if self.engageZone:IsInstanceOf("COORDINATE") then
Radius = UTILS.NMToMeters(20)
else
Radius = self.engageZone:GetRadius()
end
local DCStask=CONTROLLABLE.EnRouteTaskEngageTargetsInZone(nil, Vec2, Radius, self.engageTargetTypes, Priority)
table.insert(self.enrouteTasks, DCStask) table.insert(self.enrouteTasks, DCStask)
@@ -6305,9 +6318,35 @@ function AUFTRAG:GetDCSMissionTask()
-- Add enroute task SEAD. Disabled that here because the group enganges everything on its route. -- Add enroute task SEAD. Disabled that here because the group enganges everything on its route.
--local DCStask=CONTROLLABLE.EnRouteTaskSEAD(nil, self.TargetType) --local DCStask=CONTROLLABLE.EnRouteTaskSEAD(nil, self.TargetType)
--table.insert(self.enrouteTasks, DCStask) --table.insert(self.enrouteTasks, DCStask)
self:_GetDCSAttackTask(self.engageTarget, DCStasks) if self.engageZone then
--local DCStask=CONTROLLABLE.EnRouteTaskSEAD(nil, self.engageTargetTypes)
--table.insert(self.enrouteTasks, DCStask)
self.engageZone:Scan({Object.Category.UNIT},{Unit.Category.GROUND_UNIT})
local ScanUnitSet = self.engageZone:GetScannedSetUnit()
local SeadUnitSet = SET_UNIT:New()
for _,_unit in pairs (ScanUnitSet.Set) do
local unit = _unit -- Wrapper.Unit#UNTI
if unit and unit:IsAlive() and unit:HasSEAD() then
self:T("Adding UNIT for SEAD: "..unit:GetName())
local task = CONTROLLABLE.TaskAttackUnit(nil,unit,GroupAttack,AI.Task.WeaponExpend.ALL,1,Direction,self.engageAltitude,4161536)
table.insert(DCStasks, task)
SeadUnitSet:AddUnit(unit)
end
end
self.engageTarget = TARGET:New(SeadUnitSet)
--local OrbitTask = CONTROLLABLE.TaskOrbitCircle(nil,self.engageAltitude,self.missionSpeed,self.engageZone:GetCoordinate())
--local Point = self.engageZone:GetVec2()
--local OrbitTask = CONTROLLABLE.TaskOrbitCircleAtVec2(nil,Point,self.engageAltitude,self.missionSpeed)
--table.insert(DCStasks, OrbitTask)
else
self:_GetDCSAttackTask(self.engageTarget, DCStasks)
end
elseif self.type==AUFTRAG.Type.STRIKE then elseif self.type==AUFTRAG.Type.STRIKE then
-------------------- --------------------

View File

@@ -263,6 +263,7 @@ CSAR = {
rescuedpilots = 0, rescuedpilots = 0,
limitmaxdownedpilots = true, limitmaxdownedpilots = true,
maxdownedpilots = 10, maxdownedpilots = 10,
useFIFOLimitReplacement = false, -- If true, it will remove the oldest downed pilot when a new one is added, if the limit is reached.
allheligroupset = nil, allheligroupset = nil,
topmenuname = "CSAR", topmenuname = "CSAR",
ADFRadioPwr = 1000, ADFRadioPwr = 1000,
@@ -313,7 +314,7 @@ CSAR.AircraftType["CH-47Fbl1"] = 31
--- CSAR class version. --- CSAR class version.
-- @field #string version -- @field #string version
CSAR.version="1.0.32" CSAR.version="1.0.33"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list -- ToDo list
@@ -1144,19 +1145,8 @@ function CSAR:_EventHandler(EventData)
self:T("Double Ejection!") self:T("Double Ejection!")
return self return self
end end
-- limit no of pilots in the field.
if self.limitmaxdownedpilots and self:_ReachedPilotLimit() then
self:T("Maxed Downed Pilot!")
return self
end
-- TODO: Over water check --- EVENTS.LandingAfterEjection NOT triggered by DCS, so handle csarUsePara = true case
-- might create dual pilots in edge cases
local wetfeet = false
local initdcscoord = nil local initdcscoord = nil
local initcoord = nil local initcoord = nil
if _event.id == EVENTS.Ejection then if _event.id == EVENTS.Ejection then
@@ -1168,6 +1158,36 @@ function CSAR:_EventHandler(EventData)
initcoord = COORDINATE:NewFromVec3(initdcscoord) initcoord = COORDINATE:NewFromVec3(initdcscoord)
self:T({initdcscoord}) self:T({initdcscoord})
end end
-- Remove downed pilot if already exists to replace with new one.
if _event.IniPlayerName then
local PilotTable = self.downedPilots --#CSAR.DownedPilot
local _foundPilot = nil
for _,_pilot in pairs(PilotTable) do
if _pilot.player == _event.IniPlayerName and _pilot.alive == true then
_foundPilot = _pilot
break
end
end
if _foundPilot then
self:T("Downed pilot already exists!")
_foundPilot.group:Destroy(false)
self:_RemoveNameFromDownedPilots(_foundPilot.name)
self:_CheckDownedPilotTable()
end
end
-- limit no of pilots in the field.
if self.limitmaxdownedpilots and self:_ReachedPilotLimit() then
self:T("Maxed Downed Pilot!")
return self
end
-- TODO: Over water check --- EVENTS.LandingAfterEjection NOT triggered by DCS, so handle csarUsePara = true case
-- might create dual pilots in edge cases
local wetfeet = false
--local surface = _unit:GetCoordinate():GetSurfaceType() --local surface = _unit:GetCoordinate():GetSurfaceType()
local surface = initcoord:GetSurfaceType() local surface = initcoord:GetSurfaceType()
@@ -2116,7 +2136,8 @@ end
--- (Internal) Determine distance to closest MASH. --- (Internal) Determine distance to closest MASH.
-- @param #CSAR self -- @param #CSAR self
-- @param Wrapper.Unit#UNIT _heli Helicopter #UNIT -- @param Wrapper.Unit#UNIT _heli Helicopter #UNIT
-- @return #CSAR self -- @return #number Distance in meters
-- @return #string MASH Name as string
function CSAR:_GetClosestMASH(_heli) function CSAR:_GetClosestMASH(_heli)
self:T(self.lid .. " _GetClosestMASH") self:T(self.lid .. " _GetClosestMASH")
local _mashset = self.mash -- Core.Set#SET_GROUP local _mashset = self.mash -- Core.Set#SET_GROUP
@@ -2128,31 +2149,13 @@ function CSAR:_GetClosestMASH(_heli)
local _shortestDistance = -1 local _shortestDistance = -1
local _distance = 0 local _distance = 0
local _helicoord = _heli:GetCoordinate() local _helicoord = _heli:GetCoordinate()
local MashName = nil
local function GetCloseAirbase(coordinate,Coalition,Category)
local a=coordinate:GetVec3()
local distmin=math.huge
local airbase=nil
for DCSairbaseID, DCSairbase in pairs(world.getAirbases(Coalition)) do
local b=DCSairbase:getPoint()
local c=UTILS.VecSubstract(a,b)
local dist=UTILS.VecNorm(c)
if dist<distmin and (Category==nil or Category==DCSairbase:getDesc().category) then
distmin=dist
airbase=DCSairbase
end
end
return distmin
end
if self.allowFARPRescue then if self.allowFARPRescue then
local position = _heli:GetCoordinate() local position = _heli:GetCoordinate()
local afb,distance = position:GetClosestAirbase(nil,self.coalition) local afb,distance = position:GetClosestAirbase(nil,self.coalition)
_shortestDistance = distance _shortestDistance = distance
MashName = (afb ~= nil) and afb:GetName() or "Unknown"
end end
for _,_mashes in pairs(MashSets) do for _,_mashes in pairs(MashSets) do
@@ -2166,12 +2169,13 @@ function CSAR:_GetClosestMASH(_heli)
_distance = self:_GetDistance(_helicoord, _mashcoord) _distance = self:_GetDistance(_helicoord, _mashcoord)
if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then
_shortestDistance = _distance _shortestDistance = _distance
MashName = _mashUnit:GetName() or "Unknown"
end end
end end
end end
if _shortestDistance ~= -1 then if _shortestDistance ~= -1 then
return _shortestDistance return _shortestDistance, MashName
else else
return -1 return -1
end end
@@ -2417,11 +2421,26 @@ function CSAR:_ReachedPilotLimit()
local limit = self.maxdownedpilots local limit = self.maxdownedpilots
local islimited = self.limitmaxdownedpilots local islimited = self.limitmaxdownedpilots
local count = self:_CountActiveDownedPilots() local count = self:_CountActiveDownedPilots()
if islimited and (count >= limit) then if islimited and (count >= limit) then
return true if self.useFIFOLimitReplacement then
else local oldIndex = -1
return false local oldDownedPilot = nil
end for _index, _downedpilot in pairs(self.downedPilots) do
oldIndex = _index
oldDownedPilot = _downedpilot
break
end
if oldDownedPilot then
oldDownedPilot.group:Destroy(false)
oldDownedPilot.alive = false
self:_CheckDownedPilotTable()
return false
end
end
return true
else
return false
end
end end
--- User - Function to add onw SET_GROUP Set-up for pilot filtering and assignment. --- User - Function to add onw SET_GROUP Set-up for pilot filtering and assignment.
@@ -2469,8 +2488,8 @@ function CSAR:onafterStart(From, Event, To)
self.mash = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart() self.mash = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart()
self.staticmashes = SET_STATIC:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterOnce() self.staticmashes = SET_STATIC:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart()
self.zonemashes = SET_ZONE:New():FilterPrefixes(self.mashprefix):FilterOnce() self.zonemashes = SET_ZONE:New():FilterPrefixes(self.mashprefix):FilterStart()
--[[ --[[
if staticmashes:Count() > 0 then if staticmashes:Count() > 0 then

View File

@@ -1414,7 +1414,7 @@ CTLD.FixedWingTypes = {
--- CTLD class version. --- CTLD class version.
-- @field #string version -- @field #string version
CTLD.version="1.3.34" CTLD.version="1.3.35"
--- Instantiate a new CTLD. --- Instantiate a new CTLD.
-- @param #CTLD self -- @param #CTLD self
@@ -5971,16 +5971,22 @@ function CTLD:SmokeZoneNearBy(Unit, Flare)
for index,cargozone in pairs(zones[i]) do for index,cargozone in pairs(zones[i]) do
local CZone = cargozone --#CTLD.CargoZone local CZone = cargozone --#CTLD.CargoZone
local zonename = CZone.name local zonename = CZone.name
local zone = nil local zone = nil -- Core.Zone#ZONE_RADIUS
local airbasezone = false
if i == 4 then if i == 4 then
zone = UNIT:FindByName(zonename) zone = UNIT:FindByName(zonename)
else else
zone = ZONE:FindByName(zonename) zone = ZONE:FindByName(zonename)
if not zone then if not zone then
zone = AIRBASE:FindByName(zonename):GetZone() zone = AIRBASE:FindByName(zonename):GetZone()
airbasezone = true
end end
end end
local zonecoord = zone:GetCoordinate() local zonecoord = zone:GetCoordinate()
-- Avoid smoke/flares on runways
if (i==1 or 1==3) and airbasezone==true and zone:IsInstanceOf("ZONE_BASE") then
zonecoord = zone:GetRandomCoordinate(inner,outer,{land.SurfaceType.LAND})
end
if zonecoord then if zonecoord then
local active = CZone.active local active = CZone.active
local color = CZone.color local color = CZone.color

View File

@@ -261,7 +261,7 @@ EASYGCICAP = {
--- EASYGCICAP class version. --- EASYGCICAP class version.
-- @field #string version -- @field #string version
EASYGCICAP.version="0.1.21" EASYGCICAP.version="0.1.23"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@@ -582,6 +582,13 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
local DespawnAfterLanding = self.DespawnAfterLanding local DespawnAfterLanding = self.DespawnAfterLanding
local DespawnAfterHolding = self.DespawnAfterHolding local DespawnAfterHolding = self.DespawnAfterHolding
-- Check STATIC name
local check = STATIC:FindByName(Airbasename,false)
if check == nil then
MESSAGE:New(self.lid.."There's no warehouse static on the map (wrong naming?) for airbase "..tostring(Airbasename).."!",30,"CHECK"):ToAllIf(self.debug):ToLog()
return
end
-- Create Airwing -- Create Airwing
local CAP_Wing = AIRWING:New(Airbasename,Alias) local CAP_Wing = AIRWING:New(Airbasename,Alias)
CAP_Wing:SetVerbosityLevel(0) CAP_Wing:SetVerbosityLevel(0)
@@ -778,6 +785,11 @@ function EASYGCICAP:_SetTankerPatrolPoints()
self:T(self.lid.."_SetTankerPatrolPoints") self:T(self.lid.."_SetTankerPatrolPoints")
for _,_data in pairs(self.ManagedTK) do for _,_data in pairs(self.ManagedTK) do
local data = _data --#EASYGCICAP.CapPoint local data = _data --#EASYGCICAP.CapPoint
self:T("Airbasename = "..data.AirbaseName)
if not self.wings[data.AirbaseName] then
MESSAGE:New(self.lid.."You are trying to create a TANKER point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
return
end
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
local Coordinate = data.Coordinate local Coordinate = data.Coordinate
local Altitude = data.Altitude local Altitude = data.Altitude
@@ -797,6 +809,11 @@ function EASYGCICAP:_SetAwacsPatrolPoints()
self:T(self.lid.."_SetAwacsPatrolPoints") self:T(self.lid.."_SetAwacsPatrolPoints")
for _,_data in pairs(self.ManagedEWR) do for _,_data in pairs(self.ManagedEWR) do
local data = _data --#EASYGCICAP.CapPoint local data = _data --#EASYGCICAP.CapPoint
self:T("Airbasename = "..data.AirbaseName)
if not self.wings[data.AirbaseName] then
MESSAGE:New(self.lid.."You are trying to create an AWACS point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
return
end
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
local Coordinate = data.Coordinate local Coordinate = data.Coordinate
local Altitude = data.Altitude local Altitude = data.Altitude
@@ -816,6 +833,11 @@ function EASYGCICAP:_SetCAPPatrolPoints()
self:T(self.lid.."_SetCAPPatrolPoints") self:T(self.lid.."_SetCAPPatrolPoints")
for _,_data in pairs(self.ManagedCP) do for _,_data in pairs(self.ManagedCP) do
local data = _data --#EASYGCICAP.CapPoint local data = _data --#EASYGCICAP.CapPoint
self:T("Airbasename = "..data.AirbaseName)
if not self.wings[data.AirbaseName] then
MESSAGE:New(self.lid.."You are trying to create a CAP point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
return
end
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
local Coordinate = data.Coordinate local Coordinate = data.Coordinate
local Altitude = data.Altitude local Altitude = data.Altitude
@@ -835,6 +857,11 @@ function EASYGCICAP:_SetReconPatrolPoints()
self:T(self.lid.."_SetReconPatrolPoints") self:T(self.lid.."_SetReconPatrolPoints")
for _,_data in pairs(self.ManagedREC) do for _,_data in pairs(self.ManagedREC) do
local data = _data --#EASYGCICAP.CapPoint local data = _data --#EASYGCICAP.CapPoint
self:T("Airbasename = "..data.AirbaseName)
if not self.wings[data.AirbaseName] then
MESSAGE:New(self.lid.."You are trying to create a RECON point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
return
end
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
local Coordinate = data.Coordinate local Coordinate = data.Coordinate
local Altitude = data.Altitude local Altitude = data.Altitude

View File

@@ -2002,6 +2002,9 @@ function FLIGHTGROUP:onafterElementAirborne(From, Event, To, Element)
-- Debug info. -- Debug info.
self:T2(self.lid..string.format("Element airborne %s", Element.name)) self:T2(self.lid..string.format("Element airborne %s", Element.name))
-- Set parking spot to free. Also for FC. This is usually done after taxiing but doing it here in case the group is teleported.
self:_SetElementParkingFree(Element)
-- Set element status. -- Set element status.
self:_UpdateStatus(Element, OPSGROUP.ElementStatus.AIRBORNE) self:_UpdateStatus(Element, OPSGROUP.ElementStatus.AIRBORNE)

View File

@@ -5589,10 +5589,13 @@ function OPSGROUP:onafterUnpauseMission(From, Event, To)
-- Debug info. -- Debug info.
self:T(self.lid..string.format("Unpausing mission %s [%s]", mission:GetName(), mission:GetType())) self:T(self.lid..string.format("Unpausing mission %s [%s]", mission:GetName(), mission:GetType()))
-- Set state of mission, e.g. for not teleporting again
mission.unpaused=true
-- Start mission. -- Start mission.
self:MissionStart(mission) self:MissionStart(mission)
-- Remove mission from -- Remove mission from pausedmissions queue
for i,mid in pairs(self.pausedmissions) do for i,mid in pairs(self.pausedmissions) do
--self:T(self.lid..string.format("Checking paused mission", mid)) --self:T(self.lid..string.format("Checking paused mission", mid))
if mid==mission.auftragsnummer then if mid==mission.auftragsnummer then
@@ -6232,7 +6235,7 @@ function OPSGROUP:RouteToMission(mission, delay)
end end
-- Check if group is mobile. Note that some immobile units report a speed of 1 m/s = 3.6 km/h. -- Check if group is mobile. Note that some immobile units report a speed of 1 m/s = 3.6 km/h.
if self.speedMax<=3.6 or mission.teleport then if (self.speedMax<=3.6 or mission.teleport) and not mission.unpaused then
-- Teleport to waypoint coordinate. Mission will not be paused. -- Teleport to waypoint coordinate. Mission will not be paused.
self:Teleport(waypointcoord, nil, true) self:Teleport(waypointcoord, nil, true)

View File

@@ -21,7 +21,7 @@
-- === -- ===
-- @module Ops.PlayerTask -- @module Ops.PlayerTask
-- @image OPS_PlayerTask.jpg -- @image OPS_PlayerTask.jpg
-- @date Last Update April 2025 -- @date Last Update May 2025
do do
@@ -98,7 +98,7 @@ PLAYERTASK = {
--- PLAYERTASK class version. --- PLAYERTASK class version.
-- @field #string version -- @field #string version
PLAYERTASK.version="0.1.26" PLAYERTASK.version="0.1.27"
--- Generic task condition. --- Generic task condition.
-- @type PLAYERTASK.Condition -- @type PLAYERTASK.Condition
@@ -1951,7 +1951,7 @@ function PLAYERTASKCONTROLLER:New(Name, Coalition, Type, ClientFilter)
self.taskinfomenu = false self.taskinfomenu = false
self.activehasinfomenu = false self.activehasinfomenu = false
self.MenuName = nil self.MenuName = nil
self.menuitemlimit = 5 self.menuitemlimit = 6
self.holdmenutime = 30 self.holdmenutime = 30
self.MarkerReadOnly = false self.MarkerReadOnly = false
@@ -2581,7 +2581,7 @@ function PLAYERTASKCONTROLLER:SetMenuOptions(InfoMenu,ItemLimit,HoldTime)
if self.activehasinfomenu then if self.activehasinfomenu then
self:EnableTaskInfoMenu() self:EnableTaskInfoMenu()
end end
self.menuitemlimit = ItemLimit or 5 self.menuitemlimit = ItemLimit+1 or 6
self.holdmenutime = HoldTime or 30 self.holdmenutime = HoldTime or 30
return self return self
end end
@@ -3486,7 +3486,7 @@ end
-- @param #PLAYERTASKCONTROLLER self -- @param #PLAYERTASKCONTROLLER self
-- @param Ops.PlayerTask#PLAYERTASK PlayerTask -- @param Ops.PlayerTask#PLAYERTASK PlayerTask
-- @param #boolean Silent If true, make no "has new task" announcement -- @param #boolean Silent If true, make no "has new task" announcement
-- @param #boolen TaskFilter If true, apply the white/black-list task filters here, also -- @param #boolean TaskFilter If true, apply the white/black-list task filters here, also
-- @return #PLAYERTASKCONTROLLER self -- @return #PLAYERTASKCONTROLLER self
-- @usage -- @usage
-- Example to create a PLAYERTASK of type CTLD and give Players 10 minutes to complete: -- Example to create a PLAYERTASK of type CTLD and give Players 10 minutes to complete:

View File

@@ -1913,6 +1913,13 @@ end
function UTILS.GetReportingName(Typename) function UTILS.GetReportingName(Typename)
local typename = string.lower(Typename) local typename = string.lower(Typename)
-- special cases - Shark and Manstay have "A-50" in the name
if string.find(typename,"ka-50",1,true) then
return "Shark"
elseif string.find(typename,"a-50",1,true) then
return "Mainstay"
end
for name, value in pairs(ENUMS.ReportingName.NATO) do for name, value in pairs(ENUMS.ReportingName.NATO) do
local svalue = string.lower(value) local svalue = string.lower(value)

View File

@@ -449,7 +449,6 @@ AIRBASE.TheChannel = {
-- * AIRBASE.Syria.Al_Dumayr -- * AIRBASE.Syria.Al_Dumayr
-- * AIRBASE.Syria.Al_Qusayr -- * AIRBASE.Syria.Al_Qusayr
-- * AIRBASE.Syria.Aleppo -- * AIRBASE.Syria.Aleppo
-- * AIRBASE.Syria.Amman
-- * AIRBASE.Syria.An_Nasiriyah -- * AIRBASE.Syria.An_Nasiriyah
-- * AIRBASE.Syria.At_Tanf -- * AIRBASE.Syria.At_Tanf
-- * AIRBASE.Syria.Bassel_Al_Assad -- * AIRBASE.Syria.Bassel_Al_Assad
@@ -511,7 +510,7 @@ AIRBASE.TheChannel = {
-- * AIRBASE.Syria.Wujah_Al_Hajar -- * AIRBASE.Syria.Wujah_Al_Hajar
-- * AIRBASE.Syria.Ben_Gurion -- * AIRBASE.Syria.Ben_Gurion
-- * AIRBASE.Syria.Hatzor -- * AIRBASE.Syria.Hatzor
-- * AIRBASE.Syria.Palmashim -- * AIRBASE.Syria.Palmachim
-- * AIRBASE.Syria.Tel_Nof -- * AIRBASE.Syria.Tel_Nof
-- * AIRBASE.Syria.Marka -- * AIRBASE.Syria.Marka
-- --
@@ -523,7 +522,6 @@ AIRBASE.Syria={
["Al_Dumayr"] = "Al-Dumayr", ["Al_Dumayr"] = "Al-Dumayr",
["Al_Qusayr"] = "Al Qusayr", ["Al_Qusayr"] = "Al Qusayr",
["Aleppo"] = "Aleppo", ["Aleppo"] = "Aleppo",
["Amman"] = "Amman",
["An_Nasiriyah"] = "An Nasiriyah", ["An_Nasiriyah"] = "An Nasiriyah",
["At_Tanf"] = "At Tanf", ["At_Tanf"] = "At Tanf",
["Bassel_Al_Assad"] = "Bassel Al-Assad", ["Bassel_Al_Assad"] = "Bassel Al-Assad",
@@ -555,6 +553,7 @@ AIRBASE.Syria={
["Kuweires"] = "Kuweires", ["Kuweires"] = "Kuweires",
["Lakatamia"] = "Lakatamia", ["Lakatamia"] = "Lakatamia",
["Larnaca"] = "Larnaca", ["Larnaca"] = "Larnaca",
["Marka"] = "Marka",
["Marj_Ruhayyil"] = "Marj Ruhayyil", ["Marj_Ruhayyil"] = "Marj Ruhayyil",
["Marj_as_Sultan_North"] = "Marj as Sultan North", ["Marj_as_Sultan_North"] = "Marj as Sultan North",
["Marj_as_Sultan_South"] = "Marj as Sultan South", ["Marj_as_Sultan_South"] = "Marj as Sultan South",
@@ -585,9 +584,8 @@ AIRBASE.Syria={
["Wujah_Al_Hajar"] = "Wujah Al Hajar", ["Wujah_Al_Hajar"] = "Wujah Al Hajar",
["Ben_Gurion"] = "Ben Gurion", ["Ben_Gurion"] = "Ben Gurion",
["Hatzor"] = "Hatzor", ["Hatzor"] = "Hatzor",
["Palmashim"] = "Palmashim", ["Palmachim"] = "Palmachim",
["Tel_Nof"] = "Tel Nof", ["Tel_Nof"] = "Tel Nof",
["Marka"] = "Marka",
} }
--- Airbases of the Mariana Islands map: --- Airbases of the Mariana Islands map:
@@ -691,7 +689,7 @@ AIRBASE.SouthAtlantic={
-- * AIRBASE.Sinai.Bilbeis_Air_Base -- * AIRBASE.Sinai.Bilbeis_Air_Base
-- * AIRBASE.Sinai.Bir_Hasanah -- * AIRBASE.Sinai.Bir_Hasanah
-- * AIRBASE.Sinai.Birma_Air_Base -- * AIRBASE.Sinai.Birma_Air_Base
-- * AIRBASE.Sinai.Borj_El_Arab_International_Airport -- * AIRBASE.Sinai.Borg_El_Arab_International_Airport
-- * AIRBASE.Sinai.Cairo_International_Airport -- * AIRBASE.Sinai.Cairo_International_Airport
-- * AIRBASE.Sinai.Cairo_West -- * AIRBASE.Sinai.Cairo_West
-- * AIRBASE.Sinai.Difarsuwar_Airfield -- * AIRBASE.Sinai.Difarsuwar_Airfield
@@ -739,7 +737,7 @@ AIRBASE.Sinai = {
["Bilbeis_Air_Base"] = "Bilbeis Air Base", ["Bilbeis_Air_Base"] = "Bilbeis Air Base",
["Bir_Hasanah"] = "Bir Hasanah", ["Bir_Hasanah"] = "Bir Hasanah",
["Birma_Air_Base"] = "Birma Air Base", ["Birma_Air_Base"] = "Birma Air Base",
["Borj_El_Arab_International_Airport"] = "Borj El Arab International Airport", ["Borg_El_Arab_International_Airport"] = "Borg El Arab International Airport",
["Cairo_International_Airport"] = "Cairo International Airport", ["Cairo_International_Airport"] = "Cairo International Airport",
["Cairo_West"] = "Cairo West", ["Cairo_West"] = "Cairo West",
["Difarsuwar_Airfield"] = "Difarsuwar Airfield", ["Difarsuwar_Airfield"] = "Difarsuwar Airfield",