sorcery  Diff

Differences From Artifact [533039aa40]:

To Artifact [8e18232927]:


1
2
3
4
5
6
7






8
9
10
11
12
13
14
--- 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'







	local tools, armors = sorcery.matreg.tools, sorcery.matreg.armors
	if gem.tools then for t,c in pairs(tools) do
		sorcery.matreg.lookup[(gem.items and gem.items[t]) or ('sorcery:' .. t .. '_' .. name)] = {
			gem = true;
			id = name; data = gem;
			value = c.cost*shards_per_gem;







>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- 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;
		amulet = amuletname;
	}

	local tools, armors = sorcery.matreg.tools, sorcery.matreg.armors
	if gem.tools then for t,c in pairs(tools) do
		sorcery.matreg.lookup[(gem.items and gem.items[t]) or ('sorcery:' .. t .. '_' .. name)] = {
			gem = true;
			id = name; data = gem;
			value = c.cost*shards_per_gem;