From ea4135c25379052073a116b51b177cc13144693b Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 4 Feb 2017 19:41:14 -0500 Subject: [PATCH] unified dyes uses on_use now, instead of on_rightclick --- init.lua | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index 369126a..d041e8a 100644 --- a/init.lua +++ b/init.lua @@ -104,21 +104,15 @@ minetest.register_node("unifiedbricks:brickblock", { paramtype2 = "color", palette = "unifieddyes_palette.png", is_ground_content = true, - groups = {cracky=3, not_in_creative_inventory=1}, + groups = {cracky=3, not_in_creative_inventory=1, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), after_dig_node = unifieddyes.after_dig_node, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - unifieddyes.on_rightclick(pos, node, clicker, - itemstack, pointed_thing, "unifiedbricks:brickblock") - end, drop = "default:brick" }) minetest.override_item("default:brick", { - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - unifieddyes.on_rightclick(pos, node, clicker, - itemstack, pointed_thing, "unifiedbricks:brickblock") - end + ud_replacement_node = "unifiedbricks:brickblock", + groups = {cracky = 3, ud_param2_colorable = 1} }) minetest.register_node("unifiedbricks:clayblock", { @@ -130,23 +124,17 @@ minetest.register_node("unifiedbricks:clayblock", { paramtype2 = "color", palette = "unifieddyes_palette.png", is_ground_content = true, - groups = {crumbly=3, not_in_creative_inventory=1}, + groups = {crumbly=3, not_in_creative_inventory=1, ud_param2_colorable = 1}, sounds = default.node_sound_dirt_defaults({ footstep = "", }), after_dig_node = unifieddyes.after_dig_node, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - unifieddyes.on_rightclick(pos, node, clicker, - itemstack, pointed_thing, "unifiedbricks:clayblock") - end, drop = "default:clay" }) minetest.override_item("default:clay", { - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - unifieddyes.on_rightclick(pos, node, clicker, - itemstack, pointed_thing, "unifiedbricks:clayblock") - end + ud_replacement_node = "unifiedbricks:clayblock", + groups = {crumbly = 3, ud_param2_colorable = 1} })