mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-19 05:36:02 +00:00
Update WingCommander.lua
This commit is contained in:
@@ -64,7 +64,7 @@ WINGCOMMANDER.DEFCON = {
|
|||||||
|
|
||||||
--- WINGCOMMANDER class version.
|
--- WINGCOMMANDER class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
WINGCOMMANDER.version="0.0.3"
|
WINGCOMMANDER.version="0.1.0"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@@ -156,7 +156,7 @@ end
|
|||||||
-- User functions
|
-- User functions
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
--- Set this to be an air-to-any dispatcher, i.e. engaging air, ground and navel targets. This is the default anyway.
|
--- Set this to be an air-to-any dispatcher, i.e. engaging air, ground and naval targets. This is the default anyway.
|
||||||
-- @param #WINGCOMMANDER self
|
-- @param #WINGCOMMANDER self
|
||||||
-- @return #WINGCOMMANDER self
|
-- @return #WINGCOMMANDER self
|
||||||
function WINGCOMMANDER:SetAirToAny()
|
function WINGCOMMANDER:SetAirToAny()
|
||||||
@@ -410,9 +410,15 @@ function WINGCOMMANDER:onafterStatus(From, Event, To)
|
|||||||
Nyellow=Nyellow+1
|
Nyellow=Nyellow+1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Is this a threat?
|
||||||
local threat=contact.threatlevel>=self.threatLevelMin and contact.threatlevel<=self.threatLevelMax
|
local threat=contact.threatlevel>=self.threatLevelMin and contact.threatlevel<=self.threatLevelMax
|
||||||
|
|
||||||
if not contact.mission then
|
local redalert=true
|
||||||
|
if self.borderzoneset:Count()>0 then
|
||||||
|
redalert=inred
|
||||||
|
end
|
||||||
|
|
||||||
|
if redalert and threat and not contact.mission then
|
||||||
|
|
||||||
-- Create a mission based on group category.
|
-- Create a mission based on group category.
|
||||||
local mission=AUFTRAG:NewAUTO(group)
|
local mission=AUFTRAG:NewAUTO(group)
|
||||||
|
|||||||
Reference in New Issue
Block a user