Загрузить файлы в «/»
This commit is contained in:
+4
-2
@@ -88,10 +88,12 @@ function AA.RecipeList(c, prof, mode, sort)
|
|||||||
return out
|
return out
|
||||||
end
|
end
|
||||||
|
|
||||||
-- number of known / missing recipes (nil when the recipe list was never scanned or no data exists)
|
-- number of known recipes and (when the bundled database covers the profession) missing ones;
|
||||||
|
-- nil when the recipe list was never scanned. Professions without a database (e.g. Poisons) give known, nil.
|
||||||
function AA.RecipeCounts(c, prof)
|
function AA.RecipeCounts(c, prof)
|
||||||
local pr = c and c.prof and c.prof[prof]
|
local pr = c and c.prof and c.prof[prof]
|
||||||
if not pr or not pr.rec or not AA.RDATA[prof] then return nil end
|
if not pr or not pr.rec then return nil end
|
||||||
|
if not AA.RDATA[prof] then return table.getn(pr.rec), nil end
|
||||||
local miss = table.getn(AA.RecipeList(c, prof, "missing", "name"))
|
local miss = table.getn(AA.RecipeList(c, prof, "missing", "name"))
|
||||||
return table.getn(pr.rec), miss
|
return table.getn(pr.rec), miss
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user