GE Lua Documentation

Press F to search!

depthIdSortUsingIds

Definition


-- @/lua/ge/extensions/gameplay/missions/unlocks.lua:337
M.depthIdSortUsingIds = function(aId,bId)
  local a, b = gameplay_missions_missions.getMissionById(aId), gameplay_missions_missions.getMissionById(bId)
  if not a or not b then return false end
  if not a.unlocks or not b.unlocks or a.unlocks.depth == b.unlocks.depth then
    return a.id < b.id
  else
    return a.unlocks.depth < b.unlocks.depth
  end
end

Callers