mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-16 14:12:47 +00:00
Merge remote-tracking branch 'origin/master-ng' into branch
This commit is contained in:
@@ -909,7 +909,7 @@ function SUPPRESSION:StatusReport(message)
|
||||
self:GetState(), nunits, self.IniGroupStrength, self.CurrentROE, self.CurrentAlarmState, self.Nhit, life_min, life_max, life_ave, life_ave0, ammotot, detectedG, detectedU)
|
||||
|
||||
MESSAGE:New(text, 10):ToAllIf(message or self.Debug)
|
||||
self:I(self.lid..text)
|
||||
self:T(self.lid..text)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -1194,7 +1194,7 @@ function SUPPRESSION:onafterFightBack(Controllable, From, Event, To)
|
||||
local Waypoints = group:GetTemplateRoutePoints()
|
||||
|
||||
-- env.info("FF waypoints",showMessageBox)
|
||||
-- self:I(Waypoints)
|
||||
self:T2({Waypoints})
|
||||
|
||||
group:Route(Waypoints, 5)
|
||||
|
||||
@@ -1337,7 +1337,7 @@ function SUPPRESSION:onafterOutOfAmmo(Controllable, From, Event, To)
|
||||
self:_EventFromTo("onafterOutOfAmmo", Event, From, To)
|
||||
|
||||
-- Info to log.
|
||||
self:I(self.lid..string.format("Out of ammo!"))
|
||||
self:T(self.lid..string.format("Out of ammo!"))
|
||||
|
||||
-- Order retreat if retreat zone was specified.
|
||||
if self.RetreatZone then
|
||||
@@ -1485,7 +1485,7 @@ function SUPPRESSION:onafterStop(Controllable, From, Event, To)
|
||||
|
||||
local text=string.format("Stopping SUPPRESSION for group %s", self.Controllable:GetName())
|
||||
MESSAGE:New(text, 10):ToAllIf(self.Debug)
|
||||
self:I(self.lid..text)
|
||||
sefl:T(self.lid..text)
|
||||
|
||||
-- Clear all pending schedules
|
||||
self.CallScheduler:Clear()
|
||||
|
||||
@@ -924,4 +924,4 @@ FR = {
|
||||
BUILD_NO="NO",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -3680,6 +3680,26 @@ function CONTROLLABLE:OptionAIRunwayLineUp()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Air - Allow to fly home after loss of formation
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE self
|
||||
function CONTROLLABLE:OptionDisengageAndRTBAfterFormationLoss()
|
||||
self:F2( { self.ControllableName } )
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
if DCSControllable then
|
||||
local Controller = self:_GetController()
|
||||
|
||||
if self:IsAir() then
|
||||
Controller:setOption( 38, 1 )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Can the CONTROLLABLE evade on enemy fire?
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #boolean
|
||||
@@ -4294,6 +4314,19 @@ function CONTROLLABLE:OptionEngageRange( EngageRange )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- [AIR] Set if aircraft is allowed to drop empty fuel tanks - set to true to allow, and false to forbid it.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE self
|
||||
function CONTROLLABLE:SetOptionJettisonEmptyTanks(Switch)
|
||||
self:F2( { self.ControllableName } )
|
||||
-- Set default if not specified.
|
||||
Switch = Switch or true
|
||||
if self:IsAir() then
|
||||
self:SetOption( AI.Option.Air.id.JETT_TANKS_IF_EMPTY, Switch )
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- [AIR] Set how the AI lands on an airfield. Here: Straight in.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE self
|
||||
|
||||
Reference in New Issue
Block a user