mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Update OpsZone.lua
This commit is contained in:
parent
ee85b0e057
commit
f37abc69ea
@ -1232,22 +1232,24 @@ end
|
|||||||
function OPSZONE:_GetMissions()
|
function OPSZONE:_GetMissions()
|
||||||
return self.Missions
|
return self.Missions
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Add an entry to the OpsZone mission table
|
--- Add an entry to the OpsZone mission table
|
||||||
-- @param #OPSZONE self
|
-- @param #OPSZONE self
|
||||||
-- @param #number Coalition Coalition of type e.g. coalition.side.NEUTRAL
|
-- @param #number Coalition Coalition of type e.g. coalition.side.NEUTRAL
|
||||||
-- @param #string Type Type of mission, e.g. AUFTRAG.Type.CAS
|
-- @param #string Type Type of mission, e.g. AUFTRAG.Type.CAS
|
||||||
|
-- @return #boolean found True if we have that kind of mission, else false
|
||||||
-- @return #table Missions Table of Ops.Auftrag#AUFTRAG entries
|
-- @return #table Missions Table of Ops.Auftrag#AUFTRAG entries
|
||||||
function OPSZONE:_FindMissions(Coalition,Type)
|
function OPSZONE:_FindMissions(Coalition,Type)
|
||||||
-- search the table
|
-- search the table
|
||||||
local foundmissions = {}
|
local foundmissions = {}
|
||||||
|
local found = false
|
||||||
for _,_entry in pairs(self.Missions) do
|
for _,_entry in pairs(self.Missions) do
|
||||||
local entry = _entry -- #OPSZONE.MISSION
|
local entry = _entry -- #OPSZONE.MISSION
|
||||||
if entry.Coalition == Coalition and entry.Type == Type and entry.Mission and entry.Mission:IsNotOver() then
|
if entry.Coalition == Coalition and entry.Type == Type and entry.Mission and entry.Mission:IsNotOver() then
|
||||||
table.insert(foundmissions,entry.Mission)
|
table.insert(foundmissions,entry.Mission)
|
||||||
|
found = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return foundmissions
|
return found, foundmissions
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Housekeeping
|
--- Housekeeping
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user