Minetest version
Summary
Actions on on_secondary_use and on_place are not run if you're holding down the left mouse button. However, you can run on_use even if you're holding down the right button.
I expect actions to run no matter what keys I'm currently holding down. In my use case, I have a weapon that it's supposed to fire a charged attack when LMB is released and that uses the gunsight with RMB. However, if I'm charging the shot, I can't zoom in/out, which is frustrating.
Steps to reproduce
minetest.register_node("test:node", {
description = "Test node",
tiles = {"server_favorite.png"},
inventory_image = "server_favorite.png",
groups = {cracky = 3},
on_use = function(itemstack, user, pointed_thing)
minetest.chat_send_all("On use")
end,
on_secondary_use = function(itemstack, user, pointed_thing)
minetest.chat_send_all("On secondary use")
end,
on_place = function(itemstack, user, pointed_thing)
minetest.chat_send_all("On place")
end
})
click around
Possibly related: #13553