Make bugs only pointable with Bug Net

This commit is contained in:
cx384 2024-01-27 13:22:30 +01:00
parent 472997b4aa
commit 0cd3577481
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ for i in ipairs (butter_list) do
sunlight_propagates = true,
buildable_to = true,
walkable = false,
pointable = false,
groups = {catchable = 1},
selection_box = {
type = "fixed",

View File

@ -23,6 +23,7 @@ minetest.register_node("fireflies:firefly", {
sunlight_propagates = true,
buildable_to = true,
walkable = false,
pointable = false,
groups = {catchable = 1},
selection_box = {
type = "fixed",
@ -91,6 +92,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)
local player_name = player and player:get_player_name() or ""
if not pointed_thing or pointed_thing.type ~= "node" or