From 7b21c0cc6b1ae7cbab75989536a94cfcc9eb2067 Mon Sep 17 00:00:00 2001 From: HawaiianRyan808 Date: Wed, 18 Mar 2026 13:51:36 -0500 Subject: [PATCH] Add a new SetOptionJettisonEmptyTanks() method to CONTROLLABLE class. --- Moose Development/Moose/Wrapper/Controllable.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index c08cdcffb..43c96254a 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -4314,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