Hydra uses gopher-lua, Lua 5.1
arg
: table containing command line argumentshydra
: contains minetest protocol API, see hydra.mdvec2
,vec3
,box
: vector library, see vector.md
require()
can be used to import these modules.
escapes
: contains utility functions to deal with minetest escape sequences, see escapes.mdclient
: 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.base64
: contains thebase64.encode(data)
function to base64 encode a string as well asbase64.decode(data)
to decode
Source code: luax.
table.indexof(list, val)
table.copy(t, seen)
table.insert_all(t, other)
table.key_value_swap(t)
table.shuffle(t, from, to, random)
string.split(str, delim, include_empty, max_splits, sep_is_pattern)
string.trim(str)
math.hypot(x, y)
math.sign(x, tolerance)
math.factorial(x)
math.round(x)
math.clamp(min, max, v)