1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-08 11:30:21 +01:00

[u_skins] Use minetest.after

This commit is contained in:
Wouters Dorian 2015-07-31 15:16:10 +02:00
parent f112012747
commit 9ca8aed35c

View File

@ -10,15 +10,12 @@ u_skins.load_players = function()
end
u_skins.load_players()
local ttime = 0
minetest.register_globalstep(function(t)
ttime = ttime + t
if ttime < 120 then --every 2min'
return
end
ttime = 0
local function tick()
minetest.after(120, tick) --every 2min'
u_skins.save()
end)
end
minetest.after(120, tick)
minetest.register_on_shutdown(function() u_skins.save() end)