1
2
3
4
5
6
7
8
9
10
11
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
...
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
--- gemstones
local shards_per_gem = 9
sorcery.register_gem = function(name,gem)
local itemname = gem.foreign or 'sorcery:gem_' .. name
local shardname = gem.foreign_shard or 'sorcery:gem_' .. name .. '_shard'
local amuletname = gem.foreign_amulet or 'sorcery:gem_' .. name .. '_amulet'
sorcery.data.gems[name].parts = {
item = itemname;
shard = shardname;
................................................................................
inventory_image = 'sorcery_gem_' .. name .. '_shard.png';
groups = { gemshard = 1; crystalshard = 1; sorcery_shard = 1; };
_sorcery = {
material = {
gem = true;
id = name, data = gem;
raw = true, value = 1;
};
};
})
end
if not gem.foreign_amulet then
minetest.register_craftitem(amuletname, {
description = sorcery.lib.str.capitalize(name) .. ' amulet';
................................................................................
minetest.override_item(ore, {drop = newdrops})
-- might be possible to just edit it in place, since we're
-- referring to registered_nodes anyway, but i don't want
-- to chance it; god knows what's going on under the hood
end
end
for g,v in pairs(sorcery.data.gems) do sorcery.register_gem(g,v) end
sorcery.gem = {
getdrops = function(fac)
items = {}
for g,v in pairs(sorcery.data.gems) do
items[#items + 1] = {
rarity = gem.rarity * fac;
|
|
1
2
3
4
5
6
7
8
9
10
11
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
--- gemstones
local shards_per_gem = 9
local register_gem = function(name,gem)
local itemname = gem.foreign or 'sorcery:gem_' .. name
local shardname = gem.foreign_shard or 'sorcery:gem_' .. name .. '_shard'
local amuletname = gem.foreign_amulet or 'sorcery:gem_' .. name .. '_amulet'
sorcery.data.gems[name].parts = {
item = itemname;
shard = shardname;
................................................................................
inventory_image = 'sorcery_gem_' .. name .. '_shard.png';
groups = { gemshard = 1; crystalshard = 1; sorcery_shard = 1; };
_sorcery = {
material = {
gem = true;
id = name, data = gem;
raw = true, value = 1;
};
recipe = {
canonical = {
craft = {
{'','xdecor:hammer',''};
{'',itemname,''};
};
}
};
};
})
end
if not gem.foreign_amulet then
minetest.register_craftitem(amuletname, {
description = sorcery.lib.str.capitalize(name) .. ' amulet';
................................................................................
minetest.override_item(ore, {drop = newdrops})
-- might be possible to just edit it in place, since we're
-- referring to registered_nodes anyway, but i don't want
-- to chance it; god knows what's going on under the hood
end
end
-- for g,v in pairs(sorcery.data.gems) do sorcery.register_gem(g,v) end
sorcery.register.gems.foreach('sorcery:generate',{},register_gem)
sorcery.gem = {
getdrops = function(fac)
items = {}
for g,v in pairs(sorcery.data.gems) do
items[#items + 1] = {
rarity = gem.rarity * fac;
|