From 664681b2e205657d39f14ab72247d7b003d6911b Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 28 Jan 2017 09:46:25 -0500 Subject: [PATCH] better way to call after_dig_node --- init.lua | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index 942d644..6ffb61d 100644 --- a/init.lua +++ b/init.lua @@ -54,9 +54,7 @@ minetest.register_node("stained_glass:stained_glass", { groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), drop = "moreblocks:super_glow_glass", - after_dig_node = function(pos, oldnode, oldmetadata, digger) - unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) - end, + after_dig_node = unifieddyes.after_dig_node, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local name = itemstack:get_name() if name == "moreblocks:sweeper" then @@ -92,9 +90,7 @@ minetest.register_node("stained_glass:pastel_stained_glass", { walkable = true, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), - after_dig_node = function(pos, oldnode, oldmetadata, digger) - unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) - end, + after_dig_node = unifieddyes.after_dig_node, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local name = itemstack:get_name() if name == "moreblocks:sweeper" then @@ -121,9 +117,7 @@ minetest.register_node("stained_glass:faint_stained_glass", { walkable = true, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), - after_dig_node = function(pos, oldnode, oldmetadata, digger) - unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) - end, + 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, "stained_glass:faint_stained_glass") @@ -155,9 +149,7 @@ minetest.register_node("stained_glass:stained_trap_glass", { groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), drop = "moreblocks:trap_super_glow_glass", - after_dig_node = function(pos, oldnode, oldmetadata, digger) - unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) - end, + after_dig_node = unifieddyes.after_dig_node, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local name = itemstack:get_name() if name == "moreblocks:sweeper" then @@ -186,9 +178,7 @@ minetest.register_node("stained_glass:pastel_stained_trap_glass", { walkable = true, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), - after_dig_node = function(pos, oldnode, oldmetadata, digger) - unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) - end, + after_dig_node = unifieddyes.after_dig_node, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local name = itemstack:get_name() if name == "moreblocks:sweeper" then @@ -215,9 +205,7 @@ minetest.register_node("stained_glass:faint_stained_trap_glass", { walkable = true, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1}, sounds = default.node_sound_glass_defaults(), - after_dig_node = function(pos, oldnode, oldmetadata, digger) - unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger) - end, + 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, "stained_glass:faint_stained_glass")