add fix for recipes having no final amount added

This commit is contained in:
Jim Shield
2024-01-18 15:33:51 +00:00
committed by GitHub
parent bc5aadc394
commit 35202f7000

View File

@@ -39,6 +39,7 @@ function craftingMenu(data) local hasjob = false
for i = 1, #Recipes do
for k, v in pairs(Recipes[i]) do
if k ~= "amount" and k ~= "job" and k ~= "gang" then
if not Recipes[i]["amount"] then Recipes[i]["amount"] = 1 end
if Recipes[i].job then hasjob = false
for l, b in pairs(Recipes[i].job) do
hasjob = hasJob(l, nil, b)