mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#AWACS
* Fixed initial screen text on bogey dope just being x group(s) #PLAYERTASK * Improved logic to declare task succes even if not player is assigned
This commit is contained in:
parent
a7bad8e9f4
commit
0fa4be7c4a
@ -499,7 +499,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "0.2.52", -- #string
|
version = "0.2.53", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@ -2901,6 +2901,7 @@ function AWACS:_BogeyDope(Group)
|
|||||||
if contactsAO > 0 then
|
if contactsAO > 0 then
|
||||||
local dope = self.gettext:GetEntry("DOPE",self.locale)
|
local dope = self.gettext:GetEntry("DOPE",self.locale)
|
||||||
text = string.format(dope,self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
text = string.format(dope,self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
||||||
|
textScreen = string.format(dope,self:_GetCallSign(Group,GID) or "Ghost 1", self.callsigntxt)
|
||||||
local onetxt = self.gettext:GetEntry("ONE",self.locale)
|
local onetxt = self.gettext:GetEntry("ONE",self.locale)
|
||||||
local grptxt = self.gettext:GetEntry("GROUP",self.locale)
|
local grptxt = self.gettext:GetEntry("GROUP",self.locale)
|
||||||
local groupstxt = self.gettext:GetEntry("GROUPMULTI",self.locale)
|
local groupstxt = self.gettext:GetEntry("GROUPMULTI",self.locale)
|
||||||
|
|||||||
@ -96,7 +96,7 @@ PLAYERTASK = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASK.version="0.1.11"
|
PLAYERTASK.version="0.1.12"
|
||||||
|
|
||||||
--- Generic task condition.
|
--- Generic task condition.
|
||||||
-- @type PLAYERTASK.Condition
|
-- @type PLAYERTASK.Condition
|
||||||
@ -661,6 +661,8 @@ function PLAYERTASK:onafterStatus(From, Event, To)
|
|||||||
|
|
||||||
local status = self:GetState()
|
local status = self:GetState()
|
||||||
|
|
||||||
|
if status == "Stopped" then return self end
|
||||||
|
|
||||||
-- Check Target status
|
-- Check Target status
|
||||||
local targetdead = false
|
local targetdead = false
|
||||||
|
|
||||||
@ -673,9 +675,10 @@ function PLAYERTASK:onafterStatus(From, Event, To)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local clientsalive = false
|
||||||
|
|
||||||
if status == "Executing" then
|
if status == "Executing" then
|
||||||
-- Check Clients alive
|
-- Check Clients alive
|
||||||
local clientsalive = false
|
|
||||||
local ClientTable = self.Clients:GetDataTable()
|
local ClientTable = self.Clients:GetDataTable()
|
||||||
for _,_client in pairs(ClientTable) do
|
for _,_client in pairs(ClientTable) do
|
||||||
local client = _client -- Wrapper.Client#CLIENT
|
local client = _client -- Wrapper.Client#CLIENT
|
||||||
@ -689,7 +692,10 @@ function PLAYERTASK:onafterStatus(From, Event, To)
|
|||||||
self:__Failed(-2)
|
self:__Failed(-2)
|
||||||
status = "Failed"
|
status = "Failed"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Continue if we are not done
|
||||||
|
if status ~= "Done" and status ~= "Stopped" then
|
||||||
-- Any success condition true?
|
-- Any success condition true?
|
||||||
local successCondition=self:_EvalConditionsAny(self.conditionSuccess)
|
local successCondition=self:_EvalConditionsAny(self.conditionSuccess)
|
||||||
|
|
||||||
@ -707,12 +713,9 @@ function PLAYERTASK:onafterStatus(From, Event, To)
|
|||||||
if self.verbose then
|
if self.verbose then
|
||||||
self:I(self.lid.."Target dead: "..tostring(targetdead).." | Clients alive: " .. tostring(clientsalive))
|
self:I(self.lid.."Target dead: "..tostring(targetdead).." | Clients alive: " .. tostring(clientsalive))
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- Continue if we are not done
|
|
||||||
if status ~= "Done" then
|
|
||||||
self:__Status(-20)
|
self:__Status(-20)
|
||||||
else
|
elseif status ~= "Stopped" then
|
||||||
self:__Stop(-1)
|
self:__Stop(-1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user