sorcery  Artifact [b53d891f54]

Artifact b53d891f548a2d5ae11dfed50eccf961802159b027183050b40b4287efc5f33e:


-- override the protection function to handle the
-- sealing spell and amulets
do local nextfn = minetest.is_protected
	minetest.is_protected = function(pos,name)
		local meta = minetest.get_meta(pos)
		if meta:contains('owner') and meta:contains('sorcery_wand_key') then
			if meta:get_string('sorcery_seal_mode') == 'wand' or name ~= meta:get_string('owner') then
				return true
			end
		end
		return nextfn(pos,name)
	end
end