From 905260c8db2d7d4844e3955fa38a79da233b3ab7 Mon Sep 17 00:00:00 2001 From: DS Date: Sat, 7 Oct 2017 00:44:49 +0200 Subject: Handle blasts (#356) --- mesecons_pistons/init.lua | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'mesecons_pistons') diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index a52c802..e741855 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -184,7 +184,8 @@ minetest.register_node("mesecons_pistons:piston_normal_off", { mesecons = {effector={ action_on = piston_on, rules = piston_get_rules - }} + }}, + on_blast = mesecon.on_blastnode, }) -- onstate @@ -212,7 +213,8 @@ minetest.register_node("mesecons_pistons:piston_normal_on", { mesecons = {effector={ action_off = piston_off, rules = piston_get_rules - }} + }}, + on_blast = mesecon.on_blastnode, }) -- pusher @@ -232,6 +234,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_normal", { corresponding_piston = "mesecons_pistons:piston_normal_on", selection_box = piston_pusher_box, node_box = piston_pusher_box, + drop = "", }) -- Sticky ones @@ -265,7 +268,8 @@ minetest.register_node("mesecons_pistons:piston_sticky_off", { mesecons = {effector={ action_on = piston_on, rules = piston_get_rules - }} + }}, + on_blast = mesecon.on_blastnode, }) -- onstate @@ -293,7 +297,8 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", { mesecons = {effector={ action_off = piston_off, rules = piston_get_rules - }} + }}, + on_blast = mesecon.on_blastnode, }) -- pusher @@ -313,6 +318,7 @@ minetest.register_node("mesecons_pistons:piston_pusher_sticky", { corresponding_piston = "mesecons_pistons:piston_sticky_on", selection_box = piston_pusher_box, node_box = piston_pusher_box, + drop = "", }) -- @@ -364,7 +370,8 @@ minetest.register_node("mesecons_pistons:piston_up_normal_off", { mesecons = {effector={ action_on = piston_on, rules = piston_up_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- onstate @@ -392,7 +399,8 @@ minetest.register_node("mesecons_pistons:piston_up_normal_on", { mesecons = {effector={ action_off = piston_off, rules = piston_up_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- pusher @@ -412,6 +420,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_normal", { corresponding_piston = "mesecons_pistons:piston_up_normal_on", selection_box = piston_up_pusher_box, node_box = piston_up_pusher_box, + drop = "", }) @@ -448,7 +457,8 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_off", { mesecons = {effector={ action_on = piston_on, rules = piston_up_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- onstate @@ -476,7 +486,8 @@ minetest.register_node("mesecons_pistons:piston_up_sticky_on", { mesecons = {effector={ action_off = piston_off, rules = piston_up_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- pusher @@ -496,6 +507,7 @@ minetest.register_node("mesecons_pistons:piston_up_pusher_sticky", { corresponding_piston = "mesecons_pistons:piston_up_sticky_on", selection_box = piston_up_pusher_box, node_box = piston_up_pusher_box, + drop = "", }) -- @@ -550,7 +562,8 @@ minetest.register_node("mesecons_pistons:piston_down_normal_off", { mesecons = {effector={ action_on = piston_on, rules = piston_down_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- onstate @@ -578,7 +591,8 @@ minetest.register_node("mesecons_pistons:piston_down_normal_on", { mesecons = {effector={ action_off = piston_off, rules = piston_down_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- pusher @@ -598,6 +612,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_normal", { corresponding_piston = "mesecons_pistons:piston_down_normal_on", selection_box = piston_down_pusher_box, node_box = piston_down_pusher_box, + drop = "", }) -- Sticky @@ -630,7 +645,8 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_off", { mesecons = {effector={ action_on = piston_on, rules = piston_down_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- onstate @@ -658,7 +674,8 @@ minetest.register_node("mesecons_pistons:piston_down_sticky_on", { mesecons = {effector={ action_off = piston_off, rules = piston_down_rules, - }} + }}, + on_blast = mesecon.on_blastnode, }) -- pusher @@ -678,6 +695,7 @@ minetest.register_node("mesecons_pistons:piston_down_pusher_sticky", { corresponding_piston = "mesecons_pistons:piston_down_sticky_on", selection_box = piston_down_pusher_box, node_box = piston_down_pusher_box, + drop = "", }) -- cgit v1.2.3