mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-17 12:50:22 +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)
|
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)
|
MESSAGE:New(text, 10):ToAllIf(message or self.Debug)
|
||||||
self:I(self.lid..text)
|
self:T(self.lid..text)
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -1194,7 +1194,7 @@ function SUPPRESSION:onafterFightBack(Controllable, From, Event, To)
|
|||||||
local Waypoints = group:GetTemplateRoutePoints()
|
local Waypoints = group:GetTemplateRoutePoints()
|
||||||
|
|
||||||
-- env.info("FF waypoints",showMessageBox)
|
-- env.info("FF waypoints",showMessageBox)
|
||||||
-- self:I(Waypoints)
|
self:T2({Waypoints})
|
||||||
|
|
||||||
group:Route(Waypoints, 5)
|
group:Route(Waypoints, 5)
|
||||||
|
|
||||||
@@ -1337,7 +1337,7 @@ function SUPPRESSION:onafterOutOfAmmo(Controllable, From, Event, To)
|
|||||||
self:_EventFromTo("onafterOutOfAmmo", Event, From, To)
|
self:_EventFromTo("onafterOutOfAmmo", Event, From, To)
|
||||||
|
|
||||||
-- Info to log.
|
-- 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.
|
-- Order retreat if retreat zone was specified.
|
||||||
if self.RetreatZone then
|
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())
|
local text=string.format("Stopping SUPPRESSION for group %s", self.Controllable:GetName())
|
||||||
MESSAGE:New(text, 10):ToAllIf(self.Debug)
|
MESSAGE:New(text, 10):ToAllIf(self.Debug)
|
||||||
self:I(self.lid..text)
|
sefl:T(self.lid..text)
|
||||||
|
|
||||||
-- Clear all pending schedules
|
-- Clear all pending schedules
|
||||||
self.CallScheduler:Clear()
|
self.CallScheduler:Clear()
|
||||||
|
|||||||
@@ -3680,6 +3680,26 @@ function CONTROLLABLE:OptionAIRunwayLineUp()
|
|||||||
return nil
|
return nil
|
||||||
end
|
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?
|
--- Can the CONTROLLABLE evade on enemy fire?
|
||||||
-- @param #CONTROLLABLE self
|
-- @param #CONTROLLABLE self
|
||||||
-- @return #boolean
|
-- @return #boolean
|
||||||
@@ -4294,6 +4314,19 @@ function CONTROLLABLE:OptionEngageRange( EngageRange )
|
|||||||
return nil
|
return nil
|
||||||
end
|
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.
|
--- [AIR] Set how the AI lands on an airfield. Here: Straight in.
|
||||||
-- @param #CONTROLLABLE self
|
-- @param #CONTROLLABLE self
|
||||||
-- @return #CONTROLLABLE self
|
-- @return #CONTROLLABLE self
|
||||||
|
|||||||
Reference in New Issue
Block a user