131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
power = metal.power;
speed = metal.speed;
artificial = metal.artificial;
cooktime = metal.cooktime;
hardness = (metal.hardness/8) * 3; -- scaled wrt diamond
level = math.ceil(((metal.hardness/8) * 3)) + 1;
ingot_image = (metal.image and metal.image.ingot) or nil;
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';
................................................................................
}))
end
if metal.sinter then
local powders = {}
for _,m in pairs(metal.sinter) do
powders[#powders+1] = 'sorcery:powder_' .. m
end
if metal.sinter_catalyst then for _,m in pairs(metal.sinter_catalyst)
do powders[#powders+1] = m end end
minetest.register_craft {
type = 'shapeless';
output = powder .. ' ' .. tostring(#powders);
recipe = powders;
};
end
end
|
|
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
...
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
power = metal.power;
speed = metal.speed;
artificial = metal.artificial;
cooktime = metal.cooktime;
hardness = (metal.hardness/8) * 3; -- scaled wrt diamond
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';
................................................................................
}))
end
if metal.sinter then
local powders = {}
for _,m in pairs(metal.sinter) do
powders[#powders+1] = 'sorcery:powder_' .. m
end
local repl = {}
if metal.sinter_catalyst then
for _,m in pairs(metal.sinter_catalyst) do
powders[#powders+1] = m
if sorcery.data.infusion_leftovers[m] then
repl[#repl+1] = {m, sorcery.data.infusion_leftovers[m]}
end
end
end
minetest.register_craft {
type = 'shapeless';
output = powder .. ' ' .. tostring(#powders);
recipe = powders;
replacements = repl;
};
end
end
|