sorcery  Diff

Differences From Artifact [69d743e332]:

To Artifact [f2df9bf8e4]:


    80     80   		id = name; data = metal;
    81     81   		value = fragments_per_ingot * 9;
    82     82   	}
    83     83   	sorcery.data.metallookup[fragment] = {
    84     84   		id = name; data = metal;
    85     85   		value = 1;
    86     86   	}
    87         -	minetest.register_craftitem(screw, {
    88         -		description = sorcery.lib.str.capitalize(name) .. ' Screw';
    89         -		inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
    90         -		groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };
    91         -		_sorcery = {
    92         -			material = {
    93         -				id = name, data = metal;
    94         -				powder = powder;
    95         -				grindcost = 2, grindvalue = 1;
    96         -				value = 0.5;
           87  +	sorcery.data.metallookup[disc] = {
           88  +		id = name; data = metal;
           89  +		value = 8/3;
           90  +	}
           91  +	if not metal.no_craftables then
           92  +		sorcery.data.metallookup[screw] = {
           93  +			id = name; data = metal;
           94  +			value = 0.5;
           95  +		}
           96  +		minetest.register_craftitem(screw, {
           97  +			description = sorcery.lib.str.capitalize(name) .. ' Screw';
           98  +			inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
           99  +			groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };
          100  +			_sorcery = {
          101  +				material = {
          102  +					id = name, data = metal;
          103  +					powder = powder;
          104  +					grindcost = 2, grindvalue = 1;
          105  +					value = 0.5;
          106  +				};
    97    107   			};
    98         -		};
    99         -	})
          108  +		})
          109  +		local reglathe = function(ty, sz)
          110  +			sorcery.lathe.register {
          111  +				input = ty;
          112  +				output = {name = screw, count = sz * 2};
          113  +				tech = 'cut', cost = 1;
          114  +			}
          115  +		end
          116  +		reglathe(fragment, 1)
          117  +		reglathe(ingot, 4)
          118  +		reglathe(block, 4 * 9)
          119  +	end
          120  +
   100    121   	minetest.register_craftitem(disc, {
   101    122   		description = sorcery.lib.str.capitalize(name) .. ' Disc';
   102    123   		inventory_image = fmt('sorcery_disc_%s.png', name);
   103    124   		groups = { metal = 1; sorcery_disc = 1; sorcery_tech_component = 1; };
   104    125   		_sorcery = {
   105    126   			material = {
   106    127   				id = name, data = metal;
   107    128   				powder = powder;
   108         -				grindvalue = (3*4) / 2;
          129  +				grindcost = 3;
          130  +				grindvalue = 2*4;
   109    131   				value = 4 * (2/3);
   110    132   			};
   111    133   		};
   112    134   	})
   113    135   
   114         -	local reglathe = function(ty, sz)
   115         -		sorcery.lathe.register {
   116         -			input = ty;
   117         -			output = {name = screw, count = sz * 2};
   118         -			tech = 'cut', cost = 1;
   119         -		}
   120         -	end
   121         -	reglathe(fragment, 1)
   122         -	reglathe(ingot, 4)
   123         -	reglathe(block, 4 * 9)
   124         -
   125    136   	sorcery.lathe.register {
   126    137   		input = ingot, mass = 2;
   127    138   		output = {name = disc, count = 3};
   128    139   		tech = 'cut', cost = 5;
   129    140   	}
   130    141   	sorcery.lathe.register {
   131    142   		input = block;