1
0
Fork 0
VoxeLibre/mods/HUD/mcl_info/API.md

22 lines
642 B
Markdown
Raw Normal View History

2022-07-18 22:12:56 +02:00
## mcl_info
An API to make custom entries in the VL debug hud.
2022-07-18 22:12:56 +02:00
### mcl_info.register_debug_field(name,defintion)
Debug field defintion example:
```
2022-07-18 22:12:56 +02:00
{
level = 3,
--show with debug level 3 and upwards
func = function(player,pos) return minetest.pos_to_string(pos) end,
-- Function that is run for at each debug
-- sample (default: every .63 seconds)
-- It should output a string and determines
-- the content of the debug field.
}
```
2022-07-18 22:12:56 +02:00
### mcl_info.registered_debug_fields
Table the debug definitions are stored in. Do not modify this directly. If you need to overwrite a field just set it again with mcl_info.register_debug_field().