diff options
Diffstat (limited to 'lavalamp')
-rw-r--r-- | lavalamp/init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lavalamp/init.lua b/lavalamp/init.lua index 8e0c3d5..93571c6 100644 --- a/lavalamp/init.lua +++ b/lavalamp/init.lua @@ -39,9 +39,10 @@ for i in ipairs(lavalamps_list) do }, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, sounds = default.node_sound_glass_defaults(), - on_rightclick = function(pos, node, clicker) + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) node.name = "lavalamp:"..colour.."_off" minetest.set_node(pos, node) + return itemstack end, }) @@ -64,9 +65,10 @@ for i in ipairs(lavalamps_list) do groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), drop = "lavalamp:"..colour, - on_rightclick = function(pos, node, clicker) + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) node.name = "lavalamp:"..colour minetest.set_node(pos, node) + return itemstack end, }) |