ff392e0e7e
* Initial Methods for SpearheadAPI * Added Spearhead API * Added Spearhead API * fixed compile for api * Added notes for API in beta * Added notes for API in beta * Added Menu to all doc pages * Added Menu to all doc pages * added it for real * added it for real * fixed develop * fixed develop * fixed develop * wip * wip * updated * work in progress * work in progress * added empty docs page * wip * removed SAR files from persistence branch * Added Blue Sams as seperate class * added initial persistance * added initial persistance * added initial persistance * added initial persistance * added initial persistance * added menu to persistence markdown * added menu to persistence markdown * added menu to persistence markdown * docs update * wip * wip * Refactor of Stage classes. * wip * wip * wip * reworked bluesam and stagebase * Added waiting stage functionality * updated docs * wip * wip * wip * updated * wip * wip * wip * refactored without issues, needs testing --------- Co-authored-by: Dutchie <54616262+dutchie032@users.noreply.github.com> Co-authored-by: dutchie032 <dutchie032> Co-authored-by: ex61wi <tim.rorije@ing.com>
22 lines
742 B
Lua
22 lines
742 B
Lua
|
|
|
|
local GlobalFleetManager = {}
|
|
|
|
local fleetGroups = {}
|
|
|
|
GlobalFleetManager.start = function(database)
|
|
|
|
local logger = Spearhead.LoggerTemplate:new("CARRIERFLEET", "INFO")
|
|
|
|
local all_groups = Spearhead.DcsUtil.getAllGroupNames()
|
|
for _, groupName in pairs(all_groups) do
|
|
if Spearhead.Util.startswith(string.lower(groupName), "carriergroup" ) == true then
|
|
logger:info("Registering " .. groupName .. " as a managed fleet")
|
|
local carrierGroup = Spearhead.internal.FleetGroup:new(groupName, database, logger)
|
|
table.insert(fleetGroups, carrierGroup)
|
|
end
|
|
end
|
|
end
|
|
|
|
if not Spearhead.internal then Spearhead.internal = {} end
|
|
Spearhead.internal.GlobalFleetManager = GlobalFleetManager |