sorcery  Diff

Differences From Artifact [b8a7748341]:

To Artifact [fd032c3f0d]:


69
70
71
72
73
74
75
76
77
78
79
80
81
82































83
84
85
86
87
88
89
		sorcery.matreg.lookup[(metal.items and metal.items[a]) or ('sorcery:' .. a .. '_' .. name)] = {
			metal = true;
			id = name; data = metal;
			value = c.cost * fragments_per_ingot;
		}
	end end
	local install = function(part,amt)
			sorcery.data.metallookup[part] = { id = name, data = metal, value = amt }
	end
	install(ingot,    fragments_per_ingot)
	install(block,    fragments_per_ingot*9)
	install(fragment, 1)
	install(powder,   1)
	install(disc,     8/3)
































	if not metal.no_craftables then
		install(screw, 0.5)
		minetest.register_craftitem(screw, {
			description = sorcery.lib.str.capitalize(name) .. ' Screw';
			inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
			groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };







|






>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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

	if not metal.no_craftables then
		install(screw, 0.5)
		minetest.register_craftitem(screw, {
			description = sorcery.lib.str.capitalize(name) .. ' Screw';
			inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render();
			groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; };