magic-compass/DOCS.md

10 lines
540 B
Markdown
Raw Normal View History

2020-07-27 07:45:27 -07:00
# Magic Compass DOCS
### Callbacks
If you want to run additional code from an external mod of yours, there a few callbacks coming in handy:
* `magic_compass.register_on_use(function(player, ID, item_name, pos))`: use it to run more checks BEFORE being teleported. If it returns nil or false, the action is cancelled. If true, it keeps going
* `magic_compass.register_on_after_use(function(player, ID, item_name, pos))`: use it to run additional code AFTER having been teleported
### Graphic aspect
2022-05-17 15:00:19 -07:00
Edit `SETTINGS.lua` to suit your needs!