From e2f1c4ef174443b2807aa94a209261546bbf19fb Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sat, 12 Jan 2013 18:20:41 -0500 Subject: Add //homogenize, //lua, and //luatransform commands, as well as their documentation. --- WorldEdit API.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'WorldEdit API.md') diff --git a/WorldEdit API.md b/WorldEdit API.md index a0a1a60..0b383ed 100644 --- a/WorldEdit API.md +++ b/WorldEdit API.md @@ -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. \ No newline at end of file +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. \ No newline at end of file -- cgit v1.2.3