forked from minetest-mods/areas
Move areas:save() into async
On newer Minetest servers, handles saving jobs in async environment. To prevent conflicts, the save file is locked whie saving, and if a code requests saving while the file is locked, data is saved again immediately after finishing the current save.
This commit is contained in:
4
init.lua
4
init.lua
@ -12,6 +12,10 @@ areas.startTime = os.clock()
|
||||
areas.modpath = minetest.get_modpath("areas")
|
||||
dofile(areas.modpath.."/settings.lua")
|
||||
dofile(areas.modpath.."/api.lua")
|
||||
|
||||
local async_dofile = core.register_async_dofile or dofile
|
||||
async_dofile(areas.modpath.."/async.lua")
|
||||
|
||||
dofile(areas.modpath.."/internal.lua")
|
||||
dofile(areas.modpath.."/chatcommands.lua")
|
||||
dofile(areas.modpath.."/pos.lua")
|
||||
|
Reference in New Issue
Block a user