GE Lua Documentation

Press F to search!

getManagerByID

Definition


-- @/lua/ge/extensions/core/flowgraphManager.lua:69

local function getManagerByID(id)
  for _,mgr in ipairs(managers) do
    if mgr.id == id then
      return mgr
    end
  end
  return nil
end

Callers

@/lua/ge/extensions/flowgraph/modules/threadModule.lua
  self.mgr:logEvent("Sent Message "..name.." to " .. dumps(targetId),"I", "A message has been sent to id " .. dumps(targetId)..". Contents: " .. dumpsz(message, 2), {type = "node", node = sourceNode})
  local target = core_flowgraphManager.getManagerByID(targetId)
  if targetId == -1 then target = core_flowgraphManager.getManagerByID(self.parentId) end
  local target = core_flowgraphManager.getManagerByID(targetId)
  if targetId == -1 then target = core_flowgraphManager.getManagerByID(self.parentId) end
  if not target then return false end
    local fgId = childData.fgId
    local childFg = core_flowgraphManager.getManagerByID(fgId)
    if childFg then
@/lua/ge/extensions/core/flowgraphManager.lua
local function getManagerGraphNode(mgrId, graphId, nodeId) -- safely retrieves a node from an active manager; returns nil if any id fails
  -- use this instead of core_flowgraphManager.getManagerByID(mid).graphs[gid].nodes[nid]
  local mgr = getManagerByID(mgrId)
  -- use this instead of core_flowgraphManager.getManagerByID(mid).graphs[gid].nodes[nid]
  local mgr = getManagerByID(mgrId)
  if mgr then
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)
  -- use this instead of core_flowgraphManager.getManagerByID(mid).modules.moduleName
  local mgr = getManagerByID(mgrId)
  if mgr then
@/lua/ge/extensions/flowgraph/nodes/ui/customUiLayout.lua
function C:getCmd(action)
  return 'core_flowgraphManager.getManagerByID('..self.mgr.id..').graphs['..self.graph.id..'].nodes['..self.id..']:setLayout'
end
@/lua/ge/extensions/flowgraph/nodes/ui/customButtonTEST.lua
function C:getCmd(action)
  return 'core_flowgraphManager.getManagerByID('..self.mgr.id..').graphs['..self.graph.id..'].nodes['..self.id..']:buttonPushed("'..action..'")'
end
@/lua/ge/extensions/flowgraph/modules/vehicleModule.lua
    -- instantly get the couple offsets
    --veh:queueLuaCommand('beamstate.getCouplerOffset("core_flowgraphManager.getManagerByID('..self.mgr.id..').modules.vehicle:addCouplerOffset(%s,%s)")')
    for tag, _ in pairs(couplerTags) do
    -- instantly get the damage tracker
    --veh:queueLuaCommand('damageTracker.registerDamageUpdateCallback(function(a,b) obj:queueGameEngineLua("core_flowgraphManager.getManagerByID('..self.mgr.id..'):broadcastCall(\'onVehiclePartDamageTracker\',"..obj:getId()..","..dumps(a)..","..dumps(b)..")") end)')
  end