sorcery  Diff

Differences From Artifact [2e8a1de5b1]:

To Artifact [74a7ee86cb]:


   111    111   						return { gem = true, id = iname }
   112    112   					end
   113    113   				end
   114    114   			end;
   115    115   		};
   116    116   		fuel = {
   117    117   			groups = {'fuel','flammable'};
          118  +			subclass = {'alcohol'};
          119  +			conform = {
          120  +				alcohol = function(a,name)
          121  +					if a and a.kind == 'pure' then
          122  +						return {
          123  +							burntime = 15;
          124  +							leftover = sorcery.data.residue[name];
          125  +						}
          126  +					end
          127  +				end;
          128  +			};
   118    129   			predicate = function(name)
   119    130   				local c,di = minetest.get_craft_result {
   120    131   					method = 'fuel';
   121    132   					width = 1;
   122    133   					items = { ItemStack(name) };
   123    134   				}
   124    135   				if c.time and c.time > 0 then
................................................................................
   125    136   					return {
   126    137   						burntime = c.time;
   127    138   						leftover = di and di[1];
   128    139   					}
   129    140   				end
   130    141   			end;
   131    142   		};
          143  +		alcohol = {
          144  +			compat = 'alcohols';
          145  +		};
   132    146   		vessel = {
   133    147   			compat = 'vessels';
   134    148   			finagle = { type = 'vessel'; charge = 3; hold = 'liquid' };
   135    149   			predicate = function(name)
   136    150   				local item = minetest.registered_items[name]
   137    151   				if item and item._sorcery and item._sorcery.container then
   138    152   					local ct = item._sorcery.container
................................................................................
   199    213   		end
   200    214   
   201    215   		if c.subclass then
   202    216   			for _,s in pairs(c.subclass) do
   203    217   				o = sorcery.itemclass.get(name,s)
   204    218   				if o then
   205    219   					if c.conform and c.conform[s] then
   206         -						return c.conform[s](o)
          220  +						return c.conform[s](o,name)
   207    221   					else return o end
   208    222   				end
   209    223   			end
   210    224   		end
   211    225   
   212    226   		if c.groups then
   213    227   			for _,g in pairs(c.groups) do