sorcery  Diff

Differences From Artifact [41724791de]:

To Artifact [15ff8624ed]:


   231    231   	mesh = 'sorcery-enchanter.obj';
   232    232   	paramtype = 'light';
   233    233   	paramtype2 = 'facedir';
   234    234   	groups = { cracky = 2, oddly_breakable_by_hand = 2 };
   235    235   	sunlight_propagates = true;
   236    236   	selection_box = hitbox;
   237    237   	collision_box = hitbox;
          238  +	after_dig_node = sorcery.lib.node.purge_container;
   238    239   	tiles = {
   239    240   		"default_obsidian.png";
   240    241   		"default_steel_block.png";
   241    242   		"default_bronze_block.png";
   242    243   		"default_junglewood.png";
   243    244   		"default_gold_block.png";
   244    245   	};
................................................................................
   412    413   	if ench.energy == 0 then
   413    414   		ench.spells = {}
   414    415   		sorcery.enchant.set(tool,ench)
   415    416   	else
   416    417   		sorcery.enchant.set(tool,ench,true)
   417    418   	end
   418    419   	puncher:set_wielded_item(tool)
          420  +
          421  +	-- perform leyline checks and call notify if necessary
          422  +	if minetest.get_item_group(node.name, 'sorcery_ley_device') ~= 0 then
          423  +		for _,p in pairs(sorcery.ley.txofs) do
          424  +			local sum = vector.add(pos,p)
          425  +			if minetest.get_item_group(minetest.get_node(sum).name, 'sorcery_ley_device') ~= 0 then
          426  +				sorcery.ley.notify(sum)
          427  +			end
          428  +		end
          429  +	end
   419    430   end)
   420    431   
   421    432   minetest.register_chatcommand('enchants', {
   422    433   	description = 'Log information about the currently held object\'s enchantment';
   423    434   	privs = { server = true };
   424    435   	func = function(caller,params)
   425    436   		local tool = minetest.get_player_by_name(caller):get_wielded_item()