sorcery  Diff

Differences From Artifact [52848574bf]:

  • File metallurgy-hot.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: 14066) [annotate] [blame] [check-ins using]

To Artifact [dd0624e110]:

  • File metallurgy-hot.lua — part of check-in [ea6e475e44] at 2020-10-19 09:52:11 on branch trunk — continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes (user: lexi, size: 14078) [annotate] [blame] [check-ins using]

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
	local count = 0
	for i=1,inv:get_size('input') do
		local m = inv:get_stack('input',i)
		if m:is_empty() then goto skip end
		local l = sorcery.data.metallookup[m:get_name()]
		if not l then
			local p = sorcery.lib.tbl.walk(m:get_definition()._sorcery,{'material'})
			if p.metal then l = p end
		end
		if not l then return false end
		mix[l.id] = (mix[l.id] or 0) + l.value
		count = count + l.value
	::skip::end
	count = math.floor(count)
	-- everything is metal, we've finished summing it up.
................................................................................
			drawtype = "mesh";
			after_dig_node = sorcery.lib.node.purge_container;
			mesh = 'sorcery-kiln-' .. state .. '.obj';
			drop = id;
			groups = {
				cracky = (state == 'open' and 2) or nil;
				sorcery_metallurgy = 1;
				not_in_creative_inventory = (state == open) and nil or 1;
			};
			sunlight_propagates = true;
			paramtype1 = 'light';
			paramtype2 = 'facedir';
			selection_box = box[state];
			collision_box = box[state];
			tiles = tex[state];
................................................................................
	for _, active in pairs {false, true} do
		minetest.register_node((active and id .. '_active') or id, {
			_proto = kind;
			description = desc;
			drop = id;
			after_dig_node = sorcery.lib.node.purge_container;
			groups = {
				cracky = (active and 2) or nil;
				sorcery_metallurgy = 1;
				not_in_creative_inventory = active and 1 or nil;
			};
			paramtype2 = 'facedir';
			light_source = (active and 9) or 0;
			on_construct = function(pos)
				local meta = minetest.get_meta(pos)







|







 







|







 







|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
	local count = 0
	for i=1,inv:get_size('input') do
		local m = inv:get_stack('input',i)
		if m:is_empty() then goto skip end
		local l = sorcery.data.metallookup[m:get_name()]
		if not l then
			local p = sorcery.lib.tbl.walk(m:get_definition()._sorcery,{'material'})
			if p and p.metal then l = p end
		end
		if not l then return false end
		mix[l.id] = (mix[l.id] or 0) + l.value
		count = count + l.value
	::skip::end
	count = math.floor(count)
	-- everything is metal, we've finished summing it up.
................................................................................
			drawtype = "mesh";
			after_dig_node = sorcery.lib.node.purge_container;
			mesh = 'sorcery-kiln-' .. state .. '.obj';
			drop = id;
			groups = {
				cracky = (state == 'open' and 2) or nil;
				sorcery_metallurgy = 1;
				not_in_creative_inventory = (state == 'open') and nil or 1;
			};
			sunlight_propagates = true;
			paramtype1 = 'light';
			paramtype2 = 'facedir';
			selection_box = box[state];
			collision_box = box[state];
			tiles = tex[state];
................................................................................
	for _, active in pairs {false, true} do
		minetest.register_node((active and id .. '_active') or id, {
			_proto = kind;
			description = desc;
			drop = id;
			after_dig_node = sorcery.lib.node.purge_container;
			groups = {
				cracky = (not active and 2) or nil;
				sorcery_metallurgy = 1;
				not_in_creative_inventory = active and 1 or nil;
			};
			paramtype2 = 'facedir';
			light_source = (active and 9) or 0;
			on_construct = function(pos)
				local meta = minetest.get_meta(pos)