diff options
author | Anthony Zhang <azhang9@gmail.com> | 2012-02-17 18:18:27 -0500 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2012-02-17 18:18:27 -0500 |
commit | a9152327a20268a16b210e52a25a46010eb4eba9 (patch) | |
tree | dc0c2a4b48d6bc0c58359f3dad6a817c4eaa8770 | |
parent | fd81543d2bc75a417f84fd08b2cb9fcd66866581 (diff) | |
download | mesecons-a9152327a20268a16b210e52a25a46010eb4eba9.tar mesecons-a9152327a20268a16b210e52a25a46010eb4eba9.tar.gz mesecons-a9152327a20268a16b210e52a25a46010eb4eba9.tar.bz2 mesecons-a9152327a20268a16b210e52a25a46010eb4eba9.tar.xz mesecons-a9152327a20268a16b210e52a25a46010eb4eba9.zip |
Fix inverter states.
-rw-r--r-- | jeija/temperest.lua | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/jeija/temperest.lua b/jeija/temperest.lua index 6a3214f..134c7b8 100644 --- a/jeija/temperest.lua +++ b/jeija/temperest.lua @@ -76,6 +76,7 @@ end mesecon:register_on_signal_on(plug_on) mesecon:register_on_signal_off(plug_off) +minetest.register_on_placenode(plug_off) minetest.register_on_dignode(plug_off) minetest.register_craft({ @@ -114,7 +115,7 @@ minetest.register_node("jeija:mesecon_socket_on", { selection_box = { type = "fixed", }, - drop='node "jeija:mesecon_socket_off" 1', + drop='"jeija:mesecon_socket_off" 1', }) minetest.register_on_dignode( @@ -140,33 +141,38 @@ minetest.register_craft({ --TEMPEREST-INVERTER minetest.register_node("jeija:mesecon_inverter_off", { - description = "Inverter", drawtype = "raillike", paramtype = "light", is_ground_content = true, tile_images = {"jeija_mesecon_inverter_off.png"}, - inventory_image = "jeija_mesecon_inverter_off.png", - wield_image = "jeija_mesecon_inverter_off.png", material = minetest.digprop_constanttime(0.1), walkable = false, selection_box = { type = "fixed", }, + drop='"jeija:mesecon_inverter_on" 1', }) minetest.register_node("jeija:mesecon_inverter_on", { + description = "Inverter", drawtype = "raillike", paramtype = "light", is_ground_content = true, tile_images = {"jeija_mesecon_inverter_on.png"}, + inventory_image = "jeija_mesecon_inverter_on.png", + wield_image = "jeija_mesecon_inverter_on.png", material = minetest.digprop_constanttime(0.1), walkable = false, selection_box = { type = "fixed", }, - drop='node "jeija:mesecon_inverter_off" 1', }) +minetest.register_on_placenode(function(pos, node) + mesecon:receptor_on(pos) +end +) + minetest.register_on_dignode( function(pos, oldnode, digger) if oldnode.name == "jeija:mesecon_inverter_on" then @@ -179,7 +185,7 @@ mesecon:add_receptor_node("jeija:mesecon_inverter_on") mesecon:add_receptor_node_off("jeija:mesecon_inverter_off") minetest.register_craft({ - output = 'node "jeija:mesecon_inverter_off" 2', + output = 'node "jeija:mesecon_inverter_on" 2', recipe = { {'node "jeija:mesecon_off"', 'craft "default:steel_ingot"', 'node "jeija:mesecon_off"'}, {'craft "default:steel_ingot"', '', 'craft "default:steel_ingot"'}, |