callHook for Lua
- Adds a function
callHook(string hook, string/number conditional, ...)
that calls all functions hooked under the specified custom hook.
If nothing is returned from any function called,nil
will be returned. Otherwisefalse
will be returned if a value not evaluating totrue
is returned. -
addHook(string hook, function func)
no longer errors on an unknown hook, instead it implicitly creates a new custom hook to place it in.
Test Lua:
callhook.lua
Edited by LJ Sonic