Officially retire the ABM laundering hack

Never saw any empirical evidence that this
helped one bit.
This commit is contained in:
Aaron Suen 2020-06-27 21:01:23 -04:00
parent 068937c482
commit 0eee06c8ea
2 changed files with 4 additions and 52 deletions

View File

@ -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

View File

@ -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")