aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-08-06 20:44:31 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-08-06 20:44:31 +0200
commit62bcbbb527f1909b3cafd316209d04cca92ecc44 (patch)
treeb19dcfcfa1a978d7a5ec2c0826a01d4161651c70
parentfec8ef695f53d24a51af8406c7b50476f7de1987 (diff)
downloadlua_async_mt-62bcbbb527f1909b3cafd316209d04cca92ecc44.tar.xz
Add documentation
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index d29a043..91de317 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,11 @@
# lua_async_mt
Wrapper for lua_async to use it as a minetest mod.
+Executed the event loop every globalstep.
+
+See https://github.com/EliasFleckenstein03/lua_async for API documentation.
+
+## Utility functions
+
+### `lua_async.mt_validate_objs([obj1, obj2, ...])`
+Must be called from an async function.
+Validates all Minetest ObjectRefs passed as arguments, meaning it checks if they have been removed (in the case of luaentities) or left the game (in the case of players). If one of the refs is not valid, the current thread dies - essentially meaning _this function never returns_ if one of the ObjectRefs is not valid. An error is raised if arguments are given to this function that are not ObjectRefs at all.