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