mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-22 15:33:52 +01:00
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.
This commit is contained in:
parent
409ee441c4
commit
0a589e7529
14
init.lua
14
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( {
|
||||
|
Loading…
Reference in New Issue
Block a user