sorcery  Diff

Differences From Artifact [67735ebab8]:

To Artifact [2f2f7ff693]:


    74     74   	for _, kind in pairs { 'amplifier','rectifier','concave','convex' } do
    75     75   		local id = 'sorcery:lens_' .. kind .. '_' .. name
    76     76   		minetest.register_tool(id, {
    77     77   			inventory_image = sorcery.lib.image('sorcery_lens_overlay_gold.png'):
    78     78   				blit(sorcery.lib.image('sorcery_lens_' .. kind .. '.png'):
    79     79   					multiply(sorcery.lib.color(gem.tone):brighten(1.1))):
    80     80   				render();
    81         -			description = sorcery.lib.str.capitalize(name) .. ' ' .. kind .. ' lens';
           81  +			description = sorcery.lib.str.capitalize(name) .. ' ' .. sorcery.lib.str.capitalize(kind) .. ' Lens';
    82     82   			groups = { sorcery_enchanting_lens = 1 };
    83     83   			_proto = {
    84     84   				gem = name;
    85     85   				kind = kind;
    86     86   			};
    87     87   		})
    88     88   	end
................................................................................
   175    175   		minetest.override_item(ore, {drop = newdrops})
   176    176   		-- might be possible to just edit it in place, since we're
   177    177   		-- referring to registered_nodes anyway, but i don't want
   178    178   		-- to chance it; god knows what's going on under the hood
   179    179   	end
   180    180   end
   181    181   
   182         -if minetest.get_modpath('xdecor') then
   183         -	local og = minetest.registered_tools['xdecor:hammer'].groups
   184         -	og.crafttool = 1
   185         -	minetest.override_item('xdecor:hammer', {groups = og})
   186         -end
   187         -
   188         -minetest.register_on_craft(function(stack,crafter,recipe,grid)
   189         -	local ctoolclass = {
   190         -		[1] = 200;
   191         -		[2] = 100;
   192         -		[3] = 50;
   193         -		[4] = 10;
   194         -		[5] = 5;
   195         -	}
   196         -	for i=1,grid:get_size('craft') do
   197         -		local s = grid:get_stack('craft',i)
   198         -		local v = minetest.get_item_group(s:get_name(),'crafttool')
   199         -		if v ~= 0 then
   200         -			local dmg = 65536 / ctoolclass[v]
   201         -			local tool = recipe[i] 
   202         -			tool:add_wear(dmg)
   203         -			grid:set_stack('craft',i,tool)
   204         -		end
   205         -	end
   206         -	return nil
   207         -end)
   208    182   for g,v in pairs(sorcery.data.gems) do sorcery.register_gem(g,v) end
   209    183   
   210    184   sorcery.gem = {
   211    185   	getdrops = function(fac)
   212    186   		items = {}
   213    187   		for g,v in pairs(sorcery.data.gems) do
   214    188   			items[#items + 1] = {