Add mods: technic, moreores, paintings, Nyancat (Pbj_pup). Small fix: sandwiches

This commit is contained in:
N-Nachtigal 2025-06-05 16:15:56 +02:00
parent 15e8e696a2
commit fb09deddc1
1404 changed files with 156555 additions and 211 deletions

View file

@ -0,0 +1,26 @@
local function throttle(callspersecond, fn)
local time = 0
local count = 0
return function(...)
local now = minetest.get_us_time()
if (now - time) > 1000000 then
-- reset time
time = now
count = 0
else
-- check max calls
count = count + 1
if count > callspersecond then
return
end
end
return pcall(fn, ...)
end
end
return throttle