diff options
author | Jeija <norrepli@gmail.com> | 2012-08-13 13:12:19 +0200 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-08-13 13:12:19 +0200 |
commit | b197d29bef365947d0f288287ebaf09fab07cd86 (patch) | |
tree | 63e5221e5e66b5349ef0c1f083cc72211a18580d /mesecons_pressureplates/init.lua | |
parent | 987de2c7d5df3a389234b0122406afaaa3b1fafe (diff) |
Code cleanup, little bugfix (some conductors placed next to receptors didn't turn on)
Diffstat (limited to 'mesecons_pressureplates/init.lua')
-rw-r--r-- | mesecons_pressureplates/init.lua | 18 |
1 files changed, 6 insertions, 12 deletions
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")) |