Differences From
Artifact [b8a7748341]:
69 69 sorcery.matreg.lookup[(metal.items and metal.items[a]) or ('sorcery:' .. a .. '_' .. name)] = {
70 70 metal = true;
71 71 id = name; data = metal;
72 72 value = c.cost * fragments_per_ingot;
73 73 }
74 74 end end
75 75 local install = function(part,amt)
76 - sorcery.data.metallookup[part] = { id = name, data = metal, value = amt }
76 + sorcery.data.metallookup[part] = { id = name, data = metal, value = amt }
77 77 end
78 78 install(ingot, fragments_per_ingot)
79 79 install(block, fragments_per_ingot*9)
80 80 install(fragment, 1)
81 81 install(powder, 1)
82 82 install(disc, 8/3)
83 + if metal.wire then
84 + if metal.wire == true then
85 + metal.parts.wire = 'sorcery:wire_' .. name
86 + minetest.register_craftitem(metal.parts.wire, {
87 + inventory_image = string.format('basic_materials_empty_spool.png^sorcery_%s_wire.png', name);
88 + description = string.format('Spool of %s wire',name);
89 + groups = {metal = 1, wire = 1};
90 + })
91 + minetest.register_craft {
92 + type = 'shapeless';
93 + output = metal.parts.wire .. ' 2';
94 + recipe = {
95 + metal.parts.ingot;
96 + 'basic_materials:empty_spool';
97 + 'basic_materials:empty_spool';
98 + }
99 + }
100 + else
101 + metal.parts.wire = metal.wire
102 + end
103 + minetest.register_craft {
104 + type = 'shapeless';
105 + output = metal.parts.wire;
106 + recipe = {
107 + metal.parts.fragment;
108 + metal.parts.fragment;
109 + 'basic_materials:empty_spool';
110 + }
111 + }
112 + install(metal.parts.wire, 2)
113 + end
83 114
84 115 if not metal.no_craftables then
85 116 install(screw, 0.5)
86 117 minetest.register_craftitem(screw, {
87 118 description = sorcery.lib.str.capitalize(name) .. ' Screw';
88 119 inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
89 120 groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };