From 62bcbbb527f1909b3cafd316209d04cca92ecc44 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Fri, 6 Aug 2021 20:44:31 +0200 Subject: [PATCH] Add documentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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. -- 2.44.0