From e4533063ae576733e90b07b66da1b32452ad712d Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Thu, 12 Oct 2023 18:36:03 +0200 Subject: [PATCH] range --- register_wand.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/register_wand.lua b/register_wand.lua index 5806a83..2e12f8a 100644 --- a/register_wand.lua +++ b/register_wand.lua @@ -1,10 +1,14 @@ +-- TODO: common node-registration function + minetest.register_tool("mtui:register_wand", { description = "UI Register wand", inventory_image = "mtui_register_wand.png", stack_max = 1, - range = 0, on_use = function(_, player, pointed_thing) local pos = pointed_thing.under + if not pos then + return + end local node = minetest.get_node_or_nil(pos) local playername = player:get_player_name()