1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2025-09-10 18:45:26 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
unknown
878377301f respect the shift click convention and fix unreachable if else(if) tree 2022-05-29 10:29:47 -04:00

View File

@@ -490,6 +490,10 @@ minetest.register_tool("unifieddyes:airbrush", {
if pos then node = minetest.get_node(pos) end
if node then def = minetest.registered_items[node.name] end
if keys.sneak and def and def.on_rightclick then
return def.on_rightclick(pos, node, placer, itemstack, pointed_thing)
end
unifieddyes.player_last_right_clicked[player_name] = {pos = pos, node = node, def = def}
if not keys.aux1 then
@@ -504,8 +508,6 @@ minetest.register_tool("unifieddyes:airbrush", {
else
minetest.chat_send_player(player_name, "*** That node is uncolored.")
end
elseif def.on_rightclick then
return def.on_rightclick(pos, node, placer, itemstack, pointed_thing)
end
end
})