From fa71e3166c7029fb102ab039e798a01cbff857e2 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sun, 26 Aug 2018 07:23:40 -0400 Subject: allow replacement nodes during airbrushing --- init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 8ebbd23..4ebcded 100644 --- a/init.lua +++ b/init.lua @@ -633,7 +633,7 @@ function unifieddyes.getpaletteidx(color, palette_type) end end --- punch-to-recolor +-- punch-to-recolor using the airbrush function unifieddyes.on_airbrush(itemstack, player, pointed_thing) local player_name = player:get_player_name() @@ -691,7 +691,9 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing) return end - minetest.swap_node(pos, {name = node.name, param2 = fdir + idx}) + local name = def.airbrush_replacement_node or node.name + + minetest.swap_node(pos, {name = name, param2 = fdir + idx}) if not creative or not creative.is_enabled_for(player_name) then inv:remove_item("main", painting_with) return -- cgit v1.2.3