From 791629af63f0a0d978043d23ffac93520ecfb387 Mon Sep 17 00:00:00 2001 From: Ade <923+ade@noreply.octowow.st> Date: Wed, 4 Nov 2026 04:52:30 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipes.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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