From 80664f9f8af5ec3fee09c5c41ad3f1ca77bdf1bb Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Fri, 15 Apr 2016 20:55:56 -0700 Subject: [PATCH] Doors: Use LBM instead of ABM to convert doors. This works much more efficiently to replace old style doors. --- mods/doors/init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 9e099939..90ddcc3d 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -203,11 +203,10 @@ function doors.register(name, def) end -- replace old doors of this type automatically - minetest.register_abm({ + minetest.register_lbm({ + name = ":doors:replace_" .. name:gsub(":", "_"), nodenames = {name.."_b_1", name.."_b_2"}, - interval = 7.0, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) + action = function(pos, node) local l = tonumber(node.name:sub(-1)) local meta = minetest.get_meta(pos) local h = meta:get_int("right") + 1