mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Use "core" namespace internally
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user