From: Auke Kok Date: Sat, 16 Apr 2016 03:55:56 +0000 (-0700) Subject: Doors: Use LBM instead of ABM to convert doors. X-Git-Tag: 0.4.14~27 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80664f9f8af5ec3fee09c5c41ad3f1ca77bdf1bb;p=oweals%2Fminetest_game.git Doors: Use LBM instead of ABM to convert doors. This works much more efficiently to replace old style doors. --- 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