Mutiny Mode

This commit is contained in:
Jeremy Liberman
2014-05-07 18:42:35 -05:00
parent d1d3620a12
commit d23340a49b
43 changed files with 2644 additions and 933 deletions

View File

@@ -23,7 +23,7 @@
* @param hook Identifier of the hook to call.
* @returns 1 if all hooked code runs successfully, 0 otherwise.
*/
/proc/callHook(hook)
/proc/callHook(hook, list/args=null)
var/hook_path = text2path("/hook/[hook]")
if(!hook_path)
error("Invalid hook '/hook/[hook]' called.")
@@ -32,7 +32,7 @@
var/caller = new hook_path
var/status = 1
for(var/P in typesof("[hook_path]/proc"))
if(!call(caller, P)())
if(!call(caller, P)(arglist(args)))
error("Hook '[P]' failed or runtimed.")
status = 0