Differences From
Artifact [c1d9a4ce4b]:
107 107 metal = mat
108 108 end
109 109 end
110 110 local mp = item:get_definition()._matprop
111 111 or sorcery.data.compat.grindables[item:get_name()]
112 112 or {}
113 113
114 - again = true
115 114 if metal then mp = {
116 115 hardness = mp.hardness or metal.data.hardness;
117 116 grindvalue = ((mp.grindvalue or metal.value) or (metal and constants.metal_grindvalue));
118 117 powder = mp.powder or metal.data.parts.powder;
119 118 grindcost = mp.grindcost or constants.metal_grindcost; -- invariant for metal
120 119 } end
121 120
................................................................................
136 135 return mp
137 136 end
138 137 minetest.register_node('sorcery:mill',{
139 138 description = 'Mill';
140 139 groups = {
141 140 cracky = 2;
142 141 sorcery_ley_device = 1;
142 + sorcery_metallurgy = 1;
143 143 };
144 144 paramtype2 = 'facedir';
145 145 after_dig_node = sorcery.lib.node.purge_container;
146 146 on_construct = function(pos)
147 147 local meta = minetest.get_meta(pos)
148 148 local inv = meta:get_inventory()
149 149 inv:set_size('input',1)
................................................................................
333 333 }
334 334 for name,metal in pairs(sorcery.data.metals) do
335 335 local i,f = metal.parts.ingot, metal.parts.fragment
336 336 local id = 'sorcery:mill_grindhead_' .. name
337 337 minetest.register_tool(id,{
338 338 description = sorcery.lib.str.capitalize(name) .. ' Grinding Head';
339 339 inventory_image = sorcery.lib.image('sorcery_mill_grindhead.png'):multiply(sorcery.lib.color(metal.tone)):render();
340 - groups = { sorcery_mill_grindhead = 1 };
340 + groups = { sorcery_mill_grindhead = 1, sorcery_metallurgy = 1 };
341 341 _proto = {
342 342 metal = name;
343 343 };
344 344 });
345 345 minetest.register_craft {
346 346 output = id;
347 347 recipe = {
348 348 {f,i,f};
349 349 {i,'',i};
350 350 {f,i,f};
351 351 };
352 352 }
353 353 end