sorcery  Diff

Differences From Artifact [b05dd85eee]:

To Artifact [ac0bc31ba3]:


   158    158   end
   159    159   
   160    160   local update_smelter = function(pos)
   161    161   	local meta = minetest.get_meta(pos)
   162    162   	local inv = meta:get_inventory()
   163    163   	local proto = minetest.registered_nodes[minetest.get_node(pos).name]._proto
   164    164   	local recipe, count, factor, meltpoint = find_recipe(inv)
   165         -	if recipe and proto.temp >= meltpoint then
          165  +	if recipe --[[and proto.temp >= meltpoint]] then
   166    166   		minetest.get_node_timer(pos):start(1)
   167    167   	else
   168    168   		meta:set_float('burntime',0)
   169    169   	end
   170    170   end
   171    171   
   172    172   local smelter_step = function(kind,active,pos,delta)
................................................................................
   298    298   		minetest.register_node(id_current, {
   299    299   			_active = (state == 'closed');
   300    300   			_proto = kind;
   301    301   			description = desc;
   302    302   			drawtype = "mesh";
   303    303   			mesh = 'sorcery-kiln-' .. state .. '.obj';
   304    304   			drop = id;
          305  +			groups = { cracky = 2; sorcery_device_kiln = (state == 'closed') and 1 or 2; }
   305    306   			sunlight_propagates = true;
   306    307   			paramtype1 = 'light';
   307    308   			paramtype2 = 'facedir';
   308    309   			selection_box = box[state];
   309    310   			collision_box = box[state];
   310    311   			tiles = tex[state];
   311    312   			light_source = (state == 'closed' and 7) or 0;
................................................................................
   375    376   	local id = 'sorcery:smelter_' .. kind.material .. kind.size_name
   376    377   	kind.id = id
   377    378   	for _, active in pairs {false, true} do
   378    379   		minetest.register_node((active and id .. '_active') or id, {
   379    380   			_proto = kind;
   380    381   			description = desc;
   381    382   			drop = id;
   382         -			groups = { cracky = 2; };
          383  +			groups = {
          384  +				cracky = 2;
          385  +				sorcery_device_smelter = active and 1 or 2;
          386  +			};
   383    387   			paramtype2 = 'facedir';
   384    388   			light_source = (active and 9) or 0;
   385    389   			on_construct = function(pos)
   386    390   				local meta = minetest.get_meta(pos)
   387    391   				local inv = meta:get_inventory()
   388    392   				inv:set_size('input',kind.size)
   389    393   				inv:set_size('output',kind.outsize)
................................................................................
   414    418   		recipe = recipe;
   415    419   		output = id;
   416    420   	}
   417    421   end
   418    422   
   419    423   for _, t in pairs {
   420    424   	{1, nil, 'clay'};
   421         -	{2, 'hot','aluminum'};
   422         -	{3, 'volcanic','platinum'};
   423         -	{4, 'stellar','duridium'};
   424         -	{5, 'nova','impervium'};
          425  +	-- {2, 'hot','aluminum'};
          426  +	-- {3, 'volcanic','platinum'};
          427  +	-- {4, 'stellar','duridium'};
          428  +	-- {5, 'nova','impervium'};
   425    429   } do register_kiln {
   426    430   		temp = t[1], temp_name = t[2];
   427    431   		material = t[3];
   428    432   		size = 3, outsize = 4, fuelsize = 1; -- future-proofing
   429    433   	}
   430    434   
   431    435   	for _, s in pairs {