sorcery  Artifact [79c7e033c3]

Artifact 79c7e033c3f5e1f796ee215867292b1d9f1140d404adf758a1b27d1b939def04:


local brass, silver

if minetest.get_modpath("moreores") then
	silver = 'moreores:silver'
else
	minetest.register_alias('moreores:silver_ingot','sorcery:silver_ingot')
	minetest.register_alias('moreores:silver_block','sorcery:silver_block')
end

if minetest.get_modpath("basic_materials") then
	brass = 'basic_materials:brass'
elseif minetest.get_modpath("morelights") then
	brass = 'morelights_vintage:brass'
else
	minetest.register_alias('basic_materials:brass_ingot', 'sorcery:brass_ingot')
	minetest.register_alias('basic_materials:brass_block', 'sorcery:brass_block')
	minetest.register_alias('morelights_vintage:brass_block', 'sorcery:brass_block')
	minetest.register_alias('morelights_vintage:brass_ingot', 'sorcery:brass_ingot')
end

if brass then
	minetest.register_alias('sorcery:brass_ingot',brass..'_ingot')
	minetest.register_alias('sorcery:brass_block',brass..'_block')
end
if silver then
	minetest.register_alias('sorcery:silver_ingot',silver..'_ingot')
	minetest.register_alias('sorcery:silver_block',silver..'_block')
end

if minetest.get_modpath("new_campfire") then
	minetest.register_alias('sorcery:ash', 'new_campfire:ash')
else
	minetest.register_craftitem('sorcery:ash', {
		description = 'Ash';
		inventory_image = 'sorcery_steel_powder.png^[colorize:#FFFFFF:60';
	})
	minetest.register_alias('new_campfire:ash', 'sorcery:ash')
end

-- xdecor offers a conflicting and somewhat poorly designed enchantment
-- mechanism; make it inaccessible but don't fuck up already existing
-- enchanters in the world
minetest.clear_craft { output='xdecor:enchantment_table'; }
minetest.override_item('xdecor:enchantment_table', {
	groups = sorcery.lib.tbl.merge(minetest.registered_items['xdecor:enchantment_table'].groups, {
		not_in_creative_inventory = 1;
	})
})

return {
	defp = function(name)
		return minetest.registered_items[name] or minetest.registered_aliases[name]
	end;
}