mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-17 18:22:19 +00:00
Compare commits
21 Commits
Apple/Develop
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| b33890ff03 | |||
| 1be2c92a5c | |||
| 4c8a17fe57 | |||
| 64dea17982 | |||
| b1f86c702d | |||
| 1a9540d0d4 | |||
| cdfaac527c | |||
| 4e3bf9969b | |||
| 74c16bd4f0 | |||
| 55e048b322 | |||
| b31fb7ece3 | |||
| 149e3421d9 | |||
| 338ec34604 | |||
| 3d79a16d3a | |||
| efa08c1280 | |||
| 589e65963f | |||
| af4f20af67 | |||
| b1b8630d21 | |||
| 98ed7d50c1 | |||
| 4ba81cb8bc | |||
| 626b12f486 |
@@ -736,6 +736,12 @@ do -- Event Handling
|
|||||||
-- @param #BASE self
|
-- @param #BASE self
|
||||||
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
|
--- Occurs when an option is changed for an AI group.
|
||||||
|
-- The event identifies the initiating group, but does not provide the option ID or value.
|
||||||
|
-- @function [parent=#BASE] OnEventGroupChangeOption
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param Core.Event#EVENTDATA EventData The EventData structure.
|
||||||
|
|
||||||
--- Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
|
--- Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
|
||||||
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
|
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
|
||||||
-- @function [parent=#BASE] OnEventNewDynamicCargo
|
-- @function [parent=#BASE] OnEventNewDynamicCargo
|
||||||
@@ -881,6 +887,22 @@ end
|
|||||||
world.onEvent(Event)
|
world.onEvent(Event)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Creation of a `S_EVENT_GROUP_CHANGE_OPTION` event.
|
||||||
|
-- @param #BASE self
|
||||||
|
-- @param DCS#Time EventTime The time stamp of the event.
|
||||||
|
-- @param DCS#Group Initiator The initiating group of the event.
|
||||||
|
function BASE:CreateEventGroupChangeOption( EventTime, Initiator )
|
||||||
|
self:F( { EventTime, Initiator } )
|
||||||
|
|
||||||
|
local Event = {
|
||||||
|
id = EVENTS.GroupChangeOption,
|
||||||
|
time = EventTime,
|
||||||
|
initiator = Initiator,
|
||||||
|
}
|
||||||
|
|
||||||
|
world.onEvent( Event )
|
||||||
|
end
|
||||||
|
|
||||||
--- Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
|
--- Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
|
||||||
-- @param #BASE self
|
-- @param #BASE self
|
||||||
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
|
-- @param Wrapper.DynamicCargo#DYNAMICCARGO DynamicCargo the dynamic cargo object
|
||||||
|
|||||||
@@ -278,6 +278,7 @@ EVENTS = {
|
|||||||
SimulationUnfreeze = world.event.S_EVENT_SIMULATION_UNFREEZE or -1,
|
SimulationUnfreeze = world.event.S_EVENT_SIMULATION_UNFREEZE or -1,
|
||||||
HumanAircraftRepairStart = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_START or -1,
|
HumanAircraftRepairStart = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_START or -1,
|
||||||
HumanAircraftRepairFinish = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH or -1,
|
HumanAircraftRepairFinish = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH or -1,
|
||||||
|
GroupChangeOption = world.event.S_EVENT_GROUP_CHANGE_OPTION or -1,
|
||||||
-- dynamic cargo
|
-- dynamic cargo
|
||||||
NewDynamicCargo = world.event.S_EVENT_NEW_DYNAMIC_CARGO or -1,
|
NewDynamicCargo = world.event.S_EVENT_NEW_DYNAMIC_CARGO or -1,
|
||||||
DynamicCargoLoaded = world.event.S_EVENT_DYNAMIC_CARGO_LOADED or -1,
|
DynamicCargoLoaded = world.event.S_EVENT_DYNAMIC_CARGO_LOADED or -1,
|
||||||
@@ -291,23 +292,25 @@ EVENTS = {
|
|||||||
--
|
--
|
||||||
-- * A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
|
-- * A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
|
||||||
-- * A (Object.Category.)STATIC : A STATIC object type is involved in the Event.
|
-- * A (Object.Category.)STATIC : A STATIC object type is involved in the Event.
|
||||||
|
-- * A GROUP : A DCS Group object is involved in the Event.
|
||||||
--
|
--
|
||||||
-- @type EVENTDATA
|
-- @type EVENTDATA
|
||||||
-- @field #number id The identifier of the event.
|
-- @field #number id The identifier of the event.
|
||||||
--
|
--
|
||||||
-- @field DCS#Unit initiator (UNIT/STATIC/SCENERY) The initiating @{DCS#Unit} or @{DCS#StaticObject}.
|
-- @field DCS#Unit initiator (UNIT/STATIC/SCENERY/GROUP) The initiating @{DCS#Unit} or @{DCS#StaticObject}. For `S_EVENT_GROUP_CHANGE_OPTION`, this is a DCS Group.
|
||||||
-- @field DCS#Object.Category IniObjectCategory (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).
|
-- @field DCS#Object.Category IniObjectCategory (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).
|
||||||
-- @field DCS#Unit IniDCSUnit (UNIT/STATIC) The initiating @{DCS#Unit} or @{DCS#StaticObject}.
|
-- @field DCS#Unit IniDCSUnit (UNIT/STATIC) The initiating @{DCS#Unit} or @{DCS#StaticObject}.
|
||||||
-- @field #string IniDCSUnitName (UNIT/STATIC) The initiating Unit name.
|
-- @field #string IniDCSUnitName (UNIT/STATIC) The initiating Unit name.
|
||||||
-- @field Wrapper.Unit#UNIT IniUnit (UNIT/STATIC) The initiating MOOSE wrapper @{Wrapper.Unit#UNIT} of the initiator Unit object.
|
-- @field Wrapper.Unit#UNIT IniUnit (UNIT/STATIC) The initiating MOOSE wrapper @{Wrapper.Unit#UNIT} of the initiator Unit object.
|
||||||
-- @field #string IniUnitName (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).
|
-- @field #string IniUnitName (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).
|
||||||
-- @field DCS#Group IniDCSGroup (UNIT) The initiating {DCSGroup#Group}.
|
-- @field DCS#Group IniDCSGroup (UNIT/GROUP) The initiating @{DCS#Group}.
|
||||||
-- @field #string IniDCSGroupName (UNIT) The initiating Group name.
|
-- @field #string IniDCSGroupName (UNIT/GROUP) The initiating Group name.
|
||||||
-- @field Wrapper.Group#GROUP IniGroup (UNIT) The initiating MOOSE wrapper @{Wrapper.Group#GROUP} of the initiator Group object.
|
-- @field Wrapper.Group#GROUP IniGroup (UNIT/GROUP) The initiating MOOSE wrapper @{Wrapper.Group#GROUP} of the initiator Group object.
|
||||||
-- @field #string IniGroupName UNIT) The initiating GROUP name (same as IniDCSGroupName).
|
-- @field #string IniGroupName (UNIT/GROUP) The initiating GROUP name (same as IniDCSGroupName).
|
||||||
|
-- @field DCS#Group.Category IniGroupCategory (GROUP) The category of the initiating group.
|
||||||
-- @field #string IniPlayerName (UNIT) The name of the initiating player in case the Unit is a client or player slot.
|
-- @field #string IniPlayerName (UNIT) The name of the initiating player in case the Unit is a client or player slot.
|
||||||
-- @field #string IniPlayerUCID (UNIT) The UCID of the initiating player in case the Unit is a client or player slot and on a multi-player server.
|
-- @field #string IniPlayerUCID (UNIT) The UCID of the initiating player in case the Unit is a client or player slot and on a multi-player server.
|
||||||
-- @field DCS#coalition.side IniCoalition (UNIT) The coalition of the initiator.
|
-- @field DCS#coalition.side IniCoalition (UNIT/GROUP) The coalition of the initiator.
|
||||||
-- @field DCS#Unit.Category IniCategory (UNIT) The category of the initiator.
|
-- @field DCS#Unit.Category IniCategory (UNIT) The category of the initiator.
|
||||||
-- @field #string IniTypeName (UNIT) The type name of the initiator.
|
-- @field #string IniTypeName (UNIT) The type name of the initiator.
|
||||||
--
|
--
|
||||||
@@ -734,6 +737,12 @@ local _EVENTMETA = {
|
|||||||
Side = "I",
|
Side = "I",
|
||||||
Event = "OnEventHumanAircraftRepairFinish",
|
Event = "OnEventHumanAircraftRepairFinish",
|
||||||
Text = "S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH"
|
Text = "S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH"
|
||||||
|
},
|
||||||
|
[EVENTS.GroupChangeOption] = {
|
||||||
|
Order = 1,
|
||||||
|
Side = "I",
|
||||||
|
Event = "OnEventGroupChangeOption",
|
||||||
|
Text = "S_EVENT_GROUP_CHANGE_OPTION"
|
||||||
},
|
},
|
||||||
-- dynamic cargo
|
-- dynamic cargo
|
||||||
[EVENTS.NewDynamicCargo] = {
|
[EVENTS.NewDynamicCargo] = {
|
||||||
@@ -1234,7 +1243,16 @@ function EVENT:onEvent( Event )
|
|||||||
|
|
||||||
if Event.initiator then
|
if Event.initiator then
|
||||||
|
|
||||||
Event.IniObjectCategory = Object.getCategory(Event.initiator)
|
if Event.id == EVENTS.GroupChangeOption then
|
||||||
|
Event.IniDCSGroup = Event.initiator
|
||||||
|
Event.IniDCSGroupName = Group.getName(Event.initiator)
|
||||||
|
Event.IniGroupName = Event.IniDCSGroupName
|
||||||
|
Event.IniGroup = GROUP:FindByName(Event.IniDCSGroupName)
|
||||||
|
Event.IniCoalition = Group.getCoalition(Event.initiator)
|
||||||
|
Event.IniGroupCategory = Group.getCategory(Event.initiator)
|
||||||
|
else
|
||||||
|
Event.IniObjectCategory = Object.getCategory(Event.initiator)
|
||||||
|
end
|
||||||
|
|
||||||
if Event.IniObjectCategory == Object.Category.STATIC then
|
if Event.IniObjectCategory == Object.Category.STATIC then
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ do -- world
|
|||||||
-- @field S_EVENT_SIMULATION_UNFREEZE = 58
|
-- @field S_EVENT_SIMULATION_UNFREEZE = 58
|
||||||
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_START = 59
|
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_START = 59
|
||||||
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH = 60
|
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH = 60
|
||||||
-- @field S_EVENT_MAX = 61
|
-- @field S_EVENT_GROUP_CHANGE_OPTION = 61
|
||||||
|
-- @field S_EVENT_MAX = 62
|
||||||
|
|
||||||
--- The birthplace enumerator is used to define where an aircraft or helicopter has spawned in association with birth events.
|
--- The birthplace enumerator is used to define where an aircraft or helicopter has spawned in association with birth events.
|
||||||
-- @type world.BirthPlace
|
-- @type world.BirthPlace
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3747,16 +3747,16 @@ function CTLD:_C130GetUnits(Group, Unit, Name)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
local coord = Unit:GetCoordinate() or Group:GetCoordinate()
|
local coord = Unit:GetCoord() or Group:GetCoord()
|
||||||
local capabilities = self:_GetUnitCapabilities(Unit)
|
local capabilities = self:_GetUnitCapabilities(Unit)
|
||||||
local innerDist = (capabilities.length and capabilities.length/2) or 15
|
local innerDist = (capabilities.length and capabilities.length/2) or 15
|
||||||
local maxUnitsNearby = self.maxUnitsNearby or 3
|
local maxUnitsNearby = self.maxUnitsNearby or 3
|
||||||
local searchRadius = self.UnitDistance or 90
|
local searchRadius = self.UnitDistance or 90
|
||||||
local checkZone = ZONE_RADIUS:New("CTLD_C130UnitsZone",coord:GetVec2(),searchRadius,false)
|
local checkZone = ZONE_RADIUS:New("CTLD_C130UnitsZone",coord:GetVec2(),searchRadius,false)
|
||||||
local nearGroups = SET_GROUP:New():FilterCoalitions("blue"):FilterZones({checkZone}):FilterOnce()
|
local nearGroups = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterZones({checkZone}):FilterOnce()
|
||||||
local nearbyCount = 0
|
local nearbyCount = 0
|
||||||
for _,gr in pairs(nearGroups.Set) do
|
for _,gr in pairs(nearGroups.Set) do
|
||||||
local gc = gr:GetCoordinate()
|
local gc = gr:GetCoord()
|
||||||
if gc then
|
if gc then
|
||||||
local dist = coord:Get2DDistance(gc)
|
local dist = coord:Get2DDistance(gc)
|
||||||
if dist > innerDist then
|
if dist > innerDist then
|
||||||
@@ -3925,7 +3925,7 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop, pack, quiet, suppress
|
|||||||
-- Check cargo location if available
|
-- Check cargo location if available
|
||||||
local location = Cargo:GetLocation()
|
local location = Cargo:GetLocation()
|
||||||
if location then
|
if location then
|
||||||
local unitcoord = Unit:GetCoordinate() or Group:GetCoordinate()
|
local unitcoord = Unit:GetCoord() or Group:GetCoord()
|
||||||
if unitcoord then
|
if unitcoord then
|
||||||
if not location:IsCoordinateInZone(unitcoord) then
|
if not location:IsCoordinateInZone(unitcoord) then
|
||||||
-- no we're not at the right spot
|
-- no we're not at the right spot
|
||||||
@@ -4136,8 +4136,8 @@ function CTLD:_GetCrates(Group, Unit, Cargo, number, drop, pack, quiet, suppress
|
|||||||
if type(ship) == "string" then
|
if type(ship) == "string" then
|
||||||
self:T("Spawning on ship "..ship)
|
self:T("Spawning on ship "..ship)
|
||||||
local Ship = UNIT:FindByName(ship)
|
local Ship = UNIT:FindByName(ship)
|
||||||
local shipcoord = Ship:GetCoordinate()
|
local shipcoord = Ship:GetCoord()
|
||||||
local unitcoord = Unit:GetCoordinate()
|
local unitcoord = Unit:GetCoord()
|
||||||
local dist = shipcoord:Get2DDistance(unitcoord)
|
local dist = shipcoord:Get2DDistance(unitcoord)
|
||||||
dist = dist - (20 + math.random(1, 10))
|
dist = dist - (20 + math.random(1, 10))
|
||||||
local halfwidth = (width or 20) / 2
|
local halfwidth = (width or 20) / 2
|
||||||
@@ -4395,11 +4395,11 @@ function CTLD:_C130RemoveUnitsNearby(_group,_unit)
|
|||||||
local innerDist = (capabilities.length and capabilities.length/2) or 15
|
local innerDist = (capabilities.length and capabilities.length/2) or 15
|
||||||
local finddist = self.PackDistance or (self.CrateDistance or 35)
|
local finddist = self.PackDistance or (self.CrateDistance or 35)
|
||||||
local zone = ZONE_RADIUS:New("CTLD_C130RemoveZone",location:GetVec2(),finddist,false)
|
local zone = ZONE_RADIUS:New("CTLD_C130RemoveZone",location:GetVec2(),finddist,false)
|
||||||
local nearestGroups = SET_GROUP:New():FilterCoalitions("blue"):FilterZones({zone}):FilterOnce()
|
local nearestGroups = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterZones({zone}):FilterOnce()
|
||||||
local removedAny = false
|
local removedAny = false
|
||||||
local removedTable = {}
|
local removedTable = {}
|
||||||
for _, gr in pairs(nearestGroups.Set) do
|
for _, gr in pairs(nearestGroups.Set) do
|
||||||
local gc = gr:GetCoordinate()
|
local gc = gr:GetCoord()
|
||||||
if gc then
|
if gc then
|
||||||
local dist = location:Get2DDistance(gc)
|
local dist = location:Get2DDistance(gc)
|
||||||
if dist > innerDist then
|
if dist > innerDist then
|
||||||
@@ -5683,18 +5683,18 @@ end
|
|||||||
-- @return #number Number
|
-- @return #number Number
|
||||||
function CTLD:_FindPackableGroupsNearby(Group, Unit)
|
function CTLD:_FindPackableGroupsNearby(Group, Unit)
|
||||||
self:T(self.lid .. " _FindPackableGroupsNearby")
|
self:T(self.lid .. " _FindPackableGroupsNearby")
|
||||||
local location = Group:GetCoordinate()
|
local location = Group:GetCoord()
|
||||||
if not location then return {}, 0 end
|
if not location then return {}, 0 end
|
||||||
local capabilities = self:_GetUnitCapabilities(Unit)
|
local capabilities = self:_GetUnitCapabilities(Unit)
|
||||||
local innerDist = (capabilities.length and capabilities.length/2) or 15
|
local innerDist = (capabilities.length and capabilities.length/2) or 15
|
||||||
local finddist = self.PackDistance or (self.CrateDistance or 35)
|
local finddist = self.PackDistance or (self.CrateDistance or 35)
|
||||||
local zone = ZONE_RADIUS:New("CTLD_PackableZone", location:GetVec2(), finddist, false)
|
local zone = ZONE_RADIUS:New("CTLD_PackableZone", location:GetVec2(), finddist, false)
|
||||||
local nearestGroups = SET_GROUP:New():FilterCoalitions("blue"):FilterZones({zone}):FilterOnce()
|
local nearestGroups = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterZones({zone}):FilterOnce()
|
||||||
local packable = {}
|
local packable = {}
|
||||||
|
|
||||||
for _, gr in pairs(nearestGroups.Set) do
|
for _, gr in pairs(nearestGroups.Set) do
|
||||||
if gr and gr:GetName() ~= Group:GetName() then
|
if gr and gr:GetName() ~= Group:GetName() then
|
||||||
local gc = gr:GetCoordinate()
|
local gc = gr:GetCoord()
|
||||||
if gc then
|
if gc then
|
||||||
local dist = location:Get2DDistance(gc)
|
local dist = location:Get2DDistance(gc)
|
||||||
if dist > innerDist and dist <= finddist then
|
if dist > innerDist and dist <= finddist then
|
||||||
@@ -6217,8 +6217,11 @@ function CTLD:_BuildObjectFromCrates(Group,Unit,Build,Repair,RepairLocation,Mult
|
|||||||
self:__CratesBuild(1,Group,Unit,self.DroppedTroops[self.TroopCounter])
|
self:__CratesBuild(1,Group,Unit,self.DroppedTroops[self.TroopCounter])
|
||||||
end
|
end
|
||||||
end -- template loop
|
end -- template loop
|
||||||
self:_RefreshLoadCratesMenu(Group, Unit)
|
|
||||||
self:_RefreshPackMenus(Group, Unit)
|
if Group and Group:IsAlive() and Group:GetID() then
|
||||||
|
self:_RefreshLoadCratesMenu(Group, Unit)
|
||||||
|
self:_RefreshPackMenus(Group, Unit)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:T(self.lid.."Group KIA while building!")
|
self:T(self.lid.."Group KIA while building!")
|
||||||
end
|
end
|
||||||
@@ -9008,7 +9011,7 @@ function CTLD:IsUnitInZone(Unit,Zonetype)
|
|||||||
local zoneret = nil
|
local zoneret = nil
|
||||||
local zonewret = nil
|
local zonewret = nil
|
||||||
local zonenameret = nil
|
local zonenameret = nil
|
||||||
local unitcoord = Unit:GetCoordinate()
|
local unitcoord = Unit:GetCoord()
|
||||||
if not unitcoord then
|
if not unitcoord then
|
||||||
if Zonetype == CTLD.CargoZoneType.SHIP then
|
if Zonetype == CTLD.CargoZoneType.SHIP then
|
||||||
return false, nil, nil, 1000000, nil
|
return false, nil, nil, 1000000, nil
|
||||||
@@ -9029,7 +9032,7 @@ function CTLD:IsUnitInZone(Unit,Zonetype)
|
|||||||
self:T("Checking Type Ship: "..zonename)
|
self:T("Checking Type Ship: "..zonename)
|
||||||
local ZoneUNIT = UNIT:FindByName(zonename)
|
local ZoneUNIT = UNIT:FindByName(zonename)
|
||||||
if not ZoneUNIT then return false end
|
if not ZoneUNIT then return false end
|
||||||
zonecoord = ZoneUNIT:GetCoordinate()
|
zonecoord = ZoneUNIT:GetCoord()
|
||||||
zoneradius = czone.shiplength
|
zoneradius = czone.shiplength
|
||||||
zonewidth = czone.shipwidth
|
zonewidth = czone.shipwidth
|
||||||
zone = ZONE_UNIT:New( ZoneUNIT:GetName(), ZoneUNIT, zoneradius/2)
|
zone = ZONE_UNIT:New( ZoneUNIT:GetName(), ZoneUNIT, zoneradius/2)
|
||||||
|
|||||||
@@ -191,9 +191,10 @@
|
|||||||
-- * @{#EASYGCICAP.SetDefaultResurrection}: Set how many seconds the AirWing stays inoperable after the AirWing STATIC HQ ist destroyed, default 900 secs.
|
-- * @{#EASYGCICAP.SetDefaultResurrection}: Set how many seconds the AirWing stays inoperable after the AirWing STATIC HQ ist destroyed, default 900 secs.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPSpeed}: Set how many knots the CAP flights should do (will be altitude corrected), default 300 kn.
|
-- * @{#EASYGCICAP.SetDefaultCAPSpeed}: Set how many knots the CAP flights should do (will be altitude corrected), default 300 kn.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPAlt}: Set at which altitude (ASL) the CAP planes will fly, default 25,000 ft.
|
-- * @{#EASYGCICAP.SetDefaultCAPAlt}: Set at which altitude (ASL) the CAP planes will fly, default 25,000 ft.
|
||||||
|
-- * @{#EASYGCICAP.SetDefaultINTERCEPTAlt}: Set at which altitude (ASL) the Intercept planes will fly, default 25,000 ft.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPDirection}: Set the initial direction from the CAP point the planes will fly in degrees, default is 90°.
|
-- * @{#EASYGCICAP.SetDefaultCAPDirection}: Set the initial direction from the CAP point the planes will fly in degrees, default is 90°.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPLeg}: Set the length of the CAP leg, default is 15 NM.
|
-- * @{#EASYGCICAP.SetDefaultCAPLeg}: Set the length of the CAP leg, default is 15 NM.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPGrouping}: Set how many planes will be spawned per mission (CVAP/GCI), defaults to 2.
|
-- * @{#EASYGCICAP.SetDefaultCAPGrouping}: Set how many planes will be spawned per mission (CAP/GCI), defaults to 2.
|
||||||
-- * @{#EASYGCICAP.SetDefaultMissionRange}: Set how many NM the planes can go from the home base, defaults to 100.
|
-- * @{#EASYGCICAP.SetDefaultMissionRange}: Set how many NM the planes can go from the home base, defaults to 100.
|
||||||
-- * @{#EASYGCICAP.SetDefaultNumberAlert5Standby}: Set how many planes will be spawned on cold standby (Alert5), default 2.
|
-- * @{#EASYGCICAP.SetDefaultNumberAlert5Standby}: Set how many planes will be spawned on cold standby (Alert5), default 2.
|
||||||
-- * @{#EASYGCICAP.SetDefaultEngageRange}: Set max engage range for CAP flights if they detect intruders, defaults to 50.
|
-- * @{#EASYGCICAP.SetDefaultEngageRange}: Set max engage range for CAP flights if they detect intruders, defaults to 50.
|
||||||
@@ -287,7 +288,7 @@ EASYGCICAP = {
|
|||||||
|
|
||||||
--- EASYGCICAP class version.
|
--- EASYGCICAP class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
EASYGCICAP.version="0.1.37"
|
EASYGCICAP.version="0.1.38"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -588,6 +589,17 @@ function EASYGCICAP:SetDefaultCAPAlt(Altitude)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set default INTERCEPT Altitude in feet
|
||||||
|
-- @param #EASYGCICAP self
|
||||||
|
-- @param #number Altitude (Optional) Altitude defaults to 25000
|
||||||
|
-- @return #EASYGCICAP self
|
||||||
|
function EASYGCICAP:SetDefaultINTERCEPTAlt(Altitude)
|
||||||
|
self:T(self.lid.."SetDefaultINTERCEPTAlt")
|
||||||
|
self.interceptalt = Altitude or 25000
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
--
|
||||||
|
|
||||||
--- Set default CAP lieg initial direction in degrees
|
--- Set default CAP lieg initial direction in degrees
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #number Direction (Optional) Direction defaults to 90 (East)
|
-- @param #number Direction (Optional) Direction defaults to 90 (East)
|
||||||
@@ -1519,6 +1531,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
local overhead = self.overhead
|
local overhead = self.overhead
|
||||||
local capspeed = self.capspeed + 100
|
local capspeed = self.capspeed + 100
|
||||||
local capalt = self.capalt
|
local capalt = self.capalt
|
||||||
|
local interalt = self.interceptalt or self.capalt
|
||||||
local maxsize = self.maxinterceptsize
|
local maxsize = self.maxinterceptsize
|
||||||
local repeatsonfailure = self.repeatsonfailure
|
local repeatsonfailure = self.repeatsonfailure
|
||||||
|
|
||||||
@@ -1606,6 +1619,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
:SetRepeatOnFailure(repeats)
|
:SetRepeatOnFailure(repeats)
|
||||||
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
|
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
|
||||||
:SetMissionAltitude(capalt)
|
:SetMissionAltitude(capalt)
|
||||||
|
:SetEngageAltitude(interalt)
|
||||||
|
|
||||||
if nogozoneset:Count() > 0 then
|
if nogozoneset:Count() > 0 then
|
||||||
InterceptAuftrag:AddConditionSuccess(
|
InterceptAuftrag:AddConditionSuccess(
|
||||||
|
|||||||
@@ -2108,7 +2108,7 @@ function MSRS:_HoundTextToSpeech(Message,Frequencies,Modulations,Volume,Label,Co
|
|||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies) do
|
for _,_f in pairs(Frequencies) do
|
||||||
table.insert(ffs,string.format("%.1f",_f))
|
table.insert(ffs,string.format("%.3f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
@@ -2214,7 +2214,7 @@ function MSRS:_HoundTestTone(Frequencies, Modulations, Coalition)
|
|||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies or self.frequencies) do
|
for _,_f in pairs(Frequencies or self.frequencies) do
|
||||||
table.insert(ffs,string.format("%.1f",_f))
|
table.insert(ffs,string.format("%.3f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
@@ -2291,7 +2291,7 @@ function MSRS:RadioJammerOn(Frequencies, Modulations, Coalition, Noisetype, Volu
|
|||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies or self.frequencies) do
|
for _,_f in pairs(Frequencies or self.frequencies) do
|
||||||
table.insert(ffs,string.format("%.1f",_f))
|
table.insert(ffs,string.format("%.3f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ ENUMS.ReportingName =
|
|||||||
Tornado = "Tornado",
|
Tornado = "Tornado",
|
||||||
-- Transport / Bomber / Others
|
-- Transport / Bomber / Others
|
||||||
Atlas = "A400",
|
Atlas = "A400",
|
||||||
Lancer = "B1-B",
|
Lancer = "B-1B",
|
||||||
Stratofortress = "B-52H",
|
Stratofortress = "B-52H",
|
||||||
Herc = "C-130",
|
Herc = "C-130",
|
||||||
Hercules = "C-130J-30",
|
Hercules = "C-130J-30",
|
||||||
@@ -568,7 +568,7 @@ ENUMS.ReportingName =
|
|||||||
Apache = "AH-64",
|
Apache = "AH-64",
|
||||||
Chinook = "CH-47",
|
Chinook = "CH-47",
|
||||||
Sea_Stallion = "CH-53",
|
Sea_Stallion = "CH-53",
|
||||||
Kiowa = "OH-58",
|
Kiowa = "OH58D",
|
||||||
Seahawk = "SH-60",
|
Seahawk = "SH-60",
|
||||||
Blackhawk = "UH-60",
|
Blackhawk = "UH-60",
|
||||||
Sea_King = "S-61",
|
Sea_King = "S-61",
|
||||||
@@ -2126,6 +2126,47 @@ ENUMS.Storage.weapons.containers.UH60_GAU19_RIGHT = 'weapons.containers.{UH60_GA
|
|||||||
ENUMS.Storage.weapons.containers.UH60_M230_RIGHT = 'weapons.containers.{UH60_M230_RIGHT}'
|
ENUMS.Storage.weapons.containers.UH60_M230_RIGHT = 'weapons.containers.{UH60_M230_RIGHT}'
|
||||||
ENUMS.Storage.weapons.containers.UH60L_M2_GUNNER = 'weapons.containers.{UH60L_M2_GUNNER}'
|
ENUMS.Storage.weapons.containers.UH60L_M2_GUNNER = 'weapons.containers.{UH60L_M2_GUNNER}'
|
||||||
|
|
||||||
|
|
||||||
|
ENUMS.Storage.weapons.adapters.GD_F100_SUU_13 = 'weapons.adapters.GD_F100_SUU-13'
|
||||||
|
ENUMS.Storage.weapons.containers.GPU_5_POD = 'weapons.containers.{GPU_5_POD}'
|
||||||
|
ENUMS.Storage.weapons.bombs.BOLT_117 = 'weapons.bombs.BOLT-117'
|
||||||
|
ENUMS.Storage.weapons.shells.F100_M39_20_TP_T = 'weapons.shells.F100_M39_20_TP_T'
|
||||||
|
ENUMS.Storage.weapons.gunmounts.M_39_F_100 = 'weapons.gunmounts.M-39 F-100'
|
||||||
|
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_275_L = 'weapons.droptanks.GD_F100_TANK_275_L'
|
||||||
|
ENUMS.Storage.weapons.bombs.BLU_4B_R_GROUP_R = 'weapons.bombs.BLU-4B_R_GROUP_R'
|
||||||
|
ENUMS.Storage.weapons.containers.F100_CAMERA_P2 = 'weapons.containers.F100_CAMERA_P2'
|
||||||
|
ENUMS.Storage.weapons.containers.HB_ORD_SUU_7 = 'weapons.containers.HB_ORD_SUU_7'
|
||||||
|
ENUMS.Storage.weapons.adapters.SidewinderPylon = 'weapons.adapters.SidewinderPylon'
|
||||||
|
ENUMS.Storage.weapons.adapters.apu_470 = 'weapons.adapters.apu_470'
|
||||||
|
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_335_R = 'weapons.droptanks.GD_F100_TANK_335_R'
|
||||||
|
ENUMS.Storage.weapons.bombs.BLU_3B_R_GROUP_R = 'weapons.bombs.BLU-3B_R_GROUP_R'
|
||||||
|
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_335_L = 'weapons.droptanks.GD_F100_TANK_335_L'
|
||||||
|
ENUMS.Storage.weapons.adapters.mbdz_u2t = 'weapons.adapters.mbdz_u2t'
|
||||||
|
ENUMS.Storage.weapons.containers.ZellRocket = 'weapons.containers.ZellRocket'
|
||||||
|
ENUMS.Storage.weapons.containers.apu_73 = 'weapons.containers.apu-73'
|
||||||
|
ENUMS.Storage.weapons.gunmounts.GAU_13 = 'weapons.gunmounts.GAU-13'
|
||||||
|
ENUMS.Storage.weapons.shells.F100_M39_20_TP = 'weapons.shells.F100_M39_20_TP'
|
||||||
|
ENUMS.Storage.weapons.shells.F100_M39_20_API = 'weapons.shells.F100_M39_20_API'
|
||||||
|
ENUMS.Storage.weapons.adapters.bdz_umk2b = 'weapons.adapters.bdz_umk2b'
|
||||||
|
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_450 = 'weapons.droptanks.GD_F100_TANK_450'
|
||||||
|
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_275_R = 'weapons.droptanks.GD_F100_TANK_275_R'
|
||||||
|
ENUMS.Storage.weapons.bombs.BLU_18_B_GROUP = 'weapons.bombs.BLU-18/B_GROUP'
|
||||||
|
ENUMS.Storage.weapons.containers.ZELL_Booster = 'weapons.containers.ZELL Booster'
|
||||||
|
ENUMS.Storage.weapons.adapters.apu_60 = 'weapons.adapters.apu_60'
|
||||||
|
ENUMS.Storage.weapons.gunmounts.GPU_5_POD = 'weapons.gunmounts.{GPU_5_POD}'
|
||||||
|
ENUMS.Storage.weapons.containers.F100_CAMERA_KA71A = 'weapons.containers.F100_CAMERA_KA71A'
|
||||||
|
ENUMS.Storage.weapons.bombs.BLU_3_R_GROUP_R = 'weapons.bombs.BLU-3_R_GROUP_R'
|
||||||
|
ENUMS.Storage.weapons.shells.F100_M39_20_HEI = 'weapons.shells.F100_M39_20_HEI'
|
||||||
|
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_200 = 'weapons.droptanks.GD_F100_TANK_200'
|
||||||
|
ENUMS.Storage.weapons.adapters.apu_73 = 'weapons.adapters.apu-73'
|
||||||
|
ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.AKAN_NO_TRC'
|
||||||
|
ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.AKAN'
|
||||||
|
ENUMS.Storage.weapons.shells.F100_M39_20_HEI_T = 'weapons.shells.F100_M39_20_HEI_T'
|
||||||
|
ENUMS.Storage.weapons.shells.F100_M39_20_API_T = 'weapons.shells.F100_M39_20_API_T'
|
||||||
|
ENUMS.Storage.weapons.containers.GD_F100_STRIKE_CAMERA = 'weapons.containers.GD_F100_STRIKE_CAMERA'
|
||||||
|
ENUMS.Storage.weapons.bombs.BLU_49_B = 'weapons.bombs.BLU-49/B'
|
||||||
|
ENUMS.Storage.weapons.containers.GD_F100_SUU_13 = 'weapons.containers.GD_F100_SUU-13'
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @type ENUMS.FARPType
|
-- @type ENUMS.FARPType
|
||||||
-- @field #string FARP
|
-- @field #string FARP
|
||||||
|
|||||||
Reference in New Issue
Block a user