From f37abc69ea59fcf68b5d7e5a9f410a63ea4b1bfc Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Fri, 19 Nov 2021 14:29:18 +0100 Subject: [PATCH] Update OpsZone.lua --- Moose Development/Moose/Ops/OpsZone.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Ops/OpsZone.lua b/Moose Development/Moose/Ops/OpsZone.lua index ca25cb291..5674c6467 100644 --- a/Moose Development/Moose/Ops/OpsZone.lua +++ b/Moose Development/Moose/Ops/OpsZone.lua @@ -1232,22 +1232,24 @@ end function OPSZONE:_GetMissions() return self.Missions end - --- Add an entry to the OpsZone mission table -- @param #OPSZONE self -- @param #number Coalition Coalition of type e.g. coalition.side.NEUTRAL -- @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 function OPSZONE:_FindMissions(Coalition,Type) -- search the table local foundmissions = {} + local found = false for _,_entry in pairs(self.Missions) do local entry = _entry -- #OPSZONE.MISSION if entry.Coalition == Coalition and entry.Type == Type and entry.Mission and entry.Mission:IsNotOver() then table.insert(foundmissions,entry.Mission) + found = true end end - return foundmissions + return found, foundmissions end --- Housekeeping