Built-in scripting functions.

Static methods

statichash(s:String):Hash

Hashes a string.

All ids in the engine are represented as hashes, so a string needs to be hashed before it can be compared with an id.

Parameters:

s

string to hash

Returns:

a hashed string

statichash_to_hex(h:Hash):String

Get hex representation of a hash value as a string.

The returned string is always padded with leading zeros.

Parameters:

h

hash value to get hex string for

Returns:

hex representation of the hash

staticpprint(v:Any):Void

Pretty printing of Lua values.

This function prints Lua values in a manner similar to lua.Lua.print, but will also recurse into tables and pretty print them. There is a limit to how deep the function will recurse.

Parameters:

v

value to print