sorcery  Diff

Differences From Artifact [2f2f7ff693]:

To Artifact [533039aa40]:


    24     24   
    25     25   	if gem.foreign_shard then
    26     26   		minetest.clear_craft {output=shardname}
    27     27   	else
    28     28   		minetest.register_craftitem(shardname, {
    29     29   			description = sorcery.lib.str.capitalize(name) .. ' shard';
    30     30   			inventory_image = 'sorcery_gem_' .. name .. '_shard.png';
    31         -			groups = { sorcery_shard = 1; };
    32         -			_proto = gem;
           31  +			groups = { gemshard = 1; crystalshard = 1; sorcery_shard = 1; };
           32  +			_sorcery = {
           33  +				material = {
           34  +					gem = true;
           35  +					id = name, data = gem;
           36  +					raw = true, value = 1;
           37  +				};
           38  +			};
    33     39   		})
    34     40   	end
    35     41   	if not gem.foreign_amulet then
    36     42   		minetest.register_craftitem(amuletname, {
    37     43   			description = sorcery.lib.str.capitalize(name) .. ' amulet';
    38     44   			inventory_image = sorcery.lib.image('sorcery_amulet.png'):multiply(sorcery.lib.color(gem.tone)):render();
    39         -			_proto = {
    40         -				id = name;
    41         -				data = gem;
           45  +			_sorcery = {
           46  +				material = {
           47  +					gem = true, id = name, data = gem;
           48  +					value = (5 * shards_per_gem) + 4;
           49  +				};
    42     50   			};
    43     51   		}) 
    44     52   	end
    45     53   	minetest.register_craft {
    46     54   		type = 'shapeless';
    47     55   		recipe = (minetest.get_modpath('xdecor') and {
    48     56   			'xdecor:hammer', itemname;
................................................................................
   125    133   		}
   126    134   	end
   127    135   
   128    136   	if gem.foreign then return false end
   129    137   	minetest.register_craftitem(itemname, {
   130    138   		description = sorcery.lib.str.capitalize(name);
   131    139   		inventory_image = 'sorcery_gem_' .. name .. '.png';
   132         -		groups = { sorcery_gem = 1; };
   133         -		_proto = gem;
          140  +		groups = { gem = 1; crystal = 1; sorcery_gem = 1; };
          141  +		_sorcery = {
          142  +			material = {
          143  +				id = name, data = gem;
          144  +				raw = true, value = shards_per_gem;
          145  +			};
          146  +		};
   134    147   	})
   135    148   	local tools = gem.tools
   136    149   	if tools == nil then tools = {
   137    150   		'group:pickaxe';
   138    151   		'group:pick'; -- FUCK YOU INSTANT_ORES
   139    152   		'~default:enchanted_pick_'; -- FUCK YOU XDECOR
   140    153   	} end