Squelch excess limited ABM warnings.
This commit is contained in:
parent
af64f075be
commit
d968be62ee
@ -23,6 +23,7 @@ function nodecore.register_limited_abm(def)
|
||||
def.label = minetest.get_current_modname() .. ":" .. genlabels
|
||||
genlabels = genlabels + 1
|
||||
end
|
||||
def.limited_alert = def.limited_alert or def.limited_max
|
||||
|
||||
def.action = function(pos, ...)
|
||||
local hash = minetest.hash_node_position(pos)
|
||||
@ -48,7 +49,7 @@ function nodecore.register_limited_abm(def)
|
||||
+ def.limited_jitter * math_random() * 2,
|
||||
pumpq)
|
||||
|
||||
if def.limited_qty >= def.limited_max then
|
||||
if def.limited_qty >= def.limited_alert then
|
||||
minetest.log("limited abm \"" .. def.label .. "\" filled ("
|
||||
.. def.limited_qty .. "/" .. def.limited_max .. ")")
|
||||
end
|
||||
|
@ -10,6 +10,7 @@ nodecore.register_limited_abm({
|
||||
interval = 1,
|
||||
chance = 10,
|
||||
limited_max = 100,
|
||||
limited_alert = 1000,
|
||||
nodenames = {modname .. ":leaves"},
|
||||
action = function(pos)
|
||||
if not nodecore.scan_flood(pos, 5, function(p)
|
||||
|
Loading…
x
Reference in New Issue
Block a user