mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
# AUFTRAG
* 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:
parent
6cd56e4de4
commit
2032c2cfbf
@ -3084,6 +3084,39 @@ function AUFTRAG:SetRequiredCarriers(NcarriersMin, NcarriersMax)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are generally **not** allowed to use afterburner. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetProhibitAfterburner()
|
||||||
|
self.prohibitAB = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are generally allowed to use afterburner. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetAllowAfterburner()
|
||||||
|
self.prohibitAB = false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are **not** allowed to use afterburner in mission execution phase. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetProhibitAfterburnerExecutePhase()
|
||||||
|
self.prohibitABExecute = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set that (jet) aircraft are allowed to use afterburner in mission execution phase. Default is use of afterburner is allowed.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:SetAllowAfterburnerExecutePhase()
|
||||||
|
self.prohibitABExecute = false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
-- prohibitABExecute
|
||||||
|
|
||||||
--- **[LEGION, COMMANDER, CHIEF]** Assign a legion cohort to the mission. Only these cohorts will be considered for the job.
|
--- **[LEGION, COMMANDER, CHIEF]** Assign a legion cohort to the mission. Only these cohorts will be considered for the job.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
|
|||||||
@ -3339,8 +3339,10 @@ end
|
|||||||
function OPSGROUP:GetExpectedSpeed()
|
function OPSGROUP:GetExpectedSpeed()
|
||||||
|
|
||||||
if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then
|
if self:IsHolding() or self:Is("Rearming") or self:IsWaiting() or self:IsRetreated() then
|
||||||
|
--env.info("GetExpectedSpeed - returning ZERO")
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
--env.info("GetExpectedSpeed - returning self.speedWP = "..self.speedWp)
|
||||||
return self.speedWp or 0
|
return self.speedWp or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -5344,7 +5346,7 @@ function OPSGROUP:onafterMissionStart(From, Event, To, Mission)
|
|||||||
--if self.isFlightgroup and Mission.type~=AUFTRAG.Type.ALERT5 then
|
--if self.isFlightgroup and Mission.type~=AUFTRAG.Type.ALERT5 then
|
||||||
-- FLIGHTGROUP.SetReadyForTakeoff(self, true)
|
-- FLIGHTGROUP.SetReadyForTakeoff(self, true)
|
||||||
--end
|
--end
|
||||||
|
|
||||||
-- Route group to mission zone.
|
-- Route group to mission zone.
|
||||||
if self.speedMax>3.6 or true then
|
if self.speedMax>3.6 or true then
|
||||||
|
|
||||||
@ -5400,7 +5402,18 @@ function OPSGROUP:onafterMissionExecute(From, Event, To, Mission)
|
|||||||
if Mission.engagedetectedOn then
|
if Mission.engagedetectedOn then
|
||||||
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.
|
||||||
@ -5697,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)
|
||||||
|
|
||||||
@ -6116,7 +6140,19 @@ function OPSGROUP:_SetMissionOptions(mission)
|
|||||||
if mission.icls then
|
if mission.icls then
|
||||||
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
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user