diff --git a/recipes.lua b/recipes.lua index 5aa37ea..556bc7f 100644 --- a/recipes.lua +++ b/recipes.lua @@ -88,10 +88,12 @@ function AA.RecipeList(c, prof, mode, sort) return out 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) 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")) return table.getn(pr.rec), miss end