diff --git a/mods/ITEMS/mcl_cauldrons/init.lua b/mods/ITEMS/mcl_cauldrons/init.lua index 8d5ef96df..62de7c2c3 100644 --- a/mods/ITEMS/mcl_cauldrons/init.lua +++ b/mods/ITEMS/mcl_cauldrons/init.lua @@ -163,7 +163,7 @@ minetest.register_globalstep(function(dtime) end) -- Register cauldrons to pick up dripstone droplets -if noordstar_dripstone then +if minetest.get_modpath("noordstar_dripstone") then noordstar_dripstone.add_lava_catcher("mcl_cauldrons:cauldron", "mcl_cauldrons:cauldron_1_lava") noordstar_dripstone.add_lava_catcher("mcl_cauldrons:cauldron_1_lava", "mcl_cauldrons:cauldron_2_lava") noordstar_dripstone.add_lava_catcher("mcl_cauldrons:cauldron_2_lava", "mcl_cauldrons:cauldron_3_lava") diff --git a/mods/ITEMS/noordstar_dripstone/init.lua b/mods/ITEMS/noordstar_dripstone/init.lua index 6352cc191..21ac4ac1a 100644 --- a/mods/ITEMS/noordstar_dripstone/init.lua +++ b/mods/ITEMS/noordstar_dripstone/init.lua @@ -97,7 +97,7 @@ local function nodebox_of_size(size) end end -local function nodebox_type(size) +local function drawtype_of_size(size) if size >= 8 then return "normal" else @@ -106,8 +106,8 @@ local function nodebox_type(size) end -- Sounds -local dripstone_sounds = nil -if mcl_sounds then +local dripstone_sounds +if minetest.get_modpath("mcl_sounds") then dripstone_sounds = mcl_sounds.node_sound_stone_defaults() end @@ -244,7 +244,7 @@ local function make_dripstone(name, desc, longdesc, tiles, drop, size) } } , sounds = dripstone_sounds - , drawtype = nodebox_type(size) + , drawtype = drawtype_of_size(size) , paramtype = "light" , sunlight_propagates = sunlight_propagates , node_box = nodebox_of_size(size) @@ -569,8 +569,7 @@ local function drop_down_to(options, dry_up_node_name) local node_rel = minetest.get_node(pos_rel) or {} local node_name = node_rel.name or "" - if node_name == "air" then - else + if minetest.get_item_group(node_name, "air") ~= 0 then -- Non-air node has been found! -- Check if it reacts to the dripstone and if it can be -- activated. @@ -609,7 +608,7 @@ end local function harden(harden_nodes_func) return function(pos, node, aoc, aocw) - local node_above = minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }) or {} + local node_above = minetest.get_node(vector.offset(pos, 0, 1, 0)) or {} local na_name = node_above.name for _, hardener in pairs(harden_nodes_func()) do @@ -625,7 +624,7 @@ end local function trickle_down(options, dry_up_node_name) return function(pos, node, aoc, aocw) - local pos_below = { x = pos.x, y = pos.y - 1, z = pos.z } + local pos_below = vector.offset(pos, 0, -1, 0) local node_below = minetest.get_node(pos_below) or {} local nb_name = node_below.name or "" @@ -707,38 +706,38 @@ make_abm(watered_dripstone_spike, seconds_per_water_trickle, drop_down_to(intern -- CRATING RECIPES -local function gapple_recipe(gold, apple, gapple) +local function make_recipe(border, middle, output) minetest.register_craft({ - output = gapple, + output = output, recipe = { - { gold, gold, gold }, - { gold, apple, gold }, - { gold, gold, gold }, + { border, border, border }, + { border, middle, border }, + { border, border, border }, } }) end -gapple_recipe(dry_dripstone_spike, dry_dripstone_spike, dry_dripstone_tiny) -gapple_recipe(dry_dripstone_spike, dry_dripstone_tiny, dry_dripstone_small) -gapple_recipe(dry_dripstone_spike, dry_dripstone_small, dry_dripstone_medium) -gapple_recipe(dry_dripstone_spike, dry_dripstone_medium, dry_dripstone_great) -gapple_recipe(dry_dripstone_spike, dry_dripstone_great, dry_dripstone_large) -gapple_recipe(dry_dripstone_spike, dry_dripstone_large, dry_dripstone_huge) -gapple_recipe(hardened_dripstone_spike, hardened_dripstone_spike, hardened_dripstone_tiny) -gapple_recipe(hardened_dripstone_spike, hardened_dripstone_tiny, hardened_dripstone_small) -gapple_recipe(hardened_dripstone_spike, hardened_dripstone_small, hardened_dripstone_medium) -gapple_recipe(hardened_dripstone_spike, hardened_dripstone_medium, hardened_dripstone_great) -gapple_recipe(hardened_dripstone_spike, hardened_dripstone_great, hardened_dripstone_large) -gapple_recipe(hardened_dripstone_spike, hardened_dripstone_large, hardened_dripstone_huge) -gapple_recipe(molten_dripstone_spike, molten_dripstone_spike, molten_dripstone_tiny) -gapple_recipe(molten_dripstone_spike, molten_dripstone_tiny, molten_dripstone_small) -gapple_recipe(molten_dripstone_spike, molten_dripstone_small, molten_dripstone_medium) -gapple_recipe(molten_dripstone_spike, molten_dripstone_medium, molten_dripstone_great) -gapple_recipe(molten_dripstone_spike, molten_dripstone_great, molten_dripstone_large) -gapple_recipe(molten_dripstone_spike, molten_dripstone_large, molten_dripstone_huge) -gapple_recipe(watered_dripstone_spike, watered_dripstone_spike, watered_dripstone_tiny) -gapple_recipe(watered_dripstone_spike, watered_dripstone_tiny, watered_dripstone_small) -gapple_recipe(watered_dripstone_spike, watered_dripstone_small, watered_dripstone_medium) -gapple_recipe(watered_dripstone_spike, watered_dripstone_medium, watered_dripstone_great) -gapple_recipe(watered_dripstone_spike, watered_dripstone_great, watered_dripstone_large) -gapple_recipe(watered_dripstone_spike, watered_dripstone_large, watered_dripstone_huge) +make_recipe(dry_dripstone_spike, dry_dripstone_spike, dry_dripstone_tiny) +make_recipe(dry_dripstone_spike, dry_dripstone_tiny, dry_dripstone_small) +make_recipe(dry_dripstone_spike, dry_dripstone_small, dry_dripstone_medium) +make_recipe(dry_dripstone_spike, dry_dripstone_medium, dry_dripstone_great) +make_recipe(dry_dripstone_spike, dry_dripstone_great, dry_dripstone_large) +make_recipe(dry_dripstone_spike, dry_dripstone_large, dry_dripstone_huge) +make_recipe(hardened_dripstone_spike, hardened_dripstone_spike, hardened_dripstone_tiny) +make_recipe(hardened_dripstone_spike, hardened_dripstone_tiny, hardened_dripstone_small) +make_recipe(hardened_dripstone_spike, hardened_dripstone_small, hardened_dripstone_medium) +make_recipe(hardened_dripstone_spike, hardened_dripstone_medium, hardened_dripstone_great) +make_recipe(hardened_dripstone_spike, hardened_dripstone_great, hardened_dripstone_large) +make_recipe(hardened_dripstone_spike, hardened_dripstone_large, hardened_dripstone_huge) +make_recipe(molten_dripstone_spike, molten_dripstone_spike, molten_dripstone_tiny) +make_recipe(molten_dripstone_spike, molten_dripstone_tiny, molten_dripstone_small) +make_recipe(molten_dripstone_spike, molten_dripstone_small, molten_dripstone_medium) +make_recipe(molten_dripstone_spike, molten_dripstone_medium, molten_dripstone_great) +make_recipe(molten_dripstone_spike, molten_dripstone_great, molten_dripstone_large) +make_recipe(molten_dripstone_spike, molten_dripstone_large, molten_dripstone_huge) +make_recipe(watered_dripstone_spike, watered_dripstone_spike, watered_dripstone_tiny) +make_recipe(watered_dripstone_spike, watered_dripstone_tiny, watered_dripstone_small) +make_recipe(watered_dripstone_spike, watered_dripstone_small, watered_dripstone_medium) +make_recipe(watered_dripstone_spike, watered_dripstone_medium, watered_dripstone_great) +make_recipe(watered_dripstone_spike, watered_dripstone_great, watered_dripstone_large) +make_recipe(watered_dripstone_spike, watered_dripstone_large, watered_dripstone_huge) diff --git a/mods/ITEMS/noordstar_dripstone/mod.conf b/mods/ITEMS/noordstar_dripstone/mod.conf index d950830f0..44e95a87d 100644 --- a/mods/ITEMS/noordstar_dripstone/mod.conf +++ b/mods/ITEMS/noordstar_dripstone/mod.conf @@ -2,6 +2,4 @@ name=noordstar_dripstone description=Add stalactites and stalagmites to your game. author=Noordstar title=Noordstar Dripstone -license=EUPL v1.2 -depends= -optional_depends=mcl_sounds \ No newline at end of file +optional_depends=default,mcl_core,mcl_sounds \ No newline at end of file