Index: cookbook.lua ================================================================== --- cookbook.lua +++ cookbook.lua @@ -51,13 +51,17 @@ return props.recipe end return {} end local modofname = function(id) - local sep = string.find(id,':') - if sep == nil then return nil end -- uh oh - return string.sub(id, 1, sep - 1) + local item = minetest.registered_nodes[id] + if item == nil or item.mod_origin == '??' or not item.mod_origin then + local sep = string.find(id,':') + if sep == nil then return nil end -- uh oh + return string.sub(id, 1, sep - 1) + end + return item.mod_origin end local item_restrict_eval = function(name, restrict) for _,n in pairs(constants.exclude_names) do if string.find(name,n) ~= nil then return false @@ -279,11 +283,11 @@ }; grind = { name = 'Milling Guide'; node = 'sorcery:mill'; booksuf = 'Manual'; - chance = 1; + chance = 4; w = 1, h = 2; pick = function(restrict) cache:populate_grindables() if restrict then local t = {} @@ -326,19 +330,16 @@ return {v,''} -- !! end end end; }; - -- wand = { - -- booksuf = 'Grimoire'; - -- } enchant = { name = 'Enchantment Matrix'; node = 'sorcery:enchanter'; booksuf = 'Grimoire'; drawslots = false; - chance = 6; + chance = 4; w = 2, h = 2; pick = function(restrict) -- TODO make sure affinity restrictions match local names = {} for k,v in pairs(sorcery.data.enchants) do @@ -456,14 +457,19 @@ local ing = ingredients[i] local x, y = k.slots[i][1], k.slots[i][2] if ing and ing ~= '' then local tt if k.indesc then tt = k.indesc(ing) else tt = desc_builtin(ing) end + local overlay = '' + if minetest.get_item_group(ing, 'sorcery_extract') ~= 0 then + overlay = string.format('item_image[%f,%f;0.6,0.6;%s]', x+0.5, y+0.5, ing) + ing = minetest.registered_nodes[ing]._sorcery.extract.of + end t = t .. string.format([[ - item_image[%f,%f;1,1;%s] + item_image[%f,%f;1,1;%s]%s tooltip[%f,%f;1,1;%s] - ]], x,y, minetest.formspec_escape(group_eval(ing)), + ]], x,y, minetest.formspec_escape(group_eval(ing)), overlay, x,y, minetest.formspec_escape(tt)) else if k.drawslots == nil or k.drawslots then t = string.format('box[%f,%f;0.1,0.1;#00000060]',x+0.45,y+0.45) .. t end Index: data/draughts.lua ================================================================== --- data/draughts.lua +++ data/draughts.lua @@ -181,10 +181,11 @@ -- desc = 'Amplify the power of your blows and crack steel armor with the force of your bare hands'; -- }; resilient = { name = 'Resilient'; color = {124,124,124}; style = 'dull'; + infusion = 'sorcery:liquid_sap_pine_bottle'; basis = 'sorcery:potion_soft'; desc = 'Withstand greater damage and hold your ground even in face of tremendous force'; quals = { force = true, duration = true }; }; hover = { Index: data/elixirs.lua ================================================================== --- data/elixirs.lua +++ data/elixirs.lua @@ -26,11 +26,11 @@ color = {183,28,238}; qual = 'speed'; apply = inc('speed'); describe = function(potion) return 'good', 'quickened', 'This potion will take effect more quickly and easily' end; - infusion = 'sorcery:liquid_sap_acacia_bottle'; + infusion = 'sorcery:oil_wind'; }; Purity = { color = {244,255,255}; qual = 'purity'; apply = inc('purity'); describe = function(potion) Index: data/extracts.lua ================================================================== --- data/extracts.lua +++ data/extracts.lua @@ -3,16 +3,24 @@ cotton = {"farming:seed_cotton", {210,210,210}}; wheat = {"farming:seed_wheat", {255,255,150}}; rye = {"farming:seed_rye", {255,245,180}}; oat = {"farming:seed_oat", {144,81,29}}; barley = {"farming:seed_barley", {239,255,157}}; + parsley = {"farming:parsley", {248,255,142}}; mint = {"farming:seed_mint", {190,255,190}}; hemp = {"farming:seed_hemp", {247,255,46}}; garlic = {"farming:garlic_clove", {225,167,31}}; onion = {"farming:onion", {247,189,78}}; blueberry = {"group:food_blueberries", {63,38,194}}; raspberry = {"group:food_raspberries", {228,51,210}}; + blackberry = {"group:food_blackberries", {113,0,101}}; + strawberry = {"group:food_strawberry", {255,30,78}}; + pepper = {"group:food_pepper", {220,236,142}}; + banana = {"group:food_banana", {238,255,30}}; + carrot = {"group:food_carrot", {255,183,30}}; + melon = {"farming:melon_slice", {180,255,30}}; + cucumber = {"group:food_cucumber", {109,224,22}}; chili = {"farming:chili_pepper", {243,75,49}}; pine = {"default:pine_sapling", {41,166,80}}; cocoa = {"farming:cocoa_beans", {146,38,0}}; grape = {"farming:grapes", {206,56,214}}; kelp = {"default:sand_with_kelp", {109,185,145}}; Index: data/greases.lua ================================================================== --- data/greases.lua +++ data/greases.lua @@ -27,13 +27,12 @@ }; pine = { color = {58,194,89}; core = { 'sorcery:oil_wind' }; mix = { - 'sorcery:extract_pine', - 'default:pine_needles', 'default:pine_needles', - 'default:pine_needles', 'default:pine_needles'; + 'sorcery:extract_pine'; + 'sorcery:liquid_sap_pine_bottle'; }; }; whisper = { color = {148,226,215}; style = 'sparkle'; @@ -69,11 +68,11 @@ color = {221,148,95}; core = { 'sorcery:oil_dawn', 'sorcery:oil_berry' }; mix = { 'sorcery:powder_aluminum'; 'sorcery:powder_vidrium'; - 'sorcery:extract_pine'; + 'sorcery:liquid_sap_aspen_bottle'; }; }; lift = { color = {219,73,210}; style = 'sparkle'; Index: data/oils.lua ================================================================== --- data/oils.lua +++ data/oils.lua @@ -45,33 +45,31 @@ }; sanguine = { -- healing color = {243,66,66}; style = 'sparkle'; mix = { - 'flowers:mushroom_red'; - 'sorcery:extract_raspberry'; + 'sorcery:extract_strawberry'; 'sorcery:blood'; 'farming:beetroot'; }; }; flame = { color = {243,57,49}; style = 'sparkle'; mix = { 'sorcery:extract_chili'; - 'farming:beetroot'; + 'farming:pepper_red'; 'sorcery:extract_chili'; + 'sorcery:liquid_sap_acacia_bottle'; }; }; stone = { color = { 68, 68, 68 }; style = 'sparkle'; mix = { - 'farming:grapes'; - 'farming:grapes'; - 'farming:grapes'; - 'sorcery:extract_cocoa'; + 'farming:pepper_ground'; + 'farming:parsley'; 'sorcery:extract_cocoa'; 'sorcery:extract_oat'; }; }; dawn = { @@ -86,37 +84,30 @@ }; }; bleak = { color = {155,78,56}; mix = { - 'farming:salt'; - 'sorcery:extract_raspberry'; - 'sorcery:extract_raspberry'; - 'sorcery:extract_onion'; - 'farming:peas'; - 'farming:peas'; - 'farming:peas'; + 'sorcery:liquid_sap_jungle_bottle'; + 'farming:blackberry'; + 'farming:soy_sauce'; }; }; luscious = { color = {10,255,10}; mix = { 'farming:hemp_oil'; - 'farming:grapes'; + 'group:food_strawberry'; 'farming:cocoa_beans'; - 'farming:cocoa_beans'; - 'farming:sugar'; - 'farming:sugar'; + 'farming:caramel'; }; }; luck = { color = {156,54,255}; style = 'sparkle'; mix = { 'sorcery:extract_marram'; 'farming:hemp_leaf'; 'xdecor:honey'; - 'farming:salt'; 'farming:salt'; }; }; } Index: data/philters.lua ================================================================== --- data/philters.lua +++ data/philters.lua @@ -1,9 +1,9 @@ return { dark = { color = {86,16,42}; - infusion = "default:obsidian_shard"; + infusion = "sorcery:liquid_sap_pine_bottle"; }; shimmering = { color = {224,255,155}; infusion = "default:mese_crystal_fragment"; }; @@ -10,13 +10,13 @@ silent = { color = {249,193,42}; infusion = "sorcery:extract_cotton"; }; verdant = { - infusion = "default:sapling"; + infusion = "sorcery:liquid_sap_apple_bottle"; color = {78,222,113}; }; blazing = { infusion = "sorcery:oil_flame"; color = {229,32,53}; }; } Index: data/potions.lua ================================================================== --- data/potions.lua +++ data/potions.lua @@ -12,11 +12,11 @@ substitutes = 'Serene'; glow = 8; }; Misty = { color = {186,241,233}; - infusion = 'sorcery:grease_fog'; + infusion = 'sorcery:liquid_sap_aspen_bottle'; }; Luminous = { color = {255,237,160}; style = 'dull'; glow = 12; Index: data/trees.lua ================================================================== --- data/trees.lua +++ data/trees.lua @@ -35,10 +35,11 @@ node = 'default:acacia_tree'; sapling = 'default:acacia_sapling'; leaves = 'default:acacia_leaves'; sap = 'Acacia Sap'; color = {217, 51, 22}; + sapglow = 7; }; jungle = { desc = 'Jungle'; node = 'default:jungletree'; sapling = 'default:junglesapling'; Index: potions.lua ================================================================== --- potions.lua +++ potions.lua @@ -288,10 +288,14 @@ groups = { sorcery_extract = 1; sorcery_container = 2; }; _sorcery = { + extract = { + of = item; + proto = v; + }; container = { type = 'vessel'; hold = 'liquid'; charge = 3; has = liqid; Index: tap.lua ================================================================== --- tap.lua +++ tap.lua @@ -15,10 +15,11 @@ 'default_steel_block.png'; }; groups = { dig_immediate = 2; attached_node = 1; + sorcery_instantiate = 1; }; sunlight_propagates = true; paramtype = 'light', paramtype2 = 'wallmounted'; selection_box = { type='fixed', fixed = {-0.2,-0.5,-0.35; 0.3,0.1,0.4} }; collision_box = { type='fixed', fixed = {-0.2,-0.5,-0.35; 0.3,0.1,0.4} }; @@ -49,10 +50,16 @@ on_rotate = function() return false end; _sorcery = { recipe = { note = 'Extract syrups and oils from trees'; }; + on_load = function(pos,node) + local tpos = pos + minetest.wallmounted_to_dir(node.param2) + local tree = sorcery.tree.get(tpos) + if not tree or tree.def.sap == false then return end; + tapdrip(tree.def.sapliq, pos) + end; }; }) minetest.register_craft { output = 'sorcery:tap'; Index: tree.lua ================================================================== --- tree.lua +++ tree.lua @@ -41,10 +41,11 @@ color = t.sapcolor or t.color or {119,24,30}; autogen = true; imgvariant = 'sparkle'; measure = sorcery.liquid.units.pint; usetrough = t.sap ~= false; + glow = t.sapglow; } end end)