sorcery  Artifact [b5f23ba87a]

Artifact b5f23ba87aaf2cca57b8528b3d87605bbc951de54e78ca60320c5862985a1e7d:

  • File recipes.lua — part of check-in [72eebac4bc] at 2020-09-26 18:49:51 on branch trunk — add writing stand for editing codexes; add scissors, ink, erasure fluid, pens; touch up codex UI; add many recipe notes; add craft divination type for crafttools; defuckulate fucktarded crafttool impl; enhance table library with missing features like lua's table.unpack; many bug fixes and enhancements; blood for the blood god (user: lexi, size: 20907) [annotate] [blame] [check-ins using]

-- tweaks

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"group:water_bucket",
		"vessels:glass_bottle",
		"vessels:glass_bottle",
		"vessels:glass_bottle"
	};
	output = "sorcery:potion_water 3";
	replacements = {
		{ "group:water_bucket", "bucket:bucket_empty" }
	};
}
minetest.register_craft {
	output = 'dye:white 4';
	recipe = {
		{'',           'sorcery:ash',             ''};
		{'sorcery:ash','basic_materials:paraffin','sorcery:ash'};
		{'',           'bucket:bucket_water',     ''};
	};
	replacements = {
		{'bucket:bucket_water', 'bucket:bucket_empty'};
	};
};

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"bucket:bucket_empty";
		"sorcery:potion_water";
		"sorcery:potion_water";
		"sorcery:potion_water";
	};
	output = "bucket:bucket_water";
	replacements = {
		{ "sorcery:potion_water", "vessels:glass_bottle" };
		{ "sorcery:potion_water", "vessels:glass_bottle" };
		{ "sorcery:potion_water", "vessels:glass_bottle" };
	};
}

minetest.register_craft {
	type = 'shapeless';
	recipe = {
		'group:scissors';
		'basic_materials:plastic_sheet';
	};
	output = 'basic_materials:plastic_strip 3';
	replacements = {
		{'group:scissors','group:scissors'};
	};
}

--[[
minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"farming:sugar",
		"group:food_blueberries",
		"group:food_raspberries",
		"sorcery:extract_wheat",
		"sorcery:extract_wheat",
		"xdecor:bowl"
	};
	output = "sorcery:oil_mystic";
	replacements = {
		{ "farming:mortar_pestle", "farming:mortar_pestle" },
		{ "sorcery:extract_wheat", "vessels:glass_bottle" },
		{ "sorcery:extract_wheat", "vessels:glass_bottle" }
	};
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"group:food_berry",
		"group:food_berry",
		"group:food_berry",
		"xdecor:bowl"
	};
	output = "sorcery:oil_berry";
	replacements = {
		{ "farming:mortar_pestle", "farming:mortar_pestle" }
	};
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mortar_pestle",
		"group:food_mushroom",
		"group:food_mushroom",
		"group:food_mushroom",
		"xdecor:bowl"
	};
	output = "sorcery:oil_mushroom";
	replacements = {
		{ "farming:mortar_pestle", "farming:mortar_pestle" }
	};
}
]]
--[[
minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mixing_bowl",
		"sorcery:grease_pine",
		"sorcery:extract_cotton",
		"sorcery:extract_cotton",
		"sorcery:extract_cotton"
	};
	output = "sorcery:oil_whisper";
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
		{'sorcery:extract_cotton', 'vessels:glass_bottle'};
	};
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mixing_bowl";
		"sorcery:oil_whisper";
		"sorcery:pine_grease";
		"sorcery:extract_rye";
		"sorcery:extract_rye";
		"sorcery:extract_barley";
		"farming:salt";
	};
	output = "sorcery:oil_wind 2";
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{'sorcery:extract_rye', 'vessels:glass_bottle'};
		{'sorcery:extract_rye', 'vessels:glass_bottle'};
		{'sorcery:extract_barley', 'vessels:glass_bottle'};
	};
}

