* Bring options for afterburner usage down to AUFTRAG level

#OpsGroup (Flightgroup)
* Follow setting option for AB usage from mission, if set, generally and for execution phase of the AUFTRAG
This commit is contained in:
Applevangelist 2023-04-27 10:32:32 +02:00
parent a4e576e26d
commit 265fb4a8e8

View File

@ -5403,6 +5403,17 @@ function OPSGROUP:onafterMissionExecute(From, Event, To, Mission)
self:SetEngageDetectedOn(UTILS.MetersToNM(Mission.engagedetectedRmax), Mission.engagedetectedTypes, Mission.engagedetectedEngageZones, Mission.engagedetectedNoEngageZones) self:SetEngageDetectedOn(UTILS.MetersToNM(Mission.engagedetectedRmax), Mission.engagedetectedTypes, Mission.engagedetectedEngageZones, Mission.engagedetectedNoEngageZones)
end end
-- Set AB usage for mission execution based on Mission entry, if the option was set in the mission
if self.isFlightgroup then
if Mission.prohibitABExecute == true then
self:SetProhibitAfterburner()
self:I("Set prohibit AB")
elseif Mission.prohibitABExecute == false then
self:SetAllowAfterburner()
self:T2("Set allow AB")
end
end
end end
--- On after "PauseMission" event. --- On after "PauseMission" event.
@ -5699,6 +5710,17 @@ function OPSGROUP:onafterMissionDone(From, Event, To, Mission)
return return
end end
-- Set AB usage based on Mission entry, if the option was set in the mission
if self.isFlightgroup then
if Mission.prohibitAB == true then
self:T2("Setting prohibit AB")
self:SetProhibitAfterburner()
elseif Mission.prohibitAB == false then
self:T2("Setting allow AB")
self:SetAllowAfterburner()
end
end
-- Check if group is done. -- Check if group is done.
self:_CheckGroupDone(delay) self:_CheckGroupDone(delay)
@ -6119,6 +6141,18 @@ function OPSGROUP:_SetMissionOptions(mission)
self:SwitchICLS(mission.icls.Channel, mission.icls.Morse, mission.icls.UnitName) self:SwitchICLS(mission.icls.Channel, mission.icls.Morse, mission.icls.UnitName)
end end
-- Set AB usage based on Mission entry, if the option was set in the mission
if self.isFlightgroup then
if mission.prohibitAB == true then
self:SetProhibitAfterburner()
self:T2("Set prohibit AB")
elseif mission.prohibitAB == false then
self:SetAllowAfterburner()
self:T2("Set allow AB")
end
end
return self
end end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------