mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Async environment for mods to do concurrent tasks (#11131)
This commit is contained in:
parent
663c936428
commit
e7659883cc
38 changed files with 1646 additions and 48 deletions
15
games/devtest/mods/unittests/inside_async_env.lua
Normal file
15
games/devtest/mods/unittests/inside_async_env.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
unittests = {}
|
||||
|
||||
core.log("info", "Hello World")
|
||||
|
||||
function unittests.async_test()
|
||||
assert(core == minetest)
|
||||
-- stuff that should not be here
|
||||
assert(not core.get_player_by_name)
|
||||
assert(not core.set_node)
|
||||
assert(not core.object_refs)
|
||||
-- stuff that should be here
|
||||
assert(ItemStack)
|
||||
assert(core.registered_items[""])
|
||||
return true
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue