Class LuaTableHelper
java.lang.Object
games.stendhal.server.core.scripting.lua.LuaTableHelper
Adds some useful function members to Lua "table" table.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LuaTableHelperget()Retrieves the static instance.voidinit(org.luaj.vm2.LuaTable tableTable) pairsToNodes(org.luaj.vm2.LuaTable lt) Converts a list of Lua table pairs ({{int, int}, {int, int}}) to list of nodes (`List`). static NodepairToNode(org.luaj.vm2.LuaTable lt) Converts a Lua table pair ({num, num}) to `Node`.toList(org.luaj.vm2.LuaTable table) Converts a Lua table to Java list.
-
Method Details
-
get
Retrieves the static instance.- Returns:
- Static LuaStringHelper instance.
-
init
public void init(org.luaj.vm2.LuaTable tableTable) -
pairToNode
Converts a Lua table pair ({num, num}) to `Node`.- Parameters:
lt- Table containing integers.
-
pairsToNodes
Converts a list of Lua table pairs ({{int, int}, {int, int}}) to list of nodes (`List`). - Parameters:
lt- Table containing list of integer pairs.
-
toList
Converts a Lua table to Java list.- Parameters:
table- Table with contents to be transferred to new list.- Returns:
- New `List
-