From 2a9ad8adcda03db669000ccdb028767b3528622e Mon Sep 17 00:00:00 2001 From: jp Date: Sun, 23 Aug 2015 00:12:26 +0200 Subject: [PATCH] Disallow using the hammer against nodes --- nodes.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodes.lua b/nodes.lua index 61f77c9..0251f71 100644 --- a/nodes.lua +++ b/nodes.lua @@ -219,7 +219,7 @@ for _, c in pairs(colors) do paramtype2 = "wallmounted", groups = {dig_immediate=3, flammable=3}, selection_box = {type="wallmounted"}, - on_rightclick = function(pos, node, clicker, itemstack) + on_rightclick = function(pos, node, _, _) minetest.set_node(pos, {name="xdecor:curtain_open_"..c, param2=node.param2}) end }) @@ -233,7 +233,7 @@ for _, c in pairs(colors) do groups = {dig_immediate=3, flammable=3, not_in_creative_inventory=1}, selection_box = {type="wallmounted"}, drop = "xdecor:curtain_"..c, - on_rightclick = function(pos, node, clicker, itemstack) + on_rightclick = function(pos, node, _, _) minetest.set_node(pos, {name="xdecor:curtain_"..c, param2=node.param2}) end }) @@ -374,7 +374,8 @@ minetest.register_tool("xdecor:flint_steel", { minetest.register_tool("xdecor:hammer", { description = "Hammer", inventory_image = "xdecor_hammer.png", - wield_image = "xdecor_hammer.png" + wield_image = "xdecor_hammer.png", + on_use = function(_,_,_) do return end end }) xdecor.register("ivy", {