524
525
526
527
528
529
530
531
532
533
534
535
536
537
|
if not recipe_kinds[kind] then
log.fatalf('attempted to pick recipe of unknown kind "%s"', kind)
end
return recipe_kinds[kind].pick(restrict), kind
end
local render_recipe = function(kind,ingredients,result,notes_right)
local k = recipe_kinds[kind]
local t = ''
local props = k.props(result)
for i=1,#k.slots do
local ing = ingredients[i]
local x, y = k.slots[i][1], k.slots[i][2]
if ing and ing ~= '' then
|
|
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
|
if not recipe_kinds[kind] then
log.fatalf('attempted to pick recipe of unknown kind "%s"', kind)
end
return recipe_kinds[kind].pick(restrict), kind
end
local render_recipe = function(kind,ingredients,result,notes_right)
if not ingredients then
log.errf('tried to render %s recipe for %s but no ingredients are listed', kind, result)
return false
end
local k = recipe_kinds[kind]
local t = ''
local props = k.props(result)
for i=1,#k.slots do
local ing = ingredients[i]
local x, y = k.slots[i][1], k.slots[i][2]
if ing and ing ~= '' then
|