Skip to content

callHook for Lua

Golden requested to merge Golden/SRB2:callhook into next
  • 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. Otherwise false will be returned if a value not evaluating to true 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

Merge request reports