80
81
82
83
84
85
86
87
88
89
90
91
92
93
..
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
sorcery.data.metallookup[fragment] = {
id = name; data = metal;
value = 1;
}
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();
_sorcery = {
material = {
id = name, data = metal;
grindcost = 2, grindvalue = 1;
value = 0.5;
};
};
................................................................................
})
if metal.dye then
minetest.register_craft {
output = 'dye:' .. metal.dye .. ' 4';
recipe = {
{'', powder, ''};
{powder,'basic_materials:paraffin',powder};
{'','bucket:bucket_water',''};
};
replacements = {
{'bucket:bucket_water', 'bucket:bucket_empty'};
};
};
end
-- TODO: replace crafting recipe with kiln recipe
................................................................................
level = math.ceil(((metal.hardness/8) * 3)) + 1;
ingot_image = (metal.image and metal.image.ingot) or nil;
ore_image = 'default_stone.png^sorcery_' .. name .. '_ore.png';
lump_image = (metal.image and metal.image.lump) or nil;
armor_weight = metal.armor_weight;
armor_protection = metal.armor_protection;
}
end
minetest.register_craftitem(fragment, {
inventory_image = 'sorcery_' .. name .. '_fragment.png';
description = sorcery.lib.str.capitalize(name) .. ' Fragment';
_sorcery = {
recipe = {
canonical = {
cook = {{ingot}};
};
};
};
|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
sorcery.data.metallookup[fragment] = {
id = name; data = metal;
value = 1;
}
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;
};
_sorcery = {
material = {
id = name, data = metal;
grindcost = 2, grindvalue = 1;
value = 0.5;
};
};
................................................................................
})
if metal.dye then
minetest.register_craft {
output = 'dye:' .. metal.dye .. ' 4';
recipe = {
{'', powder, ''};
{powder,'basic_materials:paraffin',powder};
{'', 'bucket:bucket_water', ''};
};
replacements = {
{'bucket:bucket_water', 'bucket:bucket_empty'};
};
};
end
-- TODO: replace crafting recipe with kiln recipe
................................................................................
level = math.ceil(((metal.hardness/8) * 3)) + 1;
ingot_image = (metal.image and metal.image.ingot) or nil;
ore_image = 'default_stone.png^sorcery_' .. name .. '_ore.png';
lump_image = (metal.image and metal.image.lump) or nil;
armor_weight = metal.armor_weight;
armor_protection = metal.armor_protection;
}
end
local ti = (metal.image and metal.image.tool)
for _,t in pairs{'pick','sword'} do
-- i really need to rip out instant-ores already
local tid = string.format('sorcery:%s_%s',t,name)
if minetest.registered_items[tid] then
minetest.override_item(tid, {
inventory_image = ti and ti.pick or string.format('sorcery_%s_%s.png',name,t);
})
end
end
minetest.register_craftitem(fragment, {
inventory_image = 'sorcery_' .. name .. '_fragment.png';
description = sorcery.lib.str.capitalize(name) .. ' Fragment';
groups = {
metal = 1; sorcery_metal_fragment = 1;
};
_sorcery = {
recipe = {
canonical = {
cook = {{ingot}};
};
};
};
|