GE Lua Documentation

Press F to search!

getBranchById

Definition


-- @/lua/ge/extensions/career/branches.lua:248

local function getBranchById(id)
  return M.getBranchByPath(id)
end

Callers

@/lua/ge/extensions/editor/missionEditor.lua
    if branch.parentId then
      local parent = career_branches.getBranchById(branch.parentId)
      if parent.parentDomain == "apm" or parent.id == "apm" then
    local validXP = mission.careerSetup.skill
    local branch = career_branches.getBranchById(validXP)
    while branch and not branch.missing and branch.showProgressAsStars do
      validXP = branch.parentId
      branch = career_branches.getBranchById(validXP)
    end
            else
              local branch = career_branches.getBranchById(reward.attributeKey)
              if not branch.missing and not branch.showProgressAsStars then
@/lua/ge/extensions/gameplay/missions/progress.lua
  if career_career and career_career.isActive() then
    local branch = career_branches.getBranchById(mission.careerSetup.skill)
    branchMultiplier = career_branches.getLevelRewardMultiplier(branch.id)
    if not branchMultiplier then
      local parentBranch = career_branches.getBranchById(branch.parentId)
      branchMultiplier = career_branches.getLevelRewardMultiplier(parentBranch.id)
      if rewardData.attributeKey == "money" and starRewards.rewardMultiplierAdditionalAmount > 0 and starRewards.rewardMultiplierBasedOnBranch then
        local branch = career_branches.getBranchById(starRewards.rewardMultiplierBasedOnBranch)
        table.insert(rewardData.breakdown, {
    -- Add attribute name/label and color
    local branch = career_branches.getBranchById(key)
    rewardInfo.soundClass = "progressBar"
@/lua/ge/extensions/career/modules/milestones/generalMilestones/missions.lua
  local totalStarCount = defaultStarCount + bonusStarCount
  local branchName = career_branches.getBranchById(branchKey).name
  branchName = translateLanguage(branchName, branchName, true)
      getLabel = function(step, displayValue, target) return string.format("%s Star Collector", branchName) end,
      getDescription = function(step, displayValue, target) return string.format("Collect %d stars from challenges in the %s %s.", target, branchName, career_branches.getBranchById(branchKey).isSkill and "Skill" or "Branch" ) end,
      getProgressLabel = function(step, current, target) return string.format("%d Stars / %d Stars", current, target) end,
@/lua/ge/extensions/career/modules/delivery/progress.lua
  for key, _ in ipairs(branchInfo) do
    local branch = career_branches.getBranchById(key)
    if branch.id == "key" then
    else
      local branch = career_branches.getBranchById(key)
      branchInfo[key] = {
  if skill == "delivery" and tier > 1 then
    career_branches.getBranchById("vehicleDelivery").unlocked = true
  end
@/lua/ge/extensions/career/modules/milestones/generalMilestones/branches.lua
      if not color then
        local parentBranch = career_branches.getBranchById(branchInfo.parentBranch)
        color = parentBranch.color
@/lua/ge/extensions/career/modules/branches/leagues.lua
      }
      local branch = career_branches.getBranchById(condition.skillId)
      condition.label = string.format("Reach level %d of '%s'", condition.level,  translateLanguage(branch.name, branch.name, true))
      }
      local branch = career_branches.getBranchById(condition.skillId)
      condition.label = string.format("Get %d stars in '%s'", condition.stars,  translateLanguage(branch.name, branch.name, true))
      }
      local branch = career_branches.getBranchById(condition.branchId)
      condition.label = string.format("Get %d stars in '%s'", condition.stars,  translateLanguage(branch.name, branch.name, true))

  local skill = career_branches.getBranchById(league.skillId)
  if skill then
    local league = formatLeague(l)
    local skill = career_branches.getBranchById(league.skillId)
    if not branchId or branchId == skill.id or (skill.parentId == branchId and not ignoreSubSkills) then
            league.skillPathId = career_branches.extractBranchPathIdFromFilePath(file)
            local skill = career_branches.getBranchById(league.skillPathId)
            league.skillId = skill.pathId
  }
  local branch = career_branches.getBranchById(skillId)
  league.name = string.format("%s Challenges", translateLanguage(branch.name, branch.name, true))
  end
  local skill = career_branches.getBranchById(league.skillId)
  if skill and skill.parentBranch then
@/lua/ge/extensions/career/branches.lua
            local hasLevel =  getBranchLevel(id) >= lvl
            local isUnlocked = getBranchById(id).unlocked
            return hasLevel and isUnlocked
@/lua/ge/extensions/freeroam/bigMapPoiProvider.lua
    if branch and not branch.isDomain then
      local domain = career_branches.getBranchById(branch.parentDomain)
      groupData["branch_"..branch.id] = {label = {txt = "ui.career.domainSlashBranch", context={domain=domain.name, branch=branch.name}}}
  if career_career.isActive() and mission.careerSetup.skill then
    local skill = career_branches.getBranchById(mission.careerSetup.skill)
    if skill then
  for _, domainId in ipairs(branchOrdered) do
    local domain = career_branches.getBranchById(domainId)
    if domain.isDomain then
      for _, branchId in ipairs(branchOrdered) do
        local branch = career_branches.getBranchById(branchId)
        if branch.parentDomain == domainId then
@/lua/ge/extensions/freeroam/vueBigMap.lua
      if branch and not branch.isDomain then
        local domain = career_branches.getBranchById(branch.parentDomain)
        groupData["branch_"..branch.id] = {label = {txt = "ui.career.domainSlashBranch", context={domain=domain.name, branch=branch.name}}}
  if career_career.isActive() and mission.careerSetup.skill then
    local skill = career_branches.getBranchById(mission.careerSetup.skill)
    if skill then
    for _, domainId in ipairs(branchOrdered) do
      local domain = career_branches.getBranchById(domainId)
      if domain.isDomain then
        for _, branchId in ipairs(branchOrdered) do
          local branch = career_branches.getBranchById(branchId)
          if branch.parentDomain == domainId then
@/lua/ge/extensions/career/modules/branches/landing.lua
  career_branches.checkUnlocks()
  local br = career_branches.getBranchById(branchId)
  local attKey = br.attributeKey
    -- Set heading/description based on domain
    local domainBranch = career_branches.getBranchById(pathId)
    if domainBranch then
      local parentBreadcrumbs = {}
      local parentBranch = career_branches.getBranchById(domainBranch.parentId)
      table.insert(parentBreadcrumbs, {label = translate(domainBranch.name), gotoPath = {path = "progressLanding", props = {pathId = domainBranch.id}}})
        table.insert(parentBreadcrumbs, {label = translate(parentBranch.name), gotoPath = {path = "progressLanding", props = {pathId = parentBranch.id}}})
        parentBranch = career_branches.getBranchById(parentBranch.parentId)
      end