From 2eb5374b28981748b968b89da67a94a0f5019c74 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 12 Dec 2025 12:52:10 +0100 Subject: [PATCH] xx --- Moose Development/Moose/Ops/EasyA2G.lua | 34 ++++++++++++-- Moose Development/Moose/Ops/EasyGCICAP.lua | 54 +++++++++++++++++++++- 2 files changed, 83 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Ops/EasyA2G.lua b/Moose Development/Moose/Ops/EasyA2G.lua index e385878a1..7ae69954a 100644 --- a/Moose Development/Moose/Ops/EasyA2G.lua +++ b/Moose Development/Moose/Ops/EasyA2G.lua @@ -80,7 +80,7 @@ -- @field #number FuelCriticalThreshold -- @field #boolean showpatrolpointmarks -- @field #table EngageTargetTypes --- @extends Ops.EasyGCIA2G#EASYGCICAP +-- @extends Ops.EasyGCICAP#EASYGCICAP --- *“High-Threat Close-Air-Support is a Myth.”* -- Mike “Starbaby” Pietrucha. -- @@ -286,7 +286,7 @@ EASYA2G = { --- EASYA2G class version. -- @field #string version -EASYA2G.version="0.0.1" +EASYA2G.version="0.0.2" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list @@ -356,6 +356,34 @@ function EASYA2G:New(Alias, AirbaseName, Coalition, ScoutName) self:AddTransition("Running", "Stop", "Stopped") self:AddTransition("*", "Status", "*") + --- On Before "Start" event. + -- @function [parent=#EASYA2G] OnBeforeStart + -- @param #EASYA2G self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + + --- On After "Start" event. + -- @function [parent=#EASYA2G] OnAfterStart + -- @param #EASYA2G self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + + --- On Before "Status" event. + -- @function [parent=#EASYA2G] OnBeforeStatus + -- @param #EASYA2G self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + + --- On After "Status" event. + -- @function [parent=#EASYA2G] OnAfterStatus + -- @param #EASYA2G self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + self:AddAirwing(self.airbasename,self.alias,self.CapZoneName) self:I(self.lid.."Created new instance (v"..self.version..")") @@ -817,7 +845,7 @@ end -- @param #string From -- @param #string Event -- @param #string To --- @return #EASYGCICAP self +-- @return #EASYA2G self function EASYA2G:onafterStatus(From,Event,To) self:T({From,Event,To}) -- cleanup diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 14b11e347..f7267d603 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -205,7 +205,7 @@ EASYGCICAP = { coalition = "blue", alias = nil, wings = {}, - Intel = nil, + Intel = nil, -- Ops.Intel#INTEL resurrection = 900, capspeed = 300, capalt = 25000, @@ -275,7 +275,7 @@ EASYGCICAP = { --- EASYGCICAP class version. -- @field #string version -EASYGCICAP.version="0.1.30" +EASYGCICAP.version="0.1.32" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- @@ -351,6 +351,34 @@ function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName) self:__Start(math.random(6,12)) + --- On Before "Start" event. + -- @function [parent=#EASYGCICAP] OnBeforeStart + -- @param #EASYGCICAP self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + + --- On After "Start" event. + -- @function [parent=#EASYGCICAP] OnAfterStart + -- @param #EASYGCICAP self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + + --- On Before "Status" event. + -- @function [parent=#EASYGCICAP] OnBeforeStatus + -- @param #EASYGCICAP self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + + --- On After "Status" event. + -- @function [parent=#EASYGCICAP] OnAfterStatus + -- @param #EASYGCICAP self + -- @param #string From From state. + -- @param #string Event Event. + -- @param #string To To state. + return self end @@ -370,6 +398,28 @@ function EASYGCICAP:GetAirwing(AirbaseName) return nil end +--- Add an agent to the underlying INTEL detection - caution, we need to be started first for this to work! +-- Normally this isn't necessary when the Group name is correctly filled (see EWRName in `New()`). +-- @param #EASYGCICAP self +-- @param Wrapper.Group#GROUP Group The group object to be added as Intel Agent. +-- @return #EASYGCICAP self +function EASYGCICAP:AddAgent(Group) + self:T(self.lid.."AddAgent") + if Group:IsInstanceOf("GROUP") and self.Intel ~= nil then + self.Intel:AddAgent(Group) + if self.TankerInvisible == true then + Group:SetCommandInvisible(true) + Group:OptionROEHoldFire() + if Group:IsAir() then + Group:OptionROTEvadeFire() + else + Group:OptionDisperseOnAttack(30) + end + end + end + return self +end + --- Get a table of all managed AirWings -- @param #EASYGCICAP self -- @return #table Table of Ops.AirWing#AIRWING Airwings