19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
id = name; data = gem;
value = c.cost*shards_per_gem;
}
end end
if gem.armor then for a,c in pairs(armors) do
sorcery.matreg.lookup[(gem.items and gem.items[a]) or ('sorcery:' .. a .. '_' .. name)] = {
gem = true;
id = name; data = gem;
value = c.cost*shards_per_gem;
}
end end
if gem.foreign_shard then
minetest.clear_craft {output=shardname}
else
................................................................................
};
}
};
};
})
end
if not gem.foreign_amulet then
minetest.register_craftitem(amuletname, {
description = sorcery.lib.str.capitalize(name) .. ' amulet';
inventory_image = sorcery.lib.image('sorcery_amulet.png'):multiply(sorcery.lib.color(gem.tone)):render();
_sorcery = {
material = {
gem = true, id = name, data = gem;
value = (5 * shards_per_gem) + 4;
};
};
})
end
minetest.register_craft {
type = 'shapeless';
recipe = (minetest.get_modpath('xdecor') and {
'xdecor:hammer', itemname;
}) or { itemname };
output = shardname .. ' 9';
|
|
>
>
>
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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
|
id = name; data = gem;
value = c.cost*shards_per_gem;
}
end end
if gem.armor then for a,c in pairs(armors) do
sorcery.matreg.lookup[(gem.items and gem.items[a]) or ('sorcery:' .. a .. '_' .. name)] = {
gem = true;
id = name, data = gem;
value = c.cost*shards_per_gem;
}
end end
if gem.foreign_shard then
minetest.clear_craft {output=shardname}
else
................................................................................
};
}
};
};
})
end
if not gem.foreign_amulet then
local img = sorcery.lib.image
local img_stone = img('sorcery_amulet.png'):multiply(sorcery.lib.color(gem.tone))
local img_sparkle = img('sorcery_amulet_sparkle.png')
minetest.register_craftitem(amuletname, {
description = sorcery.lib.str.capitalize(name) .. ' amulet';
inventory_image = img_sparkle:blit(img_stone):render();
wield_scale = { x = 0.6, y = 0.6, z = 0.6 };
groups = { sorcery_amulet = 1 };
_sorcery = {
material = {
gem = true, id = name, data = gem;
value = (5 * shards_per_gem) + 4;
};
amulet = { base = name };
};
})
sorcery.register.metals.foreach('sorcery:mk-amulet-frames-'..name,{'sorcery:generate'}, function(metalid,metal)
if not metal.amulet then return end
local framedid = string.format("%s_frame_%s", amuletname, metalid)
local img_frame = img(string.format('sorcery_amulet_frame_%s.png',metalid))
minetest.register_craftitem(framedid, {
description = string.format("%s-framed %s amulet",sorcery.lib.str.capitalize(metalid), name);
inventory_image = img_sparkle:blit(img_frame):blit(img_stone):render();
wield_scale = { x = 0.6, y = 0.6, z = 0.6 };
groups = { sorcery_amulet = 1 };
_sorcery = {
amulet = { base = name, frame = metalid };
};
})
local frag = metal.parts.fragment
minetest.register_craft {
output = framedid;
recipe = {
{'', frag,''};
{frag,amuletname,frag};
{'', frag,''};
};
}
end)
end
minetest.register_craft {
type = 'shapeless';
recipe = (minetest.get_modpath('xdecor') and {
'xdecor:hammer', itemname;
}) or { itemname };
output = shardname .. ' 9';
|