summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jeija/button.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/jeija/button.lua b/jeija/button.lua
index bc3ec17..8288cea 100644
--- a/jeija/button.lua
+++ b/jeija/button.lua
@@ -32,6 +32,12 @@ minetest.register_on_dignode(
end
end
)
+minetest.register_on_placenode(function(pos, node)
+ if node.param2 == 4 or node.param2 == 8 then
+ minetest.env:remove_node(pos)
+ minetest.env:add_item(pos, 'node jeija:wall_button_off 1')
+ end
+end)
minetest.register_on_punchnode(function(pos, node, puncher)
if node.name == "jeija:wall_button_off" then
minetest.env:add_node(pos, {name="jeija:wall_button_on",param2=node.param2})