Skip to content

Commit

Permalink
Merge branch 'airbrush_on_place' into 'master'
Browse files Browse the repository at this point in the history
Allows the airbrush to be placed into itemframes from homedecor

See merge request VanessaE/unifieddyes!7
  • Loading branch information
VanessaE committed Aug 21, 2020
2 parents c91c68e + e2c35e6 commit 30c55be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1147,10 +1147,11 @@ minetest.register_tool("unifieddyes:airbrush", {

unifieddyes.player_last_right_clicked[player_name] = {pos = pos, node = node, def = def}

if not keys.sneak then
if (not keys.sneak) and def.on_rightclick then
return def.on_rightclick(pos, node, placer, itemstack, pointed_thing)
elseif not keys.sneak then
unifieddyes.show_airbrush_form(placer)
elseif keys.sneak then

if not pos or not def then return end
local newcolor = unifieddyes.color_to_name(node.param2, def)

Expand Down

0 comments on commit 30c55be

Please sign in to comment.