getManagerModule
Definition
-- @/lua/ge/extensions/core/flowgraphManager.lua:88
local function getManagerModule(mgrId, moduleName) -- safely retrieves a module from an active manager; returns nil if any id fails
-- use this instead of core_flowgraphManager.getManagerByID(mid).modules.moduleName
local mgr = getManagerByID(mgrId)
if mgr then
return mgr.modules[moduleName]
end
end
Callers
@/lua/ge/extensions/flowgraph/modules/vehicleModule.lua
function(ret)
local m = core_flowgraphManager.getManagerModule(self.mgr.id, 'vehicle')
if m then
@/lua/ge/extensions/flowgraph/modules/buttonModule.lua
function C:getCmd(id)
return 'local m = core_flowgraphManager.getManagerModule('..self.mgr.id..', "button") if m then m:buttonClicked('..id..') end'
end
@/lua/ge/extensions/flowgraph/modules/cameraModule.lua
function C:getCmd(id)
return 'local m = core_flowgraphManager.getManagerModule('..self.mgr.id..', "button") if m then m:buttonClicked('..id..') end'
end