]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/client/register.lua
Add documentation to builtin core.run_callbacks (#10494)
[dragonfireclient.git] / builtin / client / register.lua
index acd36ab36fb7e02884cd03f899576320bb430342..27a6b02d98dee92af24193d5f48b006db16d1151 100644 (file)
@@ -4,6 +4,13 @@ core.callback_origins = {}
 local getinfo = debug.getinfo
 debug.getinfo = nil
 
+--- Runs given callbacks.
+--
+-- Note: this function is also called from C++
+-- @tparam table  callbacks a table with registered callbacks, like `core.registered_on_*`
+-- @tparam number mode      a RunCallbacksMode, as defined in src/script/common/c_internal.h
+-- @param         ...       arguments for the callback
+-- @return depends on mode
 function core.run_callbacks(callbacks, mode, ...)
        assert(type(callbacks) == "table")
        local cb_len = #callbacks