sorcery  Check-in [5386806605]

Overview
Comment:add defensive check against recipes that change types
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 538680660560b8a614fcafd8e45ed4885dce869ed9191ae504329f5bc12fa535
User & Date: lexi on 2021-07-10 21:15:26
Other Links: manifest | tags
Context
2021-07-10
21:15
make proper keg recipe canonical check-in: 3f5aae21c0 user: lexi tags: trunk
21:15
add defensive check against recipes that change types check-in: 5386806605 user: lexi tags: trunk
00:43
remove unnecessary neighbor restriction check-in: ced73b0ebe user: lexi tags: trunk
Changes

Modified cookbook.lua from [bc084489e5] to [207e1d6da6].

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