sorcery  Diff

Differences From Artifact [7e4d0ae5aa]:

  • File coins.lua — part of check-in [3f6a913e4e] at 2020-09-29 12:40:28 on branch trunk — * remove former hacky registration system, replace with consistent and flexible API; rewrite metal/gem generation to take advantage of this new API; tweaks to init system to enable world-local tweaks to lore and sorcery behavior * initial documentation commit * initial steps towards calendar - add default date format, astrolabe; prepare infra for division/melding/transmutation spells, various tweaks and fixes (user: lexi, size: 5636) [annotate] [blame] [check-ins using]

To Artifact [d6a069e16f]:


179
180
181
182
183
184
185

186
187
188
189
190
191
192
193
194
195
196
197
198
			local inv = meta:get_inventory()
			local reduce_slot = function(slot)
				local i = inv:get_stack(slot,1)
				i:take_item(items_used) inv:set_stack(slot,1,i)
			end
			reduce_slot('ingot')
			if not inv:is_empty('gem') then reduce_slot('gem') end

		end
		update_press_output(meta)
	end;
}) end

minetest.register_craft {
	output = 'sorcery:coin_press';
	recipe = {
		{'group:wood','group:wood','group:wood'};
		{'basic_materials:steel_bar','default:steel_ingot','basic_materials:steel_bar'};
		{'default:copper_ingot','default:stone','default:copper_ingot'};
	};
}







>













179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
			local inv = meta:get_inventory()
			local reduce_slot = function(slot)
				local i = inv:get_stack(slot,1)
				i:take_item(items_used) inv:set_stack(slot,1,i)
			end
			reduce_slot('ingot')
			if not inv:is_empty('gem') then reduce_slot('gem') end
			minetest.sound_play('sorcery_coins', { pos = pos, gain = 0.7 })
		end
		update_press_output(meta)
	end;
}) end

minetest.register_craft {
	output = 'sorcery:coin_press';
	recipe = {
		{'group:wood','group:wood','group:wood'};
		{'basic_materials:steel_bar','default:steel_ingot','basic_materials:steel_bar'};
		{'default:copper_ingot','default:stone','default:copper_ingot'};
	};
}