diff options
Diffstat (limited to 'mesecons/actionqueue.lua')
-rw-r--r-- | mesecons/actionqueue.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesecons/actionqueue.lua b/mesecons/actionqueue.lua index e7cbc55..87fcee4 100644 --- a/mesecons/actionqueue.lua +++ b/mesecons/actionqueue.lua @@ -12,19 +12,19 @@ function mesecon.queue:add_action(pos, func, params, time, overwritecheck, prior -- Create Action Table: time = time or 0 -- time <= 0 --> execute, time > 0 --> wait time until execution priority = priority or 1 - local action = { pos=mesecon:tablecopy(pos), + local action = { pos=mesecon.tablecopy(pos), func=func, - params=mesecon:tablecopy(params or {}), + params=mesecon.tablecopy(params or {}), time=time, - owcheck=(overwritecheck and mesecon:tablecopy(overwritecheck)) or nil, + owcheck=(overwritecheck and mesecon.tablecopy(overwritecheck)) or nil, priority=priority} local toremove = nil -- Otherwise, add the action to the queue if overwritecheck then -- check if old action has to be overwritten / removed: for i, ac in ipairs(mesecon.queue.actions) do - if(mesecon:cmpPos(pos, ac.pos) - and mesecon:cmpAny(overwritecheck, ac.owcheck)) then + if(mesecon.cmpPos(pos, ac.pos) + and mesecon.cmpAny(overwritecheck, ac.owcheck)) then toremove = i break end @@ -60,7 +60,7 @@ local m_time = 0 minetest.register_globalstep(function (dtime) m_time = m_time + dtime if (m_time < MESECONS_RESUMETIME) then return end -- don't even try if server has not been running for XY seconds - local actions = mesecon:tablecopy(mesecon.queue.actions) + local actions = mesecon.tablecopy(mesecon.queue.actions) local actions_now={} mesecon.queue.actions = {} |