GE Lua Documentation

Press F to search!

getBranchXP

Definition


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

local function getBranchXP(id)
  local branch = getBranchByPath(id)
  if branch.id == 'missing' then return nil end
  local attValue = career_modules_playerAttributes and career_modules_playerAttributes.getAttributeValue(branch.attributeKey)
  return attValue or -1
end

Callers

@/lua/ge/extensions/career/branches.lua
  local branch = getBranchByPath(id)
  local xp = M.getBranchXP(id)
  local level, curLvlProgress, neededForNext, prevThreshold, nextThreshold = calcBranchLevelFromValue(xp, id)
@/lua/ge/extensions/career/modules/branches/leagues.lua
      local neededForLevel = career_branches.getXPNeededForLevel(condition.skillId, condition.level)
      local xp = career_branches.getBranchXP(condition.skillId)
      condition.met = level >= condition.level
@/lua/ge/extensions/career/modules/delivery/tutorial.lua
  if tutorialStatusCache['logistics-delivery'] == nil then
    tutorialStatusCache['logistics-delivery'] = career_branches.getBranchXP("logistics-delivery") == 0
  end
  if tutorialStatusCache['logistics-vehicleDelivery'] == nil then
    tutorialStatusCache['logistics-vehicleDelivery'] = career_branches.getBranchXP("logistics-vehicleDelivery") == 0
  end
  if tutorialStatusCache['logistics-materials'] == nil then
    tutorialStatusCache['logistics-materials'] = career_branches.getBranchXP("logistics-materials") == 0
  end