sorcery  Diff

Differences From Artifact [e5af87fe4c]:

To Artifact [f5d6bba856]:


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
	end
	inv:set_stack('output',1,ItemStack(nil))
	do return end

	::foundmetal:: if not inv:is_empty('gem') then
		local id = slot_gem:get_name()
		for name,gem in pairs(sorcery.data.gems) do
			print('scanning gem',name,dump(gem))
			if gem.foreign then
				if id == gem.foreign then gemname = name 
					else goto skip end
			else
				if id == 'sorcery:gem_' .. name then gemname = name
					else goto skip end
			end
			coincount = math.min(coincount, slot_gem:get_count())
			do break end
		::skip::end
	end
	
	coincount = coincount * coins_per_ingot
	print('names',coinname,gemname)

	local coinname = 'sorcery:coin_' .. metalname ..
		((gemname and '_' .. gemname) or '')

	inv:set_stack('output',1,ItemStack {
		name = coinname;
		count = coincount;







<













<







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
	end
	inv:set_stack('output',1,ItemStack(nil))
	do return end

	::foundmetal:: if not inv:is_empty('gem') then
		local id = slot_gem:get_name()
		for name,gem in pairs(sorcery.data.gems) do

			if gem.foreign then
				if id == gem.foreign then gemname = name 
					else goto skip end
			else
				if id == 'sorcery:gem_' .. name then gemname = name
					else goto skip end
			end
			coincount = math.min(coincount, slot_gem:get_count())
			do break end
		::skip::end
	end
	
	coincount = coincount * coins_per_ingot


	local coinname = 'sorcery:coin_' .. metalname ..
		((gemname and '_' .. gemname) or '')

	inv:set_stack('output',1,ItemStack {
		name = coinname;
		count = coincount;