sorcery  Diff

Differences From Artifact [0b5549f5e7]:

To Artifact [a284aef5fe]:


    57     57   	extra.description = label;
    58     58   	extra.inventory_image = image;
    59     59   	if not extra.groups then extra.groups = {} end
    60     60   	minetest.register_craftitem('sorcery:' .. name, extra)
    61     61   end
    62     62   
    63     63   sorcery.register_potion('blood', 'Blood', 'A bottle of sacrificial blood, imbued with stolen (or perhaps donated) life force', u.color(219,19,14), nil, nil, {
    64         -	sorcery_life_store = 4;
           64  +	_sorcery = {
           65  +		life_store = 4;
           66  +		container = {
           67  +			type = 'vessel';
           68  +			hold = 'liquid';
           69  +			has = 'sorcery:blood';
           70  +			empty = 'vessels:glass_bottle';
           71  +			charge = 3;
           72  +		};
           73  +	};
           74  +})
           75  +sorcery.register_potion('potion_water', 'Water Bottle', 'A bottle of plain water', u.color(43,90,162),nil,nil,{
           76  +	_sorcery = {
           77  +		container = {
           78  +			type = 'vessel';
           79  +			hold = 'liquid';
           80  +			has = 'default:water';
           81  +			empty = 'vessels:glass_bottle';
           82  +			charge = 3;
           83  +		};
           84  +	};
    65     85   })
    66         -sorcery.register_potion('potion_water', 'Water Bottle', 'A bottle of plain water', u.color(43,90,162))
    67         -sorcery.register_potion('holy_water', 'Holy Water','A bottle of consecrated water',u.color(94,138,206),'sparkle',6)
           86  +sorcery.register_potion('holy_water', 'Holy Water','A bottle of consecrated water',u.color(94,138,206),'sparkle',6,{
           87  +	_sorcery = {
           88  +		container = {
           89  +			type = 'vessel';
           90  +			hold = 'liquid';
           91  +			has = 'sorcery:water_holy';
           92  +			empty = 'vessels:glass_bottle';
           93  +			charge = 3;
           94  +		};
           95  +	};
           96  +})
    68     97   
    69     98   local create_infusion_recipe = function(id,potion,default_basis,proto)
    70     99   	if potion.infusion then
    71    100   		sorcery.register.infusions.link {
    72    101   			infuse = potion.infusion;
    73    102   			into = potion.basis or default_basis;
    74    103   			output = 'sorcery:' .. id;
................................................................................
   210    239   end)
   211    240   
   212    241   -- for n,v in pairs(sorcery.data.extracts) do
   213    242   sorcery.register.extracts.foreach('sorcery:mknodes',{},function(n,v)
   214    243   	local item = v[1]
   215    244   	local color = u.color(v[2])
   216    245   	local name = 'extract_' .. n
   217         -	sorcery.register_potion(name, u.str.capitalize(n) .. ' Extract', nil, color, 'sparkle', false, {
          246  +	local liqid = 'sorcery:' .. name
          247  +	local desc = u.str.capitalize(n) .. ' Extract'
          248  +	sorcery.register_potion(name, desc, nil, color, 'sparkle', false, {
   218    249   		groups = {
   219    250   			sorcery_extract = 1;
          251  +			sorcery_container = 2;
          252  +		};
          253  +		_sorcery = {
          254  +			container = {
          255  +				type = 'vessel';
          256  +				hold = 'liquid';
          257  +				charge = 3;
          258  +				has = liqid;
          259  +				empty = 'vessels:glass_bottle';
          260  +			};
          261  +		};
          262  +	})
          263  +
          264  +	sorcery.register.liquid.link(liqid, {
          265  +		name = desc;
          266  +		kind = 'sorcery:extract';
          267  +		proto = v;
          268  +		containers = {
          269  +			['vessels:glass_bottle'] = name;
   220    270   		};
   221    271   	})
   222    272   
   223    273   	local add_alcohol = function(booze)
   224    274   		minetest.register_craft {
   225    275   			type = "shapeless";
   226    276   			recipe = {