mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
[u_skins] Use minetest.after
This commit is contained in:
parent
f112012747
commit
9ca8aed35c
@ -10,15 +10,12 @@ u_skins.load_players = function()
|
|||||||
end
|
end
|
||||||
u_skins.load_players()
|
u_skins.load_players()
|
||||||
|
|
||||||
local ttime = 0
|
local function tick()
|
||||||
minetest.register_globalstep(function(t)
|
minetest.after(120, tick) --every 2min'
|
||||||
ttime = ttime + t
|
|
||||||
if ttime < 120 then --every 2min'
|
|
||||||
return
|
|
||||||
end
|
|
||||||
ttime = 0
|
|
||||||
u_skins.save()
|
u_skins.save()
|
||||||
end)
|
end
|
||||||
|
|
||||||
|
minetest.after(120, tick)
|
||||||
|
|
||||||
minetest.register_on_shutdown(function() u_skins.save() end)
|
minetest.register_on_shutdown(function() u_skins.save() end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user