This commit is contained in:
Applevangelist 2024-03-22 09:27:58 +01:00
parent d4daa54210
commit e86afefe79
5 changed files with 3102 additions and 12 deletions

View File

@ -3806,6 +3806,7 @@ end
-- @param #number SpawnIndex Spawn index.
-- @return #number self.SpawnIndex
function SPAWN:_GetSpawnIndex( SpawnIndex )
self:T("_GetSpawnIndex")
self:F2( { self.SpawnTemplatePrefix, SpawnIndex, self.SpawnMaxGroups, self.SpawnMaxUnitsAlive, self.AliveUnits, #self.SpawnTemplate.units } )
if (self.SpawnMaxGroups == 0) or (SpawnIndex <= self.SpawnMaxGroups) then

View File

@ -229,7 +229,7 @@ SCORING = {
ClassID = 0,
Players = {},
AutoSave = true,
version = "1.18.2"
version = "1.18.3"
}
local _SCORINGCoalition = {
@ -1062,7 +1062,7 @@ function SCORING:_EventOnHit( Event )
if PlayerHit.UNIT.ThreatType == nil then
PlayerHit.ThreatLevel, PlayerHit.ThreatType = PlayerHit.UNIT:GetThreatLevel()
-- if this fails for some reason, set a good default value
if PlayerHit.ThreatType == nil then
if PlayerHit.ThreatType == nil or PlayerHit.ThreatType == "" then
PlayerHit.ThreatLevel = 1
PlayerHit.ThreatType = "Unknown"
end

File diff suppressed because it is too large Load Diff

View File

@ -187,7 +187,7 @@ function TIRESIAS:SetAAARanges(FiringRange,SwitchAAA)
return self
end
--- [USER] Add a SET_GROUP of GROUP objects as exceptions. Can be done multiple times.
--- [USER] Add a SET_GROUP of GROUP objects as exceptions. Can be done multiple times. Does **not** work work for GROUP objects spawned into the SET after start, i.e. the groups need to exist in the game already.
-- @param #TIRESIAS self
-- @param Core.Set#SET_GROUP Set to add to the exception list.
-- @return #TIRESIAS self

View File

@ -508,7 +508,7 @@ do
-- @field #AWACS
AWACS = {
ClassName = "AWACS", -- #string
version = "0.2.63", -- #string
version = "0.2.64", -- #string
lid = "", -- #string
coalition = coalition.side.BLUE, -- #number
coalitiontxt = "blue", -- #string
@ -4639,7 +4639,7 @@ function AWACS:_CheckTaskQueue()
-- Check ranges for TAC and MELD
-- postions relative to CAP position
--[[
local targetgrp = entry.Contact.group
local position = entry.Contact.position or entry.Cluster.coordinate
if targetgrp and targetgrp:IsAlive() and managedgroup then
@ -4664,6 +4664,7 @@ function AWACS:_CheckTaskQueue()
end
end
end
--]]
local auftrag = entry.Auftrag -- Ops.Auftrag#AUFTRAG
local auftragstatus = "Not Known"
@ -4862,6 +4863,7 @@ function AWACS:_CheckTaskQueue()
elseif entry.Status == AWACS.TaskStatus.ASSIGNED then
self:T("Open Tasks VID ASSIGNED for GroupID "..entry.AssignedGroupID)
-- check TAC/MELD ranges
--[[
local targetgrp = entry.Contact.group
local position = entry.Contact.position or entry.Cluster.coordinate
if targetgrp and targetgrp:IsAlive() and managedgroup then
@ -4886,6 +4888,7 @@ function AWACS:_CheckTaskQueue()
end
end
end
--]]
elseif entry.Status == AWACS.TaskStatus.SUCCESS then
self:T("Open Tasks VID success for GroupID "..entry.AssignedGroupID)
-- outcomes - player ID'd
@ -5486,6 +5489,7 @@ function AWACS:_TACRangeCall(GID,Contact)
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
local contact = Contact.Contact -- Ops.Intel#INTEL.Contact
local contacttag = Contact.TargetGroupNaming
local name = managedgroup.GroupName
if contact then --and not Contact.TACCallDone then
local position = contact.position -- Core.Point#COORDINATE
if position then
@ -5494,12 +5498,13 @@ function AWACS:_TACRangeCall(GID,Contact)
local grptxt = self.gettext:GetEntry("GROUP",self.locale)
local miles = self.gettext:GetEntry("MILES",self.locale)
local text = string.format("%s. %s. %s %s, %d %s.",self.callsigntxt,pilotcallsign,contacttag,grptxt,distance,miles)
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
if not self.TacticalSubscribers[name] then
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
end
self:_UpdateContactEngagementTag(Contact.CID,Contact.EngagementTag,true,false,AWACS.TaskStatus.EXECUTING)
if GID and GID ~= 0 then
--local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
if managedgroup and managedgroup.Group and managedgroup.Group:IsAlive() then
local name = managedgroup.GroupName
if self.TacticalSubscribers[name] then
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true,true)
end
@ -5524,6 +5529,7 @@ function AWACS:_MeldRangeCall(GID,Contact)
local flightpos = managedgroup.Group:GetCoordinate()
local contact = Contact.Contact -- Ops.Intel#INTEL.Contact
local contacttag = Contact.TargetGroupNaming or "Bogey"
local name = managedgroup.GroupName
if contact then --and not Contact.MeldCallDone then
local position = contact.position -- Core.Point#COORDINATE
if position then
@ -5535,7 +5541,9 @@ function AWACS:_MeldRangeCall(GID,Contact)
end
local grptxt = self.gettext:GetEntry("GROUP",self.locale)
local text = string.format("%s. %s. %s %s, %s",self.callsigntxt,pilotcallsign,contacttag,grptxt,BRATExt)
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
if not self.TacticalSubscribers[name] then
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
end
self:_UpdateContactEngagementTag(Contact.CID,Contact.EngagementTag,true,true,AWACS.TaskStatus.EXECUTING)
if GID and GID ~= 0 then
--local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
@ -5563,6 +5571,8 @@ function AWACS:_ThreatRangeCall(GID,Contact)
local flightpos = managedgroup.Group:GetCoordinate() or managedgroup.LastKnownPosition
local contact = Contact.Contact -- Ops.Intel#INTEL.Contact
local contacttag = Contact.TargetGroupNaming or "Bogey"
local name = managedgroup.GroupName
local IsSub = self.TacticalSubscribers[name] and true or false
if contact then
local position = contact.position or contact.group:GetCoordinate() -- Core.Point#COORDINATE
if position then
@ -5575,7 +5585,9 @@ function AWACS:_ThreatRangeCall(GID,Contact)
local grptxt = self.gettext:GetEntry("GROUP",self.locale)
local thrt = self.gettext:GetEntry("THREAT",self.locale)
local text = string.format("%s. %s. %s %s, %s. %s",self.callsigntxt,pilotcallsign,contacttag,grptxt, thrt, BRATExt)
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
if IsSub == false then
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
end
if GID and GID ~= 0 then
--local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
if managedgroup and managedgroup.Group and managedgroup.Group:IsAlive() then
@ -5600,11 +5612,17 @@ function AWACS:_MergedCall(GID)
local pilotcallsign = self:_GetCallSign(nil,GID)
local merge = self.gettext:GetEntry("MERGED",self.locale)
local text = string.format("%s. %s. %s.",self.callsigntxt,pilotcallsign,merge)
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
local name
if managedgroup then
name = managedgroup.GroupName or "none"
end
if not self.TacticalSubscribers[name] then
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true)
end
if GID and GID ~= 0 then
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
if managedgroup and managedgroup.Group and managedgroup.Group:IsAlive() then
local name = managedgroup.GroupName
if self.TacticalSubscribers[name] then
self:_NewRadioEntry(text,text,GID,true,self.debug,true,false,true,true)
end