sorcery  Diff

Differences From Artifact [c1d9a4ce4b]:

To Artifact [3d415e629d]:


107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
136
137
138
139
140
141
142

143
144
145
146
147
148
149
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
			metal = mat
		end
	end
	local mp = item:get_definition()._matprop
		or sorcery.data.compat.grindables[item:get_name()]
		or {}

	again = true
	if metal then mp = {
		hardness = mp.hardness or metal.data.hardness;
		grindvalue = ((mp.grindvalue or metal.value) or (metal and constants.metal_grindvalue));
		powder = mp.powder or metal.data.parts.powder;
		grindcost = mp.grindcost or constants.metal_grindcost; -- invariant for metal
	} end

................................................................................
	return mp
end
minetest.register_node('sorcery:mill',{
	description = 'Mill';
	groups = {
		cracky = 2;
		sorcery_ley_device = 1;

	};
	paramtype2 = 'facedir';
	after_dig_node = sorcery.lib.node.purge_container;
	on_construct = function(pos)
		local meta = minetest.get_meta(pos)
		local inv = meta:get_inventory()
		inv:set_size('input',1)
................................................................................
}
for name,metal in pairs(sorcery.data.metals) do
	local i,f = metal.parts.ingot, metal.parts.fragment
	local id = 'sorcery:mill_grindhead_' .. name
	minetest.register_tool(id,{
		description = sorcery.lib.str.capitalize(name) .. ' Grinding Head';
		inventory_image = sorcery.lib.image('sorcery_mill_grindhead.png'):multiply(sorcery.lib.color(metal.tone)):render();
		groups = { sorcery_mill_grindhead = 1 };
		_proto = {
			metal = name;
		};
	});
	minetest.register_craft {
		output = id;
		recipe = {
			{f,i,f};
			{i,'',i};
			{f,i,f};
		};
	}
end







<







 







>







 







|













107
108
109
110
111
112
113

114
115
116
117
118
119
120
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
			metal = mat
		end
	end
	local mp = item:get_definition()._matprop
		or sorcery.data.compat.grindables[item:get_name()]
		or {}


	if metal then mp = {
		hardness = mp.hardness or metal.data.hardness;
		grindvalue = ((mp.grindvalue or metal.value) or (metal and constants.metal_grindvalue));
		powder = mp.powder or metal.data.parts.powder;
		grindcost = mp.grindcost or constants.metal_grindcost; -- invariant for metal
	} end

................................................................................
	return mp
end
minetest.register_node('sorcery:mill',{
	description = 'Mill';
	groups = {
		cracky = 2;
		sorcery_ley_device = 1;
		sorcery_metallurgy = 1;
	};
	paramtype2 = 'facedir';
	after_dig_node = sorcery.lib.node.purge_container;
	on_construct = function(pos)
		local meta = minetest.get_meta(pos)
		local inv = meta:get_inventory()
		inv:set_size('input',1)
................................................................................
}
for name,metal in pairs(sorcery.data.metals) do
	local i,f = metal.parts.ingot, metal.parts.fragment
	local id = 'sorcery:mill_grindhead_' .. name
	minetest.register_tool(id,{
		description = sorcery.lib.str.capitalize(name) .. ' Grinding Head';
		inventory_image = sorcery.lib.image('sorcery_mill_grindhead.png'):multiply(sorcery.lib.color(metal.tone)):render();
		groups = { sorcery_mill_grindhead = 1, sorcery_metallurgy = 1 };
		_proto = {
			metal = name;
		};
	});
	minetest.register_craft {
		output = id;
		recipe = {
			{f,i,f};
			{i,'',i};
			{f,i,f};
		};
	}
end