1 # Hydra API documentation
4 Hydra uses gopher-lua, Lua 5.1
8 - `arg`: table containing command line arguments
9 - `hydra`: contains minetest protocol API, see [hydra.md](hydra.md)
10 - `vec2`, `vec3`, `box`: vector library, see [vector.md](vector.md)
12 ## Additional packages
14 `require()` can be used to import these modules.
16 - `escapes`: contains utility functions to deal with minetest escape sequences, see [escapes.md](escapes.md)
17 - `client`: a function to create a client from command line arguments in the form `<server> <username> <password>`. This is trivial but so commonly used that this function was added to avoid repetition in scripts.
19 ## Standard library additions
21 Source: [builtin/luax](../bultin/luax).
23 - `table.indexof(list, val)`
24 - `table.copy(t, seen)`
25 - `table.insert_all(t, other)`
26 - `table.key_value_swap(t)`
27 - `table.shuffle(t, from, to, random)`
28 - `string.split(str, delim, include_empty, max_splits, sep_is_pattern)`
31 - `math.sign(x, tolerance)`
34 - `math.clamp(min, max, v)`