From 0a589e7529a3671913ebfe88f9d55b7d452c56a1 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sun, 26 Aug 2018 19:34:01 -0400 Subject: use shift-right-click for color select form (instead of punch or shift-punch) Must be pointing at a node, doesn't matter what it is, but with a range of 12, it's hard not to. --- init.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 5b08a10..b27c37e 100644 --- a/init.lua +++ b/init.lua @@ -644,12 +644,7 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing) end local pos = minetest.get_pointed_thing_position(pointed_thing) - if not pos or player:get_player_control().sneak then - unifieddyes.show_airbrush_form(player) - return - end - - if not painting_with then return end + if not pos then return end local node = minetest.get_node(pos) local def = minetest.registered_items[node.name] @@ -883,7 +878,12 @@ minetest.register_tool("unifieddyes:airbrush", { full_punch_interval=0.1, }, range = 12, - on_use = unifieddyes.on_airbrush + on_use = unifieddyes.on_airbrush, + on_place = function(itemstack, placer, pointed_thing) + if placer:get_player_control().sneak then + unifieddyes.show_airbrush_form(placer) + end + end }) minetest.register_craft( { -- cgit v1.2.3