mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#AWACS
* Make markers and drawings strictly coalition specific
This commit is contained in:
parent
c7baaa26f2
commit
3322609f87
@ -27,7 +27,7 @@ do
|
|||||||
-- @field #string ClassName Name of this class.
|
-- @field #string ClassName Name of this class.
|
||||||
-- @field #string version Versioning.
|
-- @field #string version Versioning.
|
||||||
-- @field #string lid LID for log entries.
|
-- @field #string lid LID for log entries.
|
||||||
-- @field #number coalition Colition side.
|
-- @field #number coalition Coalition side.
|
||||||
-- @field #string coalitiontxt e.g."blue"
|
-- @field #string coalitiontxt e.g."blue"
|
||||||
-- @field Core.Zone#ZONE OpsZone,
|
-- @field Core.Zone#ZONE OpsZone,
|
||||||
-- @field Core.Zone#ZONE StationZone,
|
-- @field Core.Zone#ZONE StationZone,
|
||||||
@ -497,7 +497,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "0.2.43", -- #string
|
version = "0.2.44", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@ -1788,10 +1788,10 @@ function AWACS:SetAdditionalZone(Zone, Draw)
|
|||||||
self:T(self.lid.."SetAdditionalZone")
|
self:T(self.lid.."SetAdditionalZone")
|
||||||
self.BorderZone = Zone
|
self.BorderZone = Zone
|
||||||
if self.debug then
|
if self.debug then
|
||||||
Zone:DrawZone(-1,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
Zone:DrawZone(self.coalition,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
||||||
MARKER:New(Zone:GetCoordinate(),"Defensive Zone"):ToAll()
|
MARKER:New(Zone:GetCoordinate(),"Defensive Zone"):ToCoalition(self.coalition)
|
||||||
elseif Draw then
|
elseif Draw then
|
||||||
Zone:DrawZone(-1,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
Zone:DrawZone(self.coalition,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1805,11 +1805,11 @@ function AWACS:SetRejectionZone(Zone,Draw)
|
|||||||
self:T(self.lid.."SetRejectionZone")
|
self:T(self.lid.."SetRejectionZone")
|
||||||
self.RejectZone = Zone
|
self.RejectZone = Zone
|
||||||
if Draw then
|
if Draw then
|
||||||
Zone:DrawZone(-1,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
Zone:DrawZone(self.coalition,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
||||||
--MARKER:New(Zone:GetCoordinate(),"Rejection Zone"):ToAll()
|
--MARKER:New(Zone:GetCoordinate(),"Rejection Zone"):ToAll()
|
||||||
elseif self.debug then
|
elseif self.debug then
|
||||||
Zone:DrawZone(-1,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
Zone:DrawZone(self.coalition,{1,0.64,0},1,{1,0.64,0},0.2,1,true)
|
||||||
MARKER:New(Zone:GetCoordinate(),"Rejection Zone"):ToAll()
|
MARKER:New(Zone:GetCoordinate(),"Rejection Zone"):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1818,7 +1818,7 @@ end
|
|||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:DrawFEZ()
|
function AWACS:DrawFEZ()
|
||||||
self.OpsZone:DrawZone(-1,{1,0,0},1,{1,0,0},0.2,5,true)
|
self.OpsZone:DrawZone(self.coalition,{1,0,0},1,{1,0,0},0.2,5,true)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -3780,7 +3780,7 @@ function AWACS:_MoveAnchorStackFromMarker(Name,Coord)
|
|||||||
marker:UpdateText(stationtag)
|
marker:UpdateText(stationtag)
|
||||||
station.AnchorMarker = marker
|
station.AnchorMarker = marker
|
||||||
if self.debug then
|
if self.debug then
|
||||||
station.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
station.StationZone:DrawZone(self.coalition,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
end
|
end
|
||||||
self.AnchorStacks:Push(station,Name)
|
self.AnchorStacks:Push(station,Name)
|
||||||
end
|
end
|
||||||
@ -3811,12 +3811,12 @@ function AWACS:_CreateAnchorStackFromMarker(Name,Coord)
|
|||||||
|
|
||||||
--push to AnchorStacks
|
--push to AnchorStacks
|
||||||
if self.debug then
|
if self.debug then
|
||||||
AnchorStackOne.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
AnchorStackOne.StationZone:DrawZone(self.coalition,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
else
|
else
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.AnchorStacks:Push(AnchorStackOne,newname)
|
self.AnchorStacks:Push(AnchorStackOne,newname)
|
||||||
@ -3857,12 +3857,12 @@ function AWACS:_CreateAnchorStack()
|
|||||||
--push to AnchorStacks
|
--push to AnchorStacks
|
||||||
if self.debug then
|
if self.debug then
|
||||||
--self.AnchorStacks:Flush()
|
--self.AnchorStacks:Flush()
|
||||||
AnchorStackOne.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
AnchorStackOne.StationZone:DrawZone(self.coalition,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
else
|
else
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
self.AnchorStacks:Push(AnchorStackOne,newname)
|
self.AnchorStacks:Push(AnchorStackOne,newname)
|
||||||
else
|
else
|
||||||
@ -3885,12 +3885,12 @@ function AWACS:_CreateAnchorStack()
|
|||||||
--push to AnchorStacks
|
--push to AnchorStacks
|
||||||
if self.debug then
|
if self.debug then
|
||||||
--self.AnchorStacks:Flush()
|
--self.AnchorStacks:Flush()
|
||||||
AnchorStackOne.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
AnchorStackOne.StationZone:DrawZone(self.coalition,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
else
|
else
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
self.AnchorStacks:Push(AnchorStackOne,newname)
|
self.AnchorStacks:Push(AnchorStackOne,newname)
|
||||||
end
|
end
|
||||||
@ -4819,12 +4819,12 @@ function AWACS:AddCAPAirWing(AirWing,Zone)
|
|||||||
--push to AnchorStacks
|
--push to AnchorStacks
|
||||||
if self.debug then
|
if self.debug then
|
||||||
--self.AnchorStacks:Flush()
|
--self.AnchorStacks:Flush()
|
||||||
AnchorStackOne.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
AnchorStackOne.StationZone:DrawZone(self.coalition,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
else
|
else
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",newname,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToAll()
|
AnchorStackOne.AnchorMarker=MARKER:New(AnchorStackOne.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
self.AnchorStacks:Push(AnchorStackOne,newname)
|
self.AnchorStacks:Push(AnchorStackOne,newname)
|
||||||
AirWing.HasOwnStation = true
|
AirWing.HasOwnStation = true
|
||||||
@ -5601,28 +5601,28 @@ function AWACS:onafterStart(From, Event, To)
|
|||||||
local controlzonename = "FEZ-"..self.AOName
|
local controlzonename = "FEZ-"..self.AOName
|
||||||
self.ControlZone = ZONE_RADIUS:New(controlzonename,self.OpsZone:GetVec2(),UTILS.NMToMeters(self.ControlZoneRadius))
|
self.ControlZone = ZONE_RADIUS:New(controlzonename,self.OpsZone:GetVec2(),UTILS.NMToMeters(self.ControlZoneRadius))
|
||||||
if self.debug then
|
if self.debug then
|
||||||
self.ControlZone:DrawZone(-1,{0,1,0},1,{1,0,0},0.05,3,true)
|
self.ControlZone:DrawZone(self.coalition,{0,1,0},1,{1,0,0},0.05,3,true)
|
||||||
--MARKER:New(self.ControlZone:GetCoordinate(),"Radar Zone"):ToAll()
|
--MARKER:New(self.ControlZone:GetCoordinate(),"Radar Zone"):ToAll()
|
||||||
self.OpsZone:DrawZone(-1,{1,0,0},1,{1,0,0},0.2,5,true)
|
self.OpsZone:DrawZone(self.coalition,{1,0,0},1,{1,0,0},0.2,5,true)
|
||||||
local AOCoordString = self.AOCoordinate:ToStringLLDDM()
|
local AOCoordString = self.AOCoordinate:ToStringLLDDM()
|
||||||
local Rocktag = string.format("FEZ: %s\nBulls Coordinate: %s",self.AOName,AOCoordString)
|
local Rocktag = string.format("FEZ: %s\nBulls Coordinate: %s",self.AOName,AOCoordString)
|
||||||
MARKER:New(self.AOCoordinate,Rocktag):ToAll()
|
MARKER:New(self.AOCoordinate,Rocktag):ToCoalition(self.coalition)
|
||||||
self.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
self.StationZone:DrawZone(self.coalition,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
if not self.GCI then
|
if not self.GCI then
|
||||||
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToAll()
|
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
self.OrbitZone:DrawZone(-1,{0,1,0},1,{0,1,0},0.2,5,true)
|
self.OrbitZone:DrawZone(self.coalition,{0,1,0},1,{0,1,0},0.2,5,true)
|
||||||
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToAll()
|
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local AOCoordString = self.AOCoordinate:ToStringLLDDM()
|
local AOCoordString = self.AOCoordinate:ToStringLLDDM()
|
||||||
local Rocktag = string.format("FEZ: %s\nBulls Coordinate: %s",self.AOName,AOCoordString)
|
local Rocktag = string.format("FEZ: %s\nBulls Coordinate: %s",self.AOName,AOCoordString)
|
||||||
MARKER:New(self.AOCoordinate,Rocktag):ToAll()
|
MARKER:New(self.AOCoordinate,Rocktag):ToCoalition(self.coalition)
|
||||||
if not self.GCI then
|
if not self.GCI then
|
||||||
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToAll()
|
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToAll()
|
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToCoalition(self.coalition)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self.GCI then
|
if not self.GCI then
|
||||||
|
|||||||
@ -1033,9 +1033,9 @@ function PLAYERRECCE:onafterStop(From, Event, To)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ test script
|
--[[
|
||||||
local PlayerSet = SET_CLIENT:New():FilterCoalitions("blue"):FilterActive(true):FilterCategories("helicopter"):FilterStart()
|
local PlayerSet = SET_CLIENT:New():FilterCoalitions("blue"):FilterActive(true):FilterCategories("helicopter"):FilterStart()
|
||||||
local Attackers = SET_CLIENT:New():FilterCoalitions("blue"):FilterActive(true):FilterStart()
|
local Attackers = SET_CLIENT:New():FilterCoalitions("blue"):FilterActive(true):FilterPrefixes({"CAS","BAI"}):FilterStart()
|
||||||
local myrecce = PLAYERRECCE:New("1st Forward FACA",coalition.side.BLUE,PlayerSet)
|
local myrecce = PLAYERRECCE:New("1st Forward FACA",coalition.side.BLUE,PlayerSet)
|
||||||
myrecce:SetAttackSet(Attackers)
|
myrecce:SetAttackSet(Attackers)
|
||||||
--]]
|
--]]
|
||||||
Loading…
x
Reference in New Issue
Block a user