diff --git a/mods/butterflies/init.lua b/mods/butterflies/init.lua index 29bb96e..6d88482 100644 --- a/mods/butterflies/init.lua +++ b/mods/butterflies/init.lua @@ -2,6 +2,8 @@ -- Load support for MT game translation. local S = minetest.get_translator("butterflies") +-- Legacy compatibility, when pointabilities don't exist, pointable is set to true. +local pointable_compat = not minetest.features.item_specific_pointabilities -- register butterflies local butter_list = { @@ -33,6 +35,7 @@ for i in ipairs (butter_list) do sunlight_propagates = true, buildable_to = true, walkable = false, + pointable = pointable_compat, groups = {catchable = 1}, selection_box = { type = "fixed", diff --git a/mods/butterflies/mod.conf b/mods/butterflies/mod.conf index 1c66497..d0380e1 100644 --- a/mods/butterflies/mod.conf +++ b/mods/butterflies/mod.conf @@ -1,3 +1,4 @@ name = butterflies description = Minetest Game mod: Butterflies depends = default, flowers +optional_depends = fireflies diff --git a/mods/fireflies/init.lua b/mods/fireflies/init.lua index a28fd12..7359f26 100644 --- a/mods/fireflies/init.lua +++ b/mods/fireflies/init.lua @@ -6,6 +6,8 @@ local S = minetest.get_translator("fireflies") local m_eth = minetest.get_modpath("ethereal") -- detecting cretive engine over creative privilegies local m_cre = minetest.get_modpath("creative") +-- Legacy compatibility, when pointabilities don't exist, pointable is set to true. +local pointable_compat = not minetest.features.item_specific_pointabilities -- firefly minetest.register_node("fireflies:firefly", { @@ -27,6 +29,7 @@ minetest.register_node("fireflies:firefly", { sunlight_propagates = true, buildable_to = true, walkable = false, + pointable = pointable_compat, groups = {catchable = 1}, selection_box = { type = "fixed", @@ -95,6 +98,7 @@ minetest.register_node("fireflies:hidden_firefly", { minetest.register_tool("fireflies:bug_net", { description = S("Bug Net"), inventory_image = "fireflies_bugnet.png", + pointabilities = {nodes = {["group:catchable"] = true}}, on_use = function(itemstack, player, pointed_thing) if not pointed_thing or pointed_thing.type ~= "node" or minetest.is_protected(pointed_thing.under, player:get_player_name()) then