diff --git a/mods/nc_api_active/abmhack.lua b/mods/nc_api_active/abmhack.lua deleted file mode 100644 index bf6ec65f..00000000 --- a/mods/nc_api_active/abmhack.lua +++ /dev/null @@ -1,49 +0,0 @@ --- LUALOCALS < --------------------------------------------------------- -local minetest, nodecore - = minetest, nodecore --- LUALOCALS > --------------------------------------------------------- - --- local ratio = math_floor(tonumber(minetest.settings:get(nodecore.product --- .. "_abm_launder_ratio")) or 4) --- if ratio < 2 then return end - --- local defer = {} --- for i = 1, (ratio - 1) do defer[i] = {} end - --- local skip --- local proc = 0 --- minetest.register_globalstep(function() --- if skip then --- skip = nil --- return --- end --- proc = (proc % (ratio - 1)) + 1 --- local batch = defer[proc] --- if #batch > 0 then --- local getnode = minetest.get_node --- for _, v in pairs(batch) do --- local node = getnode(v[1]) --- if node.name == v[2] then v[3](v[1], node) end --- end --- defer[proc] = {} --- end --- end) - --- local bucket = 0 --- local oldreg = minetest.register_abm --- function minetest.register_abm(def, ...) --- local oldact = def.action --- def.action = function(pos, node) --- skip = true --- bucket = (bucket + 1) % ratio --- if bucket == 0 then --- return oldact(pos, node) --- else --- local batch = defer[bucket] --- batch[#batch + 1] = {pos, node.name, oldact} --- end --- end --- return oldreg(def, ...) --- end - -nodecore.register_limited_abm = function(...) return minetest.register_abm(...) end diff --git a/mods/nc_api_active/init.lua b/mods/nc_api_active/init.lua index f8930acd..56e3bb89 100644 --- a/mods/nc_api_active/init.lua +++ b/mods/nc_api_active/init.lua @@ -1,13 +1,14 @@ -- LUALOCALS < --------------------------------------------------------- -local include, nodecore - = include, nodecore +local include, minetest, nodecore + = include, minetest, nodecore -- LUALOCALS > --------------------------------------------------------- nodecore.amcoremod() +nodecore.register_limited_abm = function(...) return minetest.register_abm(...) end + include("abmmux") include("stasis") -include("abmhack") include("dnts") include("aism") include("soaking")