mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
AWACS 0.1.25
* Added Function ZipLip * Changed merge distance to 5nm for account for delay in speech generation * Altered RadioQueue to not save all calls until a player connects * Some bugfixes
This commit is contained in:
parent
6c33c5701f
commit
3f918bd309
@ -323,7 +323,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "beta 0.1.24", -- #string
|
version = "beta 0.1.25", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@ -658,7 +658,7 @@ AWACS.TaskStatus = {
|
|||||||
--@field #boolean FromAI
|
--@field #boolean FromAI
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO-List 0.1.24
|
-- TODO-List 0.1.25
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
-- DEBUG - WIP - Player tasking, VID
|
-- DEBUG - WIP - Player tasking, VID
|
||||||
@ -1142,13 +1142,24 @@ end
|
|||||||
--- [User] Do not show messages on screen
|
--- [User] Do not show messages on screen
|
||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @param #boolean Switch If true, no messages will be shown on screen.
|
-- @param #boolean Switch If true, no messages will be shown on screen.
|
||||||
-- @return #AWACS sel
|
-- @return #AWACS self
|
||||||
function AWACS:SuppressScreenMessages(Switch)
|
function AWACS:SuppressScreenMessages(Switch)
|
||||||
self:T(self.lid.."_SetBullsEyeAlias")
|
self:T(self.lid.."_SetBullsEyeAlias")
|
||||||
self.SuppressScreenOutput = Switch or false
|
self.SuppressScreenOutput = Switch or false
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- [User] Do not show messages on screen, no extra calls for player guidance, use short callsigns.
|
||||||
|
-- @param #AWACS self
|
||||||
|
-- @return #AWACS self
|
||||||
|
function AWACS:ZipLip()
|
||||||
|
self:T(self.lid.."ZipLip")
|
||||||
|
self:SuppressScreenMessages(true)
|
||||||
|
self.PlayerGuidance = false
|
||||||
|
self.callsignshort = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- [Internal] Event handler
|
--- [Internal] Event handler
|
||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @param Wrapper.Group#GROUP Group Group, can also be passed as #string group name
|
-- @param Wrapper.Group#GROUP Group Group, can also be passed as #string group name
|
||||||
@ -1320,6 +1331,17 @@ function AWACS:SetColdWar()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- [User] Set AWACS to Modern Era standards - ROE to BVR, ROT to defensive (evade fire). Radar blur 15%.
|
||||||
|
-- @param #AWACS self
|
||||||
|
-- @return #AWACS self
|
||||||
|
function AWACS:SetModernEra()
|
||||||
|
self.ModernEra = true
|
||||||
|
self.AwacsROT = AWACS.ROT.EVADE
|
||||||
|
self.AwacsROE = AWACS.ROE.BVR
|
||||||
|
self.RadarBlur = 15
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- [User] Set AWACS to Modern Era standards - ROE to IFF, ROT to defensive (evade fire). Radar blur 15%.
|
--- [User] Set AWACS to Modern Era standards - ROE to IFF, ROT to defensive (evade fire). Radar blur 15%.
|
||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
@ -1754,7 +1776,7 @@ end
|
|||||||
-- @return #string CallSign
|
-- @return #string CallSign
|
||||||
function AWACS:_GetManagedGrpID(Group)
|
function AWACS:_GetManagedGrpID(Group)
|
||||||
if not Group or not Group:IsAlive() then
|
if not Group or not Group:IsAlive() then
|
||||||
self:E(self.lid.."_GetManagedGrpID - Requested Group is not alive!")
|
self:T(self.lid.."_GetManagedGrpID - Requested Group is not alive!")
|
||||||
return 0,false,""
|
return 0,false,""
|
||||||
end
|
end
|
||||||
self:T(self.lid.."_GetManagedGrpID for "..Group:GetName())
|
self:T(self.lid.."_GetManagedGrpID for "..Group:GetName())
|
||||||
@ -1855,7 +1877,8 @@ function AWACS:_CheckMerges()
|
|||||||
local cpos = contact.Cluster.coordinate or contact.Contact.position or contact.Contact.group:GetCoordinate()
|
local cpos = contact.Cluster.coordinate or contact.Contact.position or contact.Contact.group:GetCoordinate()
|
||||||
local dist = ppos:Get2DDistance(cpos)
|
local dist = ppos:Get2DDistance(cpos)
|
||||||
local distnm = UTILS.Round(UTILS.MetersToNM(dist),0)
|
local distnm = UTILS.Round(UTILS.MetersToNM(dist),0)
|
||||||
if pilot.IsPlayer and distnm <= 3 then
|
if (pilot.IsPlayer or self.debug) and distnm <= 5 then
|
||||||
|
self:I(self.lid.."Merged")
|
||||||
self:_MergedCall(_id)
|
self:_MergedCall(_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -5573,6 +5596,9 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local Contact = GetFirstAliveContact(ContactTable) -- Ops.Intelligence#INTEL.Contact
|
local Contact = GetFirstAliveContact(ContactTable) -- Ops.Intelligence#INTEL.Contact
|
||||||
|
|
||||||
|
if not Contact then return self end
|
||||||
|
|
||||||
local targetset = SET_GROUP:New()
|
local targetset = SET_GROUP:New()
|
||||||
-- SET for TARGET
|
-- SET for TARGET
|
||||||
for _,_grp in pairs(ContactTable) do
|
for _,_grp in pairs(ContactTable) do
|
||||||
@ -5695,7 +5721,7 @@ function AWACS:onafterCheckRadioQueue(From,Event,To)
|
|||||||
-- do we have messages queued?
|
-- do we have messages queued?
|
||||||
|
|
||||||
local nextcall = 10
|
local nextcall = 10
|
||||||
if (self.RadioQueue:IsNotEmpty() or self.PrioRadioQueue:IsNotEmpty()) and self.clientset:CountAlive() > 0 then
|
if (self.RadioQueue:IsNotEmpty() or self.PrioRadioQueue:IsNotEmpty()) then
|
||||||
|
|
||||||
local RadioEntry = nil
|
local RadioEntry = nil
|
||||||
|
|
||||||
@ -5706,6 +5732,12 @@ function AWACS:onafterCheckRadioQueue(From,Event,To)
|
|||||||
end
|
end
|
||||||
self:T({RadioEntry})
|
self:T({RadioEntry})
|
||||||
|
|
||||||
|
if self.clientset:CountAlive() == 0 then
|
||||||
|
self:I(self.lid.."No player connected.")
|
||||||
|
self:__CheckRadioQueue(5)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
if not RadioEntry.FromAI then
|
if not RadioEntry.FromAI then
|
||||||
-- AI AWACS Speaking
|
-- AI AWACS Speaking
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
@ -5750,7 +5782,7 @@ function AWACS:onafterCheckRadioQueue(From,Event,To)
|
|||||||
|
|
||||||
if self:Is("Running") then
|
if self:Is("Running") then
|
||||||
-- exit if stopped
|
-- exit if stopped
|
||||||
self:__CheckRadioQueue(nextcall+2)
|
self:__CheckRadioQueue(nextcall+1)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -5906,7 +5938,7 @@ function AWACS:onafterReAnchor(From, Event, To, GID)
|
|||||||
local textScreen = string.format("All stations, %s. %s %s.", self.callsigntxt, faded, savedcallsign)
|
local textScreen = string.format("All stations, %s. %s %s.", self.callsigntxt, faded, savedcallsign)
|
||||||
|
|
||||||
local brtext = self:_ToStringBULLS(lastknown)
|
local brtext = self:_ToStringBULLS(lastknown)
|
||||||
local brtexttts = self:_ToStringBULLS(brtext,false,true)
|
local brtexttts = self:_ToStringBULLS(lastknown,false,true)
|
||||||
--if self.PathToGoogleKey then
|
--if self.PathToGoogleKey then
|
||||||
--brtexttts = self:_ToStringBULLS(lastknown,true)
|
--brtexttts = self:_ToStringBULLS(lastknown,true)
|
||||||
--end
|
--end
|
||||||
@ -5957,7 +5989,7 @@ function AWACS:onafterReAnchor(From, Event, To, GID)
|
|||||||
if managedgroup.LastKnownPosition then
|
if managedgroup.LastKnownPosition then
|
||||||
local lastknown = UTILS.DeepCopy(managedgroup.LastKnownPosition)
|
local lastknown = UTILS.DeepCopy(managedgroup.LastKnownPosition)
|
||||||
local brtext = self:_ToStringBULLS(lastknown)
|
local brtext = self:_ToStringBULLS(lastknown)
|
||||||
local brtexttts = self:_ToStringBULLS(brtext,false,true)
|
local brtexttts = self:_ToStringBULLS(lastknown,false,true)
|
||||||
--if self.PathToGoogleKey then
|
--if self.PathToGoogleKey then
|
||||||
--brtexttts = self:_ToStringBULLS(lastknown,true)
|
--brtexttts = self:_ToStringBULLS(lastknown,true)
|
||||||
--end
|
--end
|
||||||
@ -5970,7 +6002,6 @@ function AWACS:onafterReAnchor(From, Event, To, GID)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return self
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end -- end do
|
end -- end do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user