sorcery  Diff

Differences From Artifact [3d415e629d]:

To Artifact [a94be8d51a]:


    85     85   	elseif slot == 'input' then
    86     86   		local metal = sorcery.data.metallookup[item:get_name()]
    87     87   		local mat = sorcery.matreg.lookup[item:get_name()]
    88     88   		local comp = sorcery.data.compat.grindables[item:get_name()]
    89     89   		if metal or (mat and mat.metal) or comp then
    90     90   			return item:get_count()
    91     91   		else
    92         -			mat = item:get_definition()._matprop
           92  +			mat = item:get_definition()._sorcery and
           93  +			      item:get_definition()._sorcery.material
    93     94   			if mat and mat.grindvalue then
    94     95   				return item:get_count() 
    95     96   			end
    96     97   		end
    97     98   	end
    98     99   	return 0
    99    100   end
................................................................................
   103    104   		-- allow grinding of armor and tools back to their
   104    105   		-- original components
   105    106   		local mat = sorcery.matreg.lookup[item:get_name()]
   106    107   		if mat and mat.metal then
   107    108   			metal = mat
   108    109   		end
   109    110   	end
   110         -	local mp = item:get_definition()._matprop
          111  +	local mp = (item:get_definition()._sorcery and
          112  +		item:get_definition()._sorcery.material)
   111    113   		or sorcery.data.compat.grindables[item:get_name()]
   112    114   		or {}
   113    115   
   114    116   	if metal then mp = {
   115    117   		hardness = mp.hardness or metal.data.hardness;
   116    118   		grindvalue = ((mp.grindvalue or metal.value) or (metal and constants.metal_grindvalue));
   117    119   		powder = mp.powder or metal.data.parts.powder;