Add //homogenize, //lua, and //luatransform commands, as well as their documentation.

This commit is contained in:
Anthony Zhang
2013-01-12 18:20:41 -05:00
parent c27ab877f1
commit e2f1c4ef17
5 changed files with 138 additions and 8 deletions

View File

@ -182,4 +182,20 @@ Returns the number of nodes saved.
Loads the nodes and meta from `file` to position `pos1`.
Returns the number of nodes loaded.
Returns the number of nodes loaded.
Code
----
Contained in code.lua, this module allows arbitrary Lua code to be used with WorldEdit.
### error = worldedit.lua(code)
Executes `code` as a Lua chunk in the global namespace.
Returns an error if the code fails or nil otherwise.
### error = worldedit.luatransform(pos1, pos2, code)
Executes `code` as a Lua chunk in the global namespace with the variable pos available, for each node in a region defined by positions `pos1` and `pos2`.
Returns an error if the code fails or nil otherwise.