#EASYGCICAP - fixed some wrongly used self.values

#OPSZONE - make check time schedule configureable
This commit is contained in:
Applevangelist 2025-04-19 17:53:00 +02:00
parent 02a6d8f2c0
commit 9364579a18
2 changed files with 11 additions and 5 deletions

View File

@ -259,7 +259,7 @@ EASYGCICAP = {
--- EASYGCICAP class version. --- EASYGCICAP class version.
-- @field #string version -- @field #string version
EASYGCICAP.version="0.1.18" EASYGCICAP.version="0.1.20"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list -- TODO list
@ -606,6 +606,9 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
local Intel = self.Intel local Intel = self.Intel
local TankerInvisible = self.TankerInvisible local TankerInvisible = self.TankerInvisible
local engagerange = self.engagerange
local GoZoneSet = self.GoZoneSet
local NoGoZoneSet = self.NoGoZoneSet
function CAP_Wing:onbeforeFlightOnMission(From, Event, To, Flightgroup, Mission) function CAP_Wing:onbeforeFlightOnMission(From, Event, To, Flightgroup, Mission)
local flightgroup = Flightgroup -- Ops.FlightGroup#FLIGHTGROUP local flightgroup = Flightgroup -- Ops.FlightGroup#FLIGHTGROUP
@ -619,7 +622,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
flightgroup:GetGroup():SetOptionRadarUsingForContinousSearch() 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(engagerange,{"Air"},GoZoneSet,NoGoZoneSet)
flightgroup:SetOutOfAAMRTB() flightgroup:SetOutOfAAMRTB()
if CapFormation then if CapFormation then
flightgroup:GetGroup():SetOption(AI.Option.Air.id.FORMATION,CapFormation) flightgroup:GetGroup():SetOption(AI.Option.Air.id.FORMATION,CapFormation)

View File

@ -53,6 +53,7 @@
-- @field #number threatlevelCapture Threat level necessary to capture a zone. -- @field #number threatlevelCapture Threat level necessary to capture a zone.
-- @field Core.Set#SET_UNIT ScanUnitSet Set of scanned units. -- @field Core.Set#SET_UNIT ScanUnitSet Set of scanned units.
-- @field Core.Set#SET_GROUP ScanGroupSet Set of scanned groups. -- @field Core.Set#SET_GROUP ScanGroupSet Set of scanned groups.
-- @field #number UpdateSeconds Run status every this many seconds.
-- @extends Core.Fsm#FSM -- @extends Core.Fsm#FSM
--- *Gentlemen, when the enemy is committed to a mistake we must not interrupt him too soon.* --- Horation Nelson --- *Gentlemen, when the enemy is committed to a mistake we must not interrupt him too soon.* --- Horation Nelson
@ -77,6 +78,7 @@ OPSZONE = {
Tnut = 0, Tnut = 0,
chiefs = {}, chiefs = {},
Missions = {}, Missions = {},
UpdateSeconds = 120,
} }
--- OPSZONE.MISSION --- OPSZONE.MISSION
@ -97,7 +99,7 @@ OPSZONE.ZoneType={
--- OPSZONE class version. --- OPSZONE class version.
-- @field #string version -- @field #string version
OPSZONE.version="0.6.1" OPSZONE.version="0.6.2"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list -- ToDo list
@ -733,7 +735,8 @@ function OPSZONE:onafterStart(From, Event, To)
self.timerStatus=self.timerStatus or TIMER:New(OPSZONE.Status, self) self.timerStatus=self.timerStatus or TIMER:New(OPSZONE.Status, self)
-- Status update. -- Status update.
self.timerStatus:Start(1, 120) local EveryUpdateIn = self.UpdateSeconds or 120
self.timerStatus:Start(1, EveryUpdateIn)
-- Handle base captured event. -- Handle base captured event.
if self.airbase then if self.airbase then