forked from minetest-mods/mesecons
First draft of some kind of Action Queue (just like the globalstep queue in to_update), but more flexible and also including delay functionality (mesecon_delayer).
The queue is also saved to a file, so that when restarting mesecons, delayers resume to the state they had when the game shut down. Needs testing.
This commit is contained in:
@ -181,3 +181,14 @@ function mesecon:tablecopy(table) -- deep table copy
|
||||
|
||||
return newtable
|
||||
end
|
||||
|
||||
function mesecon:cmpAny(t1, t2)
|
||||
if type(t1) ~= type(t2) then return false end
|
||||
if type(t1) ~= "table" and type(t2) ~= "table" then return t1 == t2 end
|
||||
|
||||
for i, e in pairs(t1) do
|
||||
if not mesecon:cmpAny(e, t2[i]) then return false end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
Reference in New Issue
Block a user