mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
EASYGCICAP Additions
This commit is contained in:
parent
11967bd608
commit
35d91c9c94
@ -258,10 +258,10 @@ EASYGCICAP.version="0.0.9"
|
|||||||
|
|
||||||
--- Create a new GCICAP Manager
|
--- Create a new GCICAP Manager
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #string Alias
|
-- @param #string Alias A Name for this GCICAP
|
||||||
-- @param #string AirbaseName
|
-- @param #string AirbaseName Name of the Home Airbase
|
||||||
-- @param #string Coalition
|
-- @param #string Coalition Coalition, e.g. "blue" or "red"
|
||||||
-- @param #string EWRName
|
-- @param #string EWRName (Partial) group name of the EWR system of the coalition, e.g. "Red EWR"
|
||||||
-- @return #EASYGCICAP self
|
-- @return #EASYGCICAP self
|
||||||
function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
|
function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
|
||||||
-- Inherit everything from FSM class.
|
-- Inherit everything from FSM class.
|
||||||
@ -528,6 +528,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
flightgroup:SetDespawnAfterHolding()
|
flightgroup:SetDespawnAfterHolding()
|
||||||
flightgroup:SetDestinationbase(AIRBASE:FindByName(Airbasename))
|
flightgroup:SetDestinationbase(AIRBASE:FindByName(Airbasename))
|
||||||
flightgroup:GetGroup():CommandEPLRS(true,5)
|
flightgroup:GetGroup():CommandEPLRS(true,5)
|
||||||
|
flightgroup:GetGroup():SetOptionRadarUsingForContinousSearch()
|
||||||
if Mission.type ~= AUFTRAG.Type.TANKER and Mission.type ~= AUFTRAG.Type.AWACS and Mission.type ~= AUFTRAG.Type.RECON then
|
if Mission.type ~= AUFTRAG.Type.TANKER and Mission.type ~= AUFTRAG.Type.AWACS and Mission.type ~= AUFTRAG.Type.RECON then
|
||||||
flightgroup:SetDetection(true)
|
flightgroup:SetDetection(true)
|
||||||
flightgroup:SetEngageDetectedOn(self.engagerange,{"Air"},self.GoZoneSet,self.NoGoZoneSet)
|
flightgroup:SetEngageDetectedOn(self.engagerange,{"Air"},self.GoZoneSet,self.NoGoZoneSet)
|
||||||
@ -548,7 +549,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
flightgroup:SetFuelLowRTB(true)
|
flightgroup:SetFuelLowRTB(true)
|
||||||
Intel:AddAgent(flightgroup)
|
Intel:AddAgent(flightgroup)
|
||||||
function flightgroup:OnAfterHolding(From,Event,To)
|
function flightgroup:OnAfterHolding(From,Event,To)
|
||||||
self:ClearToLand(5)
|
self:Despawn(1,true)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -1140,20 +1141,6 @@ function EASYGCICAP:_StartIntel()
|
|||||||
-- Do we have a matching airwing?
|
-- Do we have a matching airwing?
|
||||||
if targetairwing then
|
if targetairwing then
|
||||||
local AssetCount = targetairwing:CountAssetsOnMission(MissionTypes,Cohort)
|
local AssetCount = targetairwing:CountAssetsOnMission(MissionTypes,Cohort)
|
||||||
--[[
|
|
||||||
local Assets = targetairwing:GetAssetsOnMission(AUFTRAG.Type.GCICAP)
|
|
||||||
for _,_asset in pairs(Assets) do
|
|
||||||
local asset = _asset -- Functional.Warehouse#WAREHOUSE.Assetitem
|
|
||||||
local fg = asset.flightgroup
|
|
||||||
local name = asset.spawngroupname
|
|
||||||
local mission = fg:GetMissionCurrent()
|
|
||||||
local mtype = mission.type
|
|
||||||
local distance = position:Get3DDistance(fg:GetCoordinate()) or 1000*1000
|
|
||||||
distance = distance / 1000
|
|
||||||
local text = string.format("FlightGroup %s on mission %s with distance %d km",name,mtype,distance)
|
|
||||||
local m = MESSAGE:New(text,15,"GCICAP"):ToAllIf(self.debug):ToLog()
|
|
||||||
end
|
|
||||||
--]]
|
|
||||||
-- Enough airframes on mission already?
|
-- Enough airframes on mission already?
|
||||||
self:T(self.lid.." Assets on Mission "..AssetCount)
|
self:T(self.lid.." Assets on Mission "..AssetCount)
|
||||||
if AssetCount <= MaxAliveMissions then
|
if AssetCount <= MaxAliveMissions then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user