From b197d29bef365947d0f288287ebaf09fab07cd86 Mon Sep 17 00:00:00 2001 From: Jeija Date: Mon, 13 Aug 2012 13:12:19 +0200 Subject: Code cleanup, little bugfix (some conductors placed next to receptors didn't turn on) --- mesecons_pressureplates/init.lua | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'mesecons_pressureplates') diff --git a/mesecons_pressureplates/init.lua b/mesecons_pressureplates/init.lua index fc23dba..cf16081 100644 --- a/mesecons_pressureplates/init.lua +++ b/mesecons_pressureplates/init.lua @@ -36,9 +36,6 @@ minetest.register_node("mesecons_pressureplates:pressure_plate_wood_on", { }, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1, mesecon = 2}, drop='"mesecons_pressureplates:pressure_plate_wood_off" 1', - after_dig_node = function(pos) - mesecon:receptor_off(pos, mesecon:get_rules("pressureplate")) - end }) minetest.register_craft({ @@ -77,9 +74,6 @@ minetest.register_abm( end, }) -mesecon:add_receptor_node("mesecons_pressureplates:pressure_plate_wood_on") -mesecon:add_receptor_node_off("mesecons_pressureplates:pressure_plate_wood_off") - -- PRESSURE PLATE STONE minetest.register_node("mesecons_pressureplates:pressure_plate_stone_off", { @@ -118,9 +112,6 @@ minetest.register_node("mesecons_pressureplates:pressure_plate_stone_on", { }, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1, mesecon = 2}, drop='"mesecons_pressureplates:pressure_plate_stone_off" 1', - after_dig_node = function(pos) - mesecon:receptor_off(pos, mesecon:get_rules("pressureplate")) - end }) minetest.register_craft({ @@ -159,9 +150,6 @@ minetest.register_abm( end, }) -mesecon:add_receptor_node("mesecons_pressureplates:pressure_plate_stone_on") -mesecon:add_receptor_node_off("mesecons_pressureplates:pressure_plate_stone_off") - mesecon:add_rules("pressureplate", {{x=0, y=1, z=-1}, {x=0, y=0, z=-1}, @@ -178,3 +166,9 @@ mesecon:add_rules("pressureplate", {x=0, y=-1, z=0}, {x=0, y=-2, z=0}, {x=0, y=1, z=0}}) + +mesecon:add_receptor_node("mesecons_pressureplates:pressure_plate_wood_on", mesecon:get_rules("pressureplate")) +mesecon:add_receptor_node_off("mesecons_pressureplates:pressure_plate_wood_off", mesecon:get_rules("pressureplate")) + +mesecon:add_receptor_node("mesecons_pressureplates:pressure_plate_stone_on", mesecon:get_rules("pressureplate")) +mesecon:add_receptor_node_off("mesecons_pressureplates:pressure_plate_stone_off", mesecon:get_rules("pressureplate")) -- cgit v1.2.3