diff --git a/Moose Development/Moose/Functional/Suppression.lua b/Moose Development/Moose/Functional/Suppression.lua index 4a094b9ae..0f558d0d7 100644 --- a/Moose Development/Moose/Functional/Suppression.lua +++ b/Moose Development/Moose/Functional/Suppression.lua @@ -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() diff --git a/Moose Development/Moose/Ops/CTLD_Localization.lua b/Moose Development/Moose/Ops/CTLD_Localization.lua index 9de32b22a..b6ef7f455 100644 --- a/Moose Development/Moose/Ops/CTLD_Localization.lua +++ b/Moose Development/Moose/Ops/CTLD_Localization.lua @@ -924,4 +924,4 @@ FR = { BUILD_NO="NO", }, } - + \ No newline at end of file diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 6d715b243..43c96254a 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -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