-
Notifications
You must be signed in to change notification settings - Fork 0
Home
CreepyCre edited this page Apr 25, 2019
·
3 revisions
This has been create to make mods in "Baba is you" more compatible. The goal is to be able to hook into virtually any part of the lua code.
subtofunc wraps desired functions in a new function that executes a list of event subscribers before/after executing the initial function.
- make your function execute before/after a function of your choice
- your function can receive parameters passed into the initial function and modify them
- you may modify the return values of the initial funcition
- your function will also receive an event containing the following:
- "canceled" boolean to signal other subscribers that the event has been canceled
- "canceloriginal" boolean which will make the initial function not be executed if true
- source and line the function has been called from
- table containing all local fields of the caller function