summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2016-10-06 12:37:39 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2016-10-06 12:37:39 +0200
commitfaf864d11b74f5d7e7d44ec6dab4609c5619c234 (patch)
treeb476ce516aecea73d13f46506a2a706219afc747
parent6eb3d8ee64f834dab77a2314342d7b0eaa2e8efb (diff)
Doors now close automatically
-rw-r--r--init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 934810e..ae32d67 100644
--- a/init.lua
+++ b/init.lua
@@ -103,12 +103,23 @@ minetest.override_item("lifter:door_a", {
end
fetch_lift(pos, node, clicker, -1, 0, b1rc, 1)
fetch_lift(pos, node, clicker, -1, 0, b1rc, -1)
+-- minetest.after(5, b1rc, pos, node, clicker)
else
b1rc(pos, node, player)
end
end
})
+minetest.register_abm({
+ nodenames = {"lifter:door_b"},
+ interval = 8,
+ chance = 1,
+ catch_up = false,
+ action = function(pos, node)
+ minetest.after(1, b1rc, pos, node, "")
+ end
+})
+
--minetest.override_item("lifter:door_b_2", {
--on_rightclick = hijack_click(b2rc)
--})