mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xx
This commit is contained in:
parent
2b29ae4f9c
commit
8ff79e4131
@ -974,6 +974,46 @@ function AIRWING:SetTakeoffAir()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft of the AirWing to land straight in.
|
||||||
|
-- @param #AIRWING self
|
||||||
|
-- @return #FLIGHTGROUP self
|
||||||
|
function AIRWING:SetLandingStraightIn()
|
||||||
|
self.OptionLandingStraightIn = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft of the AirWing to land in pairs for groups > 1 aircraft.
|
||||||
|
-- @param #AIRWING self
|
||||||
|
-- @return #AIRWING self
|
||||||
|
function AIRWING:SetLandingForcePair()
|
||||||
|
self.OptionLandingForcePair = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft of the AirWing to NOT land in pairs.
|
||||||
|
-- @param #AIRWING self
|
||||||
|
-- @return #AIRWING self
|
||||||
|
function AIRWING:SetLandingRestrictPair()
|
||||||
|
self.OptionLandingRestrictPair = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft of the AirWing to land after overhead break.
|
||||||
|
-- @param #AIRWING self
|
||||||
|
-- @return #AIRWING self
|
||||||
|
function AIRWING:SetLandingOverheadBreak()
|
||||||
|
self.OptionLandingOverheadBreak = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- [Helicopter] Set the aircraft of the AirWing to prefer vertical takeoff and landing.
|
||||||
|
-- @param #AIRWING self
|
||||||
|
-- @return #AIRWING self
|
||||||
|
function AIRWING:SetOptionPreferVerticalLanding()
|
||||||
|
self.OptionPreferVerticalLanding = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Set despawn after landing. Aircraft will be despawned after the landing event.
|
--- Set despawn after landing. Aircraft will be despawned after the landing event.
|
||||||
-- Can help to avoid DCS AI taxiing issues.
|
-- Can help to avoid DCS AI taxiing issues.
|
||||||
-- @param #AIRWING self
|
-- @param #AIRWING self
|
||||||
@ -1464,7 +1504,21 @@ function AIRWING:onafterFlightOnMission(From, Event, To, FlightGroup, Mission)
|
|||||||
self:T(self.lid..string.format("Group %s on %s mission %s", FlightGroup:GetName(), Mission:GetType(), Mission:GetName()))
|
self:T(self.lid..string.format("Group %s on %s mission %s", FlightGroup:GetName(), Mission:GetType(), Mission:GetName()))
|
||||||
if self.UseConnectedOpsAwacs and self.ConnectedOpsAwacs then
|
if self.UseConnectedOpsAwacs and self.ConnectedOpsAwacs then
|
||||||
self.ConnectedOpsAwacs:__FlightOnMission(2,FlightGroup,Mission)
|
self.ConnectedOpsAwacs:__FlightOnMission(2,FlightGroup,Mission)
|
||||||
end
|
end
|
||||||
|
-- Landing Options
|
||||||
|
if self.OptionLandingForcePair then
|
||||||
|
FlightGroup:SetOptionLandingForcePair()
|
||||||
|
elseif self.OptionLandingOverheadBreak then
|
||||||
|
FlightGroup:SetOptionLandingOverheadBreak()
|
||||||
|
elseif self.OptionLandingRestrictPair then
|
||||||
|
FlightGroup:SetOptionLandingRestrictPair()
|
||||||
|
elseif self.OptionLandingStraightIn then
|
||||||
|
FlightGroup:SetOptionLandingStraightIn()
|
||||||
|
end
|
||||||
|
-- Landing Options Helo
|
||||||
|
if self.OptionPreferVerticalLanding then
|
||||||
|
FlightGroup:SetOptionPreferVertical()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1789,8 +1789,9 @@ end
|
|||||||
-- @param Core.Point#COORDINATE Target Target coordinate. Can also be specified as a GROUP, UNIT, STATIC, SET_GROUP, SET_UNIT, SET_STATIC or TARGET object.
|
-- @param Core.Point#COORDINATE Target Target coordinate. Can also be specified as a GROUP, UNIT, STATIC, SET_GROUP, SET_UNIT, SET_STATIC or TARGET object.
|
||||||
-- @param #number Altitude Engage altitude in feet. Default 25000 ft.
|
-- @param #number Altitude Engage altitude in feet. Default 25000 ft.
|
||||||
-- @param #number EngageWeaponType Which weapon to use. Defaults to auto, ie ENUMS.WeaponFlag.Auto. See ENUMS.WeaponFlag for options.
|
-- @param #number EngageWeaponType Which weapon to use. Defaults to auto, ie ENUMS.WeaponFlag.Auto. See ENUMS.WeaponFlag for options.
|
||||||
|
-- @param #boolean Divebomb If true, use a dive bombing attack approach.
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:NewBOMBING(Target, Altitude, EngageWeaponType)
|
function AUFTRAG:NewBOMBING(Target, Altitude, EngageWeaponType, Divebomb)
|
||||||
|
|
||||||
local mission=AUFTRAG:New(AUFTRAG.Type.BOMBING)
|
local mission=AUFTRAG:New(AUFTRAG.Type.BOMBING)
|
||||||
|
|
||||||
@ -1807,6 +1808,7 @@ function AUFTRAG:NewBOMBING(Target, Altitude, EngageWeaponType)
|
|||||||
mission.missionFraction=0.5
|
mission.missionFraction=0.5
|
||||||
mission.optionROE=ENUMS.ROE.OpenFire
|
mission.optionROE=ENUMS.ROE.OpenFire
|
||||||
mission.optionROT=ENUMS.ROT.NoReaction -- No reaction is better.
|
mission.optionROT=ENUMS.ROT.NoReaction -- No reaction is better.
|
||||||
|
mission.optionDivebomb = Divebomb or nil
|
||||||
|
|
||||||
-- Evaluate result after 5 min. We might need time until the bombs have dropped and targets have been detroyed.
|
-- Evaluate result after 5 min. We might need time until the bombs have dropped and targets have been detroyed.
|
||||||
mission.dTevaluate=5*60
|
mission.dTevaluate=5*60
|
||||||
@ -6164,7 +6166,7 @@ function AUFTRAG:GetDCSMissionTask()
|
|||||||
|
|
||||||
local coords = self.engageTarget:GetCoordinates()
|
local coords = self.engageTarget:GetCoordinates()
|
||||||
for _, coord in pairs(coords) do
|
for _, coord in pairs(coords) do
|
||||||
local DCStask = CONTROLLABLE.TaskBombing(nil, coord:GetVec2(), self.engageAsGroup, self.engageWeaponExpend, self.engageQuantity, self.engageDirection, self.engageAltitude, self.engageWeaponType)
|
local DCStask = CONTROLLABLE.TaskBombing(nil, coord:GetVec2(), self.engageAsGroup, self.engageWeaponExpend, self.engageQuantity, self.engageDirection, self.engageAltitude, self.engageWeaponType, self.optionDivebomb)
|
||||||
|
|
||||||
table.insert(DCStasks, DCStask)
|
table.insert(DCStasks, DCStask)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -779,6 +779,61 @@ function FLIGHTGROUP:SetJettisonWeapons(Switch)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft to land straight in.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @return #FLIGHTGROUP self
|
||||||
|
function FLIGHTGROUP:SetOptionLandingStraightIn()
|
||||||
|
self.OptionLandingStraightIn = true
|
||||||
|
if self:GetGroup():IsAlive() then
|
||||||
|
self:GetGroup():SetOptionLandingStraightIn()
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft to land in pairs.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @return #FLIGHTGROUP self
|
||||||
|
function FLIGHTGROUP:SetOptionLandingForcePair()
|
||||||
|
self.OptionLandingForcePair = true
|
||||||
|
if self:GetGroup():IsAlive() then
|
||||||
|
self:GetGroup():SetOptionLandingForcePair()
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft to NOT land in pairs.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @return #FLIGHTGROUP self
|
||||||
|
function FLIGHTGROUP:SetOptionLandingRestrictPair()
|
||||||
|
self.OptionLandingRestrictPair = true
|
||||||
|
if self:GetGroup():IsAlive() then
|
||||||
|
self:GetGroup():SetOptionLandingRestrictPair()
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the aircraft to land after overhead break.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @return #FLIGHTGROUP self
|
||||||
|
function FLIGHTGROUP:SetOptionLandingOverheadBreak()
|
||||||
|
self.OptionLandingOverheadBreak = true
|
||||||
|
if self:GetGroup():IsAlive() then
|
||||||
|
self:GetGroup():SetOptionLandingOverheadBreak()
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- [HELICOPTER] Set the aircraft to prefer takeoff and landing vertically.
|
||||||
|
-- @param #FLIGHTGROUP self
|
||||||
|
-- @return #FLIGHTGROUP self
|
||||||
|
function FLIGHTGROUP:SetOptionPreferVertical()
|
||||||
|
self.OptionPreferVertical = true
|
||||||
|
if self:GetGroup():IsAlive() then
|
||||||
|
self:GetGroup():OptionPreferVerticalLanding()
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Set if group is ready for taxi/takeoff if controlled by a `FLIGHTCONTROL`.
|
--- Set if group is ready for taxi/takeoff if controlled by a `FLIGHTCONTROL`.
|
||||||
-- @param #FLIGHTGROUP self
|
-- @param #FLIGHTGROUP self
|
||||||
-- @param #boolean ReadyTO If `true`, flight is ready for takeoff.
|
-- @param #boolean ReadyTO If `true`, flight is ready for takeoff.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user