@@ -55,8 +55,9 @@ sorcery.register.residue.link('sorcery:' .. name, 'xdecor:bowl') extra.description = label; extra.inventory_image = image; if not extra.groups then extra.groups = {} end + extra.groups.sorcery_oil = 1 minetest.register_craftitem('sorcery:' .. name, extra) end 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, { @@ -105,8 +106,12 @@ end end -- for n,v in pairs(sorcery.data.potions) do +local kind_potion = { + label = 'Potion'; + kind = 'A mystical liquid crucial to the art of alchemy'; +} sorcery.register.potions.foreach('sorcery:mknodes',{},function(n,v) local color = u.color(v.color) local kind = v.style local glow = v.glow @@ -116,9 +121,9 @@ ((kind == 'sparkle' and ', fiercely bubbling') or '') .. ' liquid' local fullname = n .. ' Potion' sorcery.register.liquid.link('sorcery:'..id, { - name = 'Serene Potion'; + name = fullname; color = v.color; proto = v; kind = 'sorcery:potion'; measure = function(amt) return string.format('%s draughts', amt / 3) end; @@ -125,8 +130,9 @@ containers = { ['vessels:glass_bottle'] = 'sorcery:' .. id; }; }) + v.kind = kind_potion; sorcery.register_potion(id, fullname, desc, color, kind, glow, { groups = { sorcery_potion = 1; sorcery_magical = 1; @@ -145,10 +151,15 @@ create_infusion_recipe(id,v,'sorcery:potion_serene',{data=v,name=fullname}) end) -- for n,potion in pairs(sorcery.data.draughts) do +local kind_draught = { + label = 'Draught'; + desc = 'A drink that will suffuse your body and spirit with mystic energies'; +} sorcery.register.draughts.foreach('sorcery:mknodes',{},function(n,potion) local name = 'draught_' .. n + potion.kind = kind_draught local behavior = { _proto = potion; groups = { sorcery_potion = 2; @@ -204,12 +215,17 @@ create_infusion_recipe(name,potion,'sorcery:potion_luminous',{data=potion,name=fullname}) end) -- for n,elixir in pairs(sorcery.data.elixirs) do +local kind_elixir = { + label = 'Elixir'; + desc = 'A special kind of potion that enhances the particular qualities of other alchemical brews'; +} sorcery.register.elixirs.foreach('sorcery:mknodes',{},function(n,elixir) local color = u.color(elixir.color) local id = 'elixir_' .. string.lower(n) local fullname = 'Elixir of ' .. n + elixir.kind = kind_elixir; sorcery.register_potion(id, fullname, nil, color, 'dull', false, { _proto = elixir; groups = { sorcery_elixir = 1; @@ -239,13 +255,19 @@ }) end) -- for n,v in pairs(sorcery.data.philters) do +local kind_philter = { + label = 'Philter'; + desc = 'A special kind of potion that wooden rods can be soaked in to imbue them with special powers and transform them into wands'; +} sorcery.register.philters.foreach('sorcery:mknodes',{},function(n,v) local color = u.color(v.color) local id = 'philter_' .. n local name = v.name or u.str.capitalize(n) + if not v.name then v.name = name end local fullname = name .. ' Philter' + v.kind = kind_philter sorcery.register_potion(id, fullname, v.desc, color, 'sparkle',v.glow or 4, { _proto = v; _protoname = n; groups = { @@ -252,8 +274,9 @@ sorcery_magical = 1; sorcery_philter = 1; }; }) + v.quals = {force = true}; create_infusion_recipe(id,v,'sorcery:potion_viscous',{data=v,name=fullname}) end) -- for n,v in pairs(sorcery.data.extracts) do @@ -305,6 +328,8 @@ end -- need a relatively pure alcohol for this, tho other alcohols can be used -- for potionmaking in other ways add_alcohol('farming:bottle_ethanol') - add_alcohol('wine:glass_vodka') + if minetest.get_modpath('wine') then + add_alcohol('wine:glass_vodka') + end end)