summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-26 19:34:01 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-26 19:34:01 -0400
commit0a589e7529a3671913ebfe88f9d55b7d452c56a1 (patch)
tree6cabf536cf622e88ec135fb848c5630d241d3063
parent409ee441c46675fe6ecc44e67a4060bf3edb7352 (diff)
downloadunifieddyes-0a589e7529a3671913ebfe88f9d55b7d452c56a1.tar
unifieddyes-0a589e7529a3671913ebfe88f9d55b7d452c56a1.tar.gz
unifieddyes-0a589e7529a3671913ebfe88f9d55b7d452c56a1.tar.bz2
unifieddyes-0a589e7529a3671913ebfe88f9d55b7d452c56a1.tar.xz
unifieddyes-0a589e7529a3671913ebfe88f9d55b7d452c56a1.zip
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.
-rw-r--r--init.lua14
1 files 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( {