sorcery  Diff

Differences From Artifact [816e3182ea]:

To Artifact [43593523a3]:


    44     44   -- for name, metal in pairs(sorcery.data.metals) do
    45     45   sorcery.register.metals.foreach('sorcery:generate',{},function(name,metal)
    46     46   	local ingot = metal.ingot or 'sorcery:' .. name .. '_ingot'
    47     47   	local block = metal.block or 'sorcery:' .. name .. 'block'
    48     48   	local screw = 'sorcery:screw_' .. name
    49     49   	local fragment = 'sorcery:fragment_' .. name
    50     50   	local powder = 'sorcery:powder_' .. name
           51  +	local disc = 'sorcery:disc_' .. name
    51     52   	metal.parts = {
    52     53   		ingot = ingot;
    53     54   		block = block;
    54     55   		screw = screw;
    55     56   		fragment = fragment;
    56     57   		powder = powder;
           58  +		disc = disc;
    57     59   	}
    58     60   	if not metal.no_tools then for t,c in pairs(tools) do
    59     61   		sorcery.matreg.lookup[(metal.items and metal.items[t]) or ('sorcery:' .. t .. '_' .. name)] = {
    60     62   			metal = true;
    61     63   			id = name; data = metal;
    62     64   			value = c.cost * fragments_per_ingot;
    63     65   		}
................................................................................
    80     82   	sorcery.data.metallookup[fragment] = {
    81     83   		id = name; data = metal;
    82     84   		value = 1;
    83     85   	}
    84     86   	minetest.register_craftitem(screw, {
    85     87   		description = sorcery.lib.str.capitalize(name) .. ' Screw';
    86     88   		inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
    87         -		groups = {
    88         -			metal = 1;
    89         -			sorcery_screw = 1;
    90         -			sorcery_tech_component = 1;
    91         -		};
           89  +		groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };
    92     90   		_sorcery = {
    93     91   			material = {
    94     92   				id = name, data = metal;
    95     93   				powder = powder;
    96     94   				grindcost = 2, grindvalue = 1;
    97     95   				value = 0.5;
    98     96   			};
    99     97   		};
   100     98   	})
           99  +	minetest.register_craftitem(disc, {
          100  +		description = sorcery.lib.str.capitalize(name) .. ' Disc';
          101  +		inventory_image = sorcery.lib.image('sorcery_disc.png'):multiply(sorcery.lib.color(metal.tone)):render();
          102  +		groups = { metal = 1; sorcery_disc = 1; sorcery_tech_component = 1; };
          103  +		_sorcery = {
          104  +			material = {
          105  +				id = name, data = metal;
          106  +				powder = powder;
          107  +				grindvalue = (3*4) / 2;
          108  +				value = 4 * (2/3);
          109  +			};
          110  +		};
          111  +	})
          112  +
   101    113   	local reglathe = function(ty, sz)
   102    114   		sorcery.lathe.register {
   103    115   			input = ty;
   104    116   			output = {name = screw, count = sz * 2};
   105    117   			tech = 'cut', cost = 1;
   106    118   		}
   107    119   	end
   108    120   	reglathe(fragment, 1)
   109    121   	reglathe(ingot, 4)
   110    122   	reglathe(block, 4 * 9)
          123  +
          124  +	sorcery.lathe.register {
          125  +		input = ingot, mass = 2;
          126  +		output = {name = disc, count = 3};
          127  +		tech = 'cut', cost = 5;
          128  +	}
          129  +	sorcery.lathe.register {
          130  +		input = block;
          131  +		output = {name = disc, count = 8*3};
          132  +		leftover = ingot;
          133  +		tech = 'cut', cost = 5*7;
          134  +	}
          135  +
   111    136   	minetest.register_craftitem(powder, {
   112    137   		description = sorcery.lib.str.capitalize(name) .. ' Powder';
   113    138   		inventory_image = 'sorcery_' .. name .. '_powder.png';
   114    139   	})
   115    140   	if metal.dye then
   116    141   		minetest.register_craft {
   117    142   			output = 'dye:' .. metal.dye .. ' 4';