minetest.register_craft {
	type = 'shapeless';
	recipe = {
		"farming:mixing_bowl";
		'sorcery:oil_fog';
		'sorcery:oil_wind';
		'sorcery:blood';
		'sorcery:blood';
		'sorcery:blood';
	};
	output = 'sorcery:grease_storm 2';
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{'sorcery:blood', 'vessels:glass_bottle' }
	}
}

minetest.register_craft {
	type = "shapeless";
	recipe = {
		"farming:mixing_bowl";
		'sorcery:extract_rice',
		'sorcery:oil_berry',
	};
	output = 'sorcery:oil_fog';
	replacements = {
		{'farming:mixing_bowl', 'farming:mixing_bowl'};
		{ 'sorcery:extract_rice', 'vessels:glass_bottle' }
	};
}
]]

minetest.register_craft {
	recipe = {
		{"", "default:gold_ingot"},
		{"default:bronze_ingot",""}
	};
	output = "sorcery:dagger";
}

---- magitech

-- infuser
minetest.register_craftitem('sorcery:infuser_tube', {
	inventory_image = 'sorcery_infuser_tube.png';
	description = 'Infusion Tube';
	groups = {
		sorcery_magitech = 1; metal = 1;
	};
})
minetest.register_craft {
	recipe = {
		{"basic_materials:copper_strip",'sorcery:infuser_concentrator', "basic_materials:copper_strip"};
		{"", "basic_materials:copper_strip", "basic_materials:gold_wire"};
		{"", "basic_materials:copper_strip", ""};
	};
	replacements = {
		{"basic_materials:gold_wire", "basic_materials:empty_spool"}
	};
	output = "sorcery:infuser_tube";
}

minetest.register_craftitem('sorcery:infuser_chamber', {
	inventory_image = 'sorcery_infuser_chamber.png';
	description = 'Infusion Chamber';
	groups = {
		sorcery_magitech = 1;
	};
})
minetest.register_craft {
	recipe = {
		{'default:clay_brick','sorcery:grease_sealant','default:clay_brick'};
		{'default:clay_brick','stairs:slab_steelblock','default:clay_brick'};
	};
	replacements = {
		{'sorcery:grease_sealant','xdecor:bowl'};
	};
	output = "sorcery:infuser_chamber";
}

minetest.register_craftitem('sorcery:infuser_concentrator', {
	inventory_image = 'sorcery_infuser_concentrator.png';
	description = 'Infusion Concentrator';
	groups = {
		sorcery_magitech = 1;
	};
})

