mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Compare commits
12 Commits
ac410e9a56
...
c6b78b9e42
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6b78b9e42 | ||
|
|
ea90f56f4d | ||
|
|
1e7203320f | ||
|
|
e3b587aa95 | ||
|
|
13fa8f373e | ||
|
|
8684fc13ac | ||
|
|
c3dc055fb2 | ||
|
|
7ccdec671a | ||
|
|
4e024f7173 | ||
|
|
052e1c3867 | ||
|
|
1248006f3d | ||
|
|
b318e8ae13 |
@ -112,6 +112,7 @@
|
||||
-- * SA-2, SA-3, SA-5, SA-6, SA-7, SA-8, SA-9, SA-10, SA-11, SA-13, SA-15, SA-19
|
||||
-- * From IDF mod: STUNNER IDFA, TAMIR IDFA (Note all caps!)
|
||||
-- * From HDS (see note on HDS below): SA-2, SA-3, SA-10B, SA-10C, SA-12, SA-17, SA-20A, SA-20B, SA-23, HQ-2, SAMP/T Block 1, SAMP/T Block 1INT, SAMP/T Block2
|
||||
-- * Other Mods: Nike
|
||||
--
|
||||
-- * From SMA: RBS98M, RBS70, RBS90, RBS90M, RBS103A, RBS103B, RBS103AM, RBS103BM, Lvkv9040M
|
||||
-- **NOTE** If you are using the Swedish Military Assets (SMA), please note that the **group name** for RBS-SAM types also needs to contain the keyword "SMA"
|
||||
@ -275,7 +276,7 @@
|
||||
MANTIS = {
|
||||
ClassName = "MANTIS",
|
||||
name = "mymantis",
|
||||
version = "0.9.32",
|
||||
version = "0.9.33",
|
||||
SAM_Templates_Prefix = "",
|
||||
SAM_Group = nil,
|
||||
EWR_Templates_Prefix = "",
|
||||
@ -392,7 +393,9 @@ MANTIS.SamData = {
|
||||
["SA-20B"] = { Range=200, Blindspot=4, Height=27, Type="Long" , Radar="S-300PMU2"},
|
||||
["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" },
|
||||
["TAMIR IDFA"] = { Range=20, Blindspot=0.6, Height=12.3, Type="Short", Radar="IRON_DOME_LN" },
|
||||
["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" },
|
||||
["STUNNER IDFA"] = { Range=250, Blindspot=1, Height=45, Type="Long", Radar="DAVID_SLING_LN" },
|
||||
["NIKE"] = { Range=155, Blindspot=6, Height=30, Type="Long", Radar="HIPAR" },
|
||||
["Dog Ear"] = { Range=11, Blindspot=0, Height=9, Type="Point", Radar="Dog Ear", Point="true" },
|
||||
}
|
||||
|
||||
--- SAM data HDS
|
||||
|
||||
@ -2412,6 +2412,16 @@ end
|
||||
-- USER API Functions
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--- Set the carrier illumination mode.
|
||||
-- @param #AIRBOSS self
|
||||
-- @param #number Mode Options are: -2: OFF, -1: AUTO, 0: NAVIGATION, 1: AC LAUNCH, 2: AC RECOVERY
|
||||
-- @return #AIRBOSS self
|
||||
function AIRBOSS:SetCarrierIllumination(Mode)
|
||||
self.carrier:SetCarrierIlluminationMode(Mode)
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Set welcome messages for players.
|
||||
-- @param #AIRBOSS self
|
||||
-- @param #boolean Switch If true, display welcome message to player.
|
||||
|
||||
@ -71,6 +71,8 @@
|
||||
-- @field #boolean DespawnAfterHolding
|
||||
-- @field #list<Ops.Auftrag#AUFTRAG> ListOfAuftrag
|
||||
-- @field #string defaulttakeofftype Take off type
|
||||
-- @field #number FuelLowThreshold
|
||||
-- @field #number FuelCriticalThreshold
|
||||
-- @extends Core.Fsm#FSM
|
||||
|
||||
--- *“Airspeed, altitude, and brains. Two are always needed to successfully complete the flight.”* -- Unknown.
|
||||
@ -226,6 +228,8 @@ EASYGCICAP = {
|
||||
DespawnAfterHolding = true,
|
||||
ListOfAuftrag = {},
|
||||
defaulttakeofftype = "hot",
|
||||
FuelLowThreshold = 25,
|
||||
FuelCriticalThreshold = 10,
|
||||
}
|
||||
|
||||
--- Internal Squadron data type
|
||||
@ -261,7 +265,7 @@ EASYGCICAP = {
|
||||
|
||||
--- EASYGCICAP class version.
|
||||
-- @field #string version
|
||||
EASYGCICAP.version="0.1.23"
|
||||
EASYGCICAP.version="0.1.25"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- TODO list
|
||||
@ -315,6 +319,8 @@ function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
|
||||
self.DespawnAfterHolding = true
|
||||
self.ListOfAuftrag = {}
|
||||
self.defaulttakeofftype = "hot"
|
||||
self.FuelLowThreshold = 25
|
||||
self.FuelCriticalThreshold = 10
|
||||
|
||||
-- Set some string id for output to DCS.log file.
|
||||
self.lid=string.format("EASYGCICAP %s | ", self.alias)
|
||||
@ -339,6 +345,50 @@ end
|
||||
-- Functions
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
--- Get a specific managed AirWing by name
|
||||
-- @param #EASYGCICAP self
|
||||
-- @param #string AirbaseName Airbase name of the home of this wing.
|
||||
-- @return Ops.AirWing#AIRWING Airwing or nil if not found
|
||||
function EASYGCICAP:GetAirwing(AirbaseName)
|
||||
self:T(self.lid.."GetAirwing")
|
||||
if self.wings[AirbaseName] then
|
||||
return self.wings[AirbaseName][1]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Get a table of all managed AirWings
|
||||
-- @param #EASYGCICAP self
|
||||
-- @return #table Table of Ops.AirWing#AIRWING Airwings
|
||||
function EASYGCICAP:GetAirwingTable()
|
||||
self:T(self.lid.."GetAirwingTable")
|
||||
local Wingtable = {}
|
||||
for _,_object in pairs(self.wings or {}) do
|
||||
table.insert(Wingtable,_object[1])
|
||||
end
|
||||
return Wingtable
|
||||
end
|
||||
|
||||
--- Set "fuel low" threshold for CAP and INTERCEPT flights.
|
||||
-- @param #EASYGCICAP self
|
||||
-- @param #number Percent RTB if fuel at this percent. Values: 1..100, defaults to 25.
|
||||
-- @return #EASYGCICAP self
|
||||
function EASYGCICAP:SetFuelLow(Percent)
|
||||
self:T(self.lid.."SetFuelLow")
|
||||
self.FuelLowThreshold = Percent or 25
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set "fuel critical" threshold for CAP and INTERCEPT flights.
|
||||
-- @param #EASYGCICAP self
|
||||
-- @param #number Percent RTB if fuel at this percent. Values: 1..100, defaults to 10.
|
||||
-- @return #EASYGCICAP self
|
||||
function EASYGCICAP:SetFuelCritical(Percent)
|
||||
self:T(self.lid.."SetFuelCritical")
|
||||
self.FuelCriticalThreshold = Percent or 10
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set CAP formation.
|
||||
-- @param #EASYGCICAP self
|
||||
-- @param #number Formation Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
|
||||
@ -359,7 +409,7 @@ function EASYGCICAP:SetTankerAndAWACSInvisible(Switch)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Count alive missions in our internal stack.
|
||||
--- (internal) Count alive missions in our internal stack.
|
||||
-- @param #EASYGCICAP self
|
||||
-- @return #number count
|
||||
function EASYGCICAP:_CountAliveAuftrags()
|
||||
@ -628,6 +678,8 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
||||
local engagerange = self.engagerange
|
||||
local GoZoneSet = self.GoZoneSet
|
||||
local NoGoZoneSet = self.NoGoZoneSet
|
||||
local FuelLow = self.FuelLowThreshold or 25
|
||||
local FuelCritical = self.FuelCriticalThreshold or 10
|
||||
|
||||
function CAP_Wing:onbeforeFlightOnMission(From, Event, To, Flightgroup, Mission)
|
||||
local flightgroup = Flightgroup -- Ops.FlightGroup#FLIGHTGROUP
|
||||
@ -639,10 +691,15 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
||||
flightgroup:SetDestinationbase(AIRBASE:FindByName(Airbasename))
|
||||
flightgroup:GetGroup():CommandEPLRS(true,5)
|
||||
flightgroup:GetGroup():SetOptionRadarUsingForContinousSearch()
|
||||
flightgroup:GetGroup():SetOptionLandingOverheadBreak()
|
||||
if Mission.type ~= AUFTRAG.Type.TANKER and Mission.type ~= AUFTRAG.Type.AWACS and Mission.type ~= AUFTRAG.Type.RECON then
|
||||
flightgroup:SetDetection(true)
|
||||
flightgroup:SetEngageDetectedOn(engagerange,{"Air"},GoZoneSet,NoGoZoneSet)
|
||||
flightgroup:SetOutOfAAMRTB()
|
||||
flightgroup:SetFuelLowRTB(true)
|
||||
flightgroup:SetFuelLowThreshold(FuelLow)
|
||||
flightgroup:SetFuelCriticalRTB(true)
|
||||
flightgroup:SetFuelCriticalThreshold(FuelCritical)
|
||||
if CapFormation then
|
||||
flightgroup:GetGroup():SetOption(AI.Option.Air.id.FORMATION,CapFormation)
|
||||
end
|
||||
@ -1404,7 +1461,7 @@ function EASYGCICAP:_StartIntel()
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
-- FSM Functions
|
||||
-- TODO FSM Functions
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
--- (Internal) FSM Function onafterStart
|
||||
@ -1535,5 +1592,8 @@ end
|
||||
function EASYGCICAP:onafterStop(From,Event,To)
|
||||
self:T({From,Event,To})
|
||||
self.Intel:Stop()
|
||||
for _,_wing in pairs(self.wings or {}) do
|
||||
_wing:Stop()
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
@ -2464,7 +2464,7 @@ end
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Payer Menu
|
||||
-- Player Menu
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--- Create player menu.
|
||||
|
||||
@ -4667,10 +4667,12 @@ function FLIGHTGROUP:GetParking(airbase)
|
||||
local coords={}
|
||||
for clientname, client in pairs(clients) do
|
||||
local template=_DATABASE:GetGroupTemplateFromUnitName(clientname)
|
||||
local units=template.units
|
||||
for i,unit in pairs(units) do
|
||||
local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
|
||||
coords[unit.name]=coord
|
||||
if template then
|
||||
local units=template.units
|
||||
for i,unit in pairs(units) do
|
||||
local coord=COORDINATE:New(unit.x, unit.alt, unit.y)
|
||||
coords[unit.name]=coord
|
||||
end
|
||||
end
|
||||
end
|
||||
return coords
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user