1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Use "core" namespace internally

This commit is contained in:
ShadowNinja 2014-04-27 21:02:48 -04:00
parent 1cd512913e
commit c4359ff65c
45 changed files with 812 additions and 843 deletions

View file

@ -1,6 +1,4 @@
local core = engine or minetest
core.async_jobs = {}
local function handle_job(jobid, serialized_retval)
@ -10,14 +8,14 @@ local function handle_job(jobid, serialized_retval)
core.async_jobs[jobid] = nil
end
if engine ~= nil then
core.async_event_handler = handle_job
else
minetest.register_globalstep(function(dtime)
if core.register_globalstep then
core.register_globalstep(function(dtime)
for i, job in ipairs(core.get_finished_jobs()) do
handle_job(job.jobid, job.retval)
end
end)
else
core.async_event_handler = handle_job
end
function core.handle_async(func, parameter, callback)