minetest.register_craft {
	recipe = {
		{'basic_materials:steel_wire'};
		{'default:obsidian_shard'};
		{'basic_materials:copper_wire'};
	};
	replacements = {
		{'basic_materials:steel_wire', 'basic_materials:empty_spool'};
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
	output = "sorcery:infuser_concentrator";
}

minetest.register_craft {
	type = 'shapeless';
	recipe = {
		'basic_materials:empty_spool';
		'basic_materials:empty_spool';
		'sorcery:infuser_concentrator';
	};
	replacements = {
		{'basic_materials:empty_spool', 'basic_materials:steel_wire'};
		{'basic_materials:empty_spool', 'basic_materials:copper_wire'};
	};
	output = "default:obsidian_shard";
}

minetest.register_craft {
	type = 'shapeless';
	recipe = {
		'xdecor:honey';
		'xdecor:bowl';
		'basic_materials:oil_extract';
	};
	output = "sorcery:grease_sealant";
}

minetest.register_craft {
	recipe = {
		{ 'default:tin_ingot', 'bucket:bucket_empty', 'default:tin_ingot'};
		{ 'default:bronze_ingot', 'sorcery:infuser_chamber', 'default:copper_ingot'};
		{ 'sorcery:infuser_tube', 'sorcery:infuser_tube', 'sorcery:infuser_tube' };
	};
	output = "sorcery:infuser";
}

minetest.register_craft {
	output = "sorcery:displacer";
	recipe = {
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
		{'basic_materials:copper_wire','sorcery:core_syncretic','doors:trapdoor_steel'};
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
	};
	replacements = {
		{'basic_materials:copper_wire','basic_materials:empty_spool'};
	};
}

minetest.register_craft {
	output = "sorcery:displacer_transmit_attune";
	recipe = {
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
		{'sorcery:leyline_stabilizer','sorcery:core_mandatic','sorcery:tuning_disc'};
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
	};
}

minetest.register_craft {
	output = "sorcery:displacer_transmit_gem";
	recipe = {
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
		{'sorcery:leyline_stabilizer','sorcery:core_mandatic','sorcery:gem_ruby'};
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
	};
}

minetest.register_craft {
	output = "sorcery:displacer_receive_attune";
	recipe = {
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
		{'sorcery:inverter_coil','sorcery:core_mandatic','sorcery:tuning_disc'};
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
	};
}

minetest.register_craft {
	output = "sorcery:displacer_receive_gem";
	recipe = {
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
		{'sorcery:inverter_coil','sorcery:core_mandatic','sorcery:gem_ruby'};
		{'sorcery:platinum_ingot','sorcery:screw_tungsten','sorcery:platinum_ingot'};
	};
}

minetest.register_craft {
	output = 'sorcery:raycaster';
	recipe = {
		{'sorcery:gem_amethyst', 'sorcery:gem_amethyst', 'sorcery:gem_amethyst'};
		{'default:gold_ingot','sorcery:beam_generator','default:gold_ingot'};
		{'sorcery:gem_amethyst', 'sorcery:gem_amethyst', 'sorcery:gem_amethyst'};
	};
}

minetest.register_craft {
	output = 'sorcery:tuning_disc';
	recipe = {
		{'sorcery:inverter_coil','sorcery:silver_ingot',''};
		{'sorcery:leyline_stabilizer','sorcery:silver_ingot','sorcery:gem_emerald'};
		{'sorcery:inverter_coil','sorcery:silver_ingot',''};
	};
}

minetest.register_craft {
	output = 'sorcery:farcaster';
	recipe = {
		{'default:gold_ingot','sorcery:iridium_ingot','default:gold_ingot'};
		{'sorcery:core_mandatic','default:diamondblock','sorcery:tuning_disc'};
		{'default:gold_ingot','sorcery:iridium_ingot','default:gold_ingot'};
	};
}

minetest.register_craft {
	output = 'sorcery:portal_node';
	recipe = {
		{'sorcery:tungsten_ingot','sorcery:core_mandatic','sorcery:tungsten_ingot'};
		{'sorcery:aluminum_ingot','sorcery:platinumblock','sorcery:aluminum_ingot'};
		{'sorcery:tungsten_ingot','sorcery:core_mandatic','sorcery:tungsten_ingot'};
	};
}

minetest.register_craft {
	output = 'sorcery:portal_reflector';
	recipe = {
		{'basic_materials:steel_bar','default:tin_ingot','basic_materials:steel_bar'};
		{'sorcery:gem_amethyst','sorcery:inverter_coil','sorcery:gem_amethyst'};
		{'basic_materials:steel_bar','xpanes:bar_flat','basic_materials:steel_bar'};
	}
}

minetest.register_craft {
	output = 'sorcery:portal_pad';
	recipe = {
		{'basic_materials:steel_bar','xpanes:bar_flat','basic_materials:steel_bar'};
		{'sorcery:gem_amethyst','sorcery:beam_generator','sorcery:gem_amethyst'};
		{'basic_materials:steel_bar','default:tin_ingot','basic_materials:steel_bar'};
	}
}

minetest.register_craft {
	output = 'sorcery:gravity_manipulator';
	recipe = {
		{'sorcery:cobalt_ingot','sorcery:screw_platinum','basic_materials:silver_wire'};
		{'sorcery:inverter_coil','sorcery:core_counterpraxic','sorcery:levitanium_ingot'};
		{'sorcery:cobalt_ingot','sorcery:screw_platinum','basic_materials:silver_wire'};
	};
}

minetest.register_craft {
	output = 'sorcery:gravitator_off';
	recipe = {
		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
		{'xpanes:pane_flat','sorcery:gravity_manipulator','basic_materials:plastic_sheet'};
		{'sorcery:platinum_ingot','basic_materials:plastic_sheet','sorcery:platinum_ingot'};
	};
}

minetest.register_craftitem('sorcery:gravity_manipulator', {
	description = 'Gravity Manipulator';
	inventory_image = 'sorcery_gravity_manipulator.png';
	groups = {
		sorcery_magitech = 1;
	};
})

minetest.register_craftitem('sorcery:tuning_disc',{
	description = 'Tuning Disc';
	inventory_image = 'sorcery_tuning_disc.png';
	groups = {
		sorcery_magitech = 1; metal = 1;
	};
});

minetest.register_craftitem('sorcery:core_counterpraxic',{
	description = 'Counterpraxis Core';
	inventory_image = 'sorcery_core_counterpraxic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:core_mandatic',{
	description = 'Mandatic Core';
	inventory_image = 'sorcery_core_mandatic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:core_syncretic',{
	description = 'Syncresis Core';
	inventory_image = 'sorcery_core_syncretic.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:suppression_matrix',{
	description = 'Suppression Matrix';
	inventory_image = 'sorcery_suppression_matrix.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:inverter_coil',{
	description = 'Inverter Coil';
	inventory_image = 'sorcery_inverter_coil.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:beam_generator',{
	description = 'Beam Generator';
	inventory_image = 'sorcery_beam_generator.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:leyline_stabilizer',{
	description = 'Leyline Stabilizer';
	inventory_image = 'sorcery_leyline_stabilizer.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
});

minetest.register_craftitem('sorcery:field_emitter',{
	description = 'Field Emitter';
	inventory_image = 'sorcery_field_emitter.png';
	groups = {
		sorcery_magitech = 1; metal = 1; sorcery_magitech_core = 1;
	};
})

minetest.register_craft {
	output = 'sorcery:leyline_stabilizer';
	recipe = {
		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
		{'sorcery:grease_neutralizing','group:sorcery_ley_cable','sorcery:grease_neutralizing'};
		{'basic_materials:copper_wire','group:sorcery_ley_cable','basic_materials:copper_wire'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
		{'sorcery:grease_neutralizing', 'xdecor:bowl'};
		{'sorcery:grease_neutralizing', 'xdecor:bowl'};
	};
}

minetest.register_craft {
	output = 'sorcery:beam_generator';
	recipe = {
		{'xpanes:bar_flat','xpanes:pane_flat','xpanes:bar_flat'};
		{'sorcery:screw_aluminum','sorcery:gem_sapphire','sorcery:screw_aluminum'};
		{'xpanes:bar_flat','sorcery:gem_luxite','xpanes:bar_flat'};
	};
}

minetest.register_craft {
	output = 'sorcery:suppression_matrix';
	recipe = {
		{'sorcery:fragment_electrum','basic_materials:steel_strip','sorcery:fragment_cobalt'};
		{'basic_materials:copper_strip','xpanes:bar_flat','basic_materials:copper_strip'};
		{'sorcery:fragment_cobalt','basic_materials:steel_strip','sorcery:fragment_electrum'};
	};
}

minetest.register_craft {
	output = 'sorcery:core_counterpraxic';
	recipe = {
		{'sorcery:gem_ruby_shard','sorcery:tungsten_ingot','sorcery:gem_ruby_shard'};
		{'sorcery:tungsten_ingot','sorcery:gem_emerald','sorcery:tungsten_ingot'};
		{'sorcery:gem_ruby_shard','sorcery:tungsten_ingot','sorcery:gem_ruby_shard'};
	};
}

minetest.register_craft {
	output = 'sorcery:core_syncretic';
	recipe = {
		{'sorcery:gem_sapphire_shard','default:gold_ingot','sorcery:gem_sapphire_shard'};
		{'default:gold_ingot','default:diamond','default:gold_ingot'};
		{'sorcery:gem_sapphire_shard','default:gold_ingot','sorcery:gem_sapphire_shard'};
	};
}

minetest.register_craft {
	output = 'sorcery:core_mandatic';
	recipe = {
		{'sorcery:gem_amethyst_shard','sorcery:silver_ingot','sorcery:gem_amethyst_shard'};
		{'sorcery:silver_ingot','sorcery:gem_sapphire','sorcery:silver_ingot'};
		{'sorcery:gem_amethyst_shard','sorcery:silver_ingot','sorcery:gem_amethyst_shard'};
	};
}

minetest.register_craft {
	output = 'sorcery:inverter_coil';
	recipe = {
		{'sorcery:screw_platinum','basic_materials:steel_wire','sorcery:screw_platinum'};
		{'basic_materials:copper_wire','default:tin_ingot','basic_materials:copper_wire'};
		{'sorcery:screw_platinum','basic_materials:steel_wire','sorcery:screw_platinum'};
	};
	replacements = {
		{'basic_materials:steel_wire', 'basic_materials:empty_spool'};
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
		{'basic_materials:steel_wire', 'basic_materials:empty_spool'};
	};
}

minetest.register_craft {
	output = 'sorcery:field_emitter';
	recipe = {
		{'basic_materials:steel_bar','xpanes:pane_flat','basic_materials:steel_bar'};
		{'sorcery:beam_generator','sorcery:leyline_stabilizer','sorcery:beam_generator'};
		{'sorcery:beam_generator','basic_materials:copper_wire','sorcery:beam_generator'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
}

minetest.register_craft {
	output = 'sorcery:emitter_barrier';
	recipe = {
		{'sorcery:suppression_matrix','sorcery:suppression_matrix','sorcery:suppression_matrix'};
		{'sorcery:field_emitter','sorcery:core_counterpraxic','sorcery:inverter_coil'};
		{'default:tin_ingot','default:tin_ingot','default:tin_ingot'};
	};
}

minetest.register_craft {
	output = 'sorcery:generator';
	recipe = {
		{'sorcery:aluminum_ingot','sorcery:aluminum_ingot','sorcery:aluminum_ingot'};
		{'default:bronze_ingot','basic_materials:copper_wire','default:bronze_ingot'};
		{'default:steel_ingot','default:furnace','default:steel_ingot'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
}

---- writing
minetest.register_craftitem('sorcery:ink', {
	description = "Ink";
	inventory_image = "sorcery_ink_bottle.png";
	groups = { liquid = 1; ink = 1; }
})

minetest.register_craftitem('sorcery:erasure_fluid', {
	description = "Erasure Fluid";
	inventory_image = "sorcery_erasure_fluid_bottle.png";
	groups = { liquid = 1; sorcery_writingstand_operand = 1; }
})

minetest.register_craft {
	output = 'sorcery:ink';
	type = 'shapeless';
	recipe = {
		'sorcery:potion_water';
		'dye:black', 'dye:black', 'dye:black';
		'xdecor:honey';
		'basic_materials:oil_extract';
		'basic_materials:oil_extract';
	};
}

minetest.register_craft {
	output = 'sorcery:erasure_fluid 3';
	type = 'shapeless';
	recipe = {
		'sorcery:potion_water';
		'sorcery:potion_water';
		'sorcery:potion_water';
		'basic_materials:oil_extract';
		'sorcery:powder_aluminum';
		'sorcery:powder_tin';
	}
}

minetest.register_craft {
	output = 'sorcery:erasure_fluid 3';
	type = 'shapeless';
	recipe = {
		'vessels:glass_bottle';
		'vessels:glass_bottle';
		'vessels:glass_bottle';
		'bucket:bucket_water';
		'basic_materials:oil_extract';
		'sorcery:powder_aluminum';
		'sorcery:powder_tin';
	};
	replacements = {
		{'bucket:bucket_water','bucket:bucket_empty'};
	};
}
minetest.register_craft {
	output = 'sorcery:writing_stand';
	recipe = {
		{'screwdriver:screwdriver','default:book','default:gold_ingot'};
		{'sorcery:screw_steel','group:wood','sorcery:screw_steel'};
		{'group:wood','default:stick','group:wood'};
	};
	replacements = {
		{'screwdriver:screwdriver','screwdriver:screwdriver'};
	};
};

sorcery.data.register.infusion_leftover('sorcery:ink','vessels:glass_bottle')
sorcery.data.register.infusion_leftover('sorcery:erasure_fluid','vessels:glass_bottle')

---- altar
minetest.register_craftitem('sorcery:candle', {
	-- TODO make candle node
	inventory_image = 'sorcery_candle.png';
	description = 'Votive Candle';
	groups = {
		candle = 1;
	};
})

minetest.register_craft {
	recipe = {
		{'farming:string'};
		{'basic_materials:paraffin'};
		{'basic_materials:paraffin'};
	};
	output = "sorcery:candle";
}

minetest.register_craft {
	recipe = {
		{'sorcery:candle','sorcery:candle','sorcery:candle'};
		{'sorcery:coin_gold','stairs:slab_stone','sorcery:coin_bronze'};
		{'','sorcery:coin_tin',''};
	};
	output = "sorcery:altar";
}
minetest.clear_craft { output = 'morelights:bulb'; }
minetest.register_craft {
	recipe = {
		{'xpanes:pane_flat', 'sorcery:gem_luxite_shard', 'xpanes:pane_flat'};
		{'sorcery:gem_luxite_shard', 'default:mese_crystal_fragment','sorcery:gem_luxite_shard'};
		{'xpanes:pane_flat', 'basic_materials:copper_wire', 'xpanes:pane_flat'};
	};
	replacements = {
		{'basic_materials:copper_wire', 'basic_materials:empty_spool'};
	};
	output = 'morelights:bulb 4';
}

local potion_auto_recipe = function(id, substance, tools, container)
	local recipe = tools
	local replace = {}
	local batches = 1
	for _,v in pairs(tools) do
		replace[#replace + 1] = {v,v}
	end

	if substance.core and #substance.core > 0 then
		batches = #substance.core
		recipe = sorcery.lib.tbl.append(recipe, substance.core)
	elseif container then
		recipe[#recipe + 1] = container
	end
	if substance.mix and #substance.mix > 0 then
		recipe = sorcery.lib.tbl.append(recipe, substance.mix)
		for _,r in pairs(substance.mix) do
			if sorcery.data.infusion_leftovers[r] then
				replace[#replace + 1] = {
					r, sorcery.data.infusion_leftovers[r]
				}
			end
		end
	end

	minetest.register_craft {
		type = 'shapeless';
		recipe = recipe;
		replacements = replace;
		output = id .. ' ' .. batches;
	}
end
-- auto-generate recipes for potionmaking oils
for n,v in pairs(sorcery.data.oils) do
	if (v.core and #v.core > 0) or (v.mix and #v.mix > 0) then
		local id = 'sorcery:oil_' .. n
		potion_auto_recipe(id,v,{'farming:mortar_pestle'},'xdecor:bowl')
	end
end

for n,v in pairs(sorcery.data.greases) do
	if (v.core and #v.core > 0) or (v.mix and #v.mix > 0) then
		local id = 'sorcery:grease_' .. n
		potion_auto_recipe(id,v,{'farming:mixing_bowl'},'xdecor:bowl')
	end
end