diff options
author | Anthony Zhang <azhang9@gmail.com> | 2012-07-13 22:14:25 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2012-07-13 22:14:25 -0400 |
commit | 5869ccf7f8000dbf8682a67bed357ff09cd0f929 (patch) | |
tree | 6317760c1cec10864ab569920602587323a31d60 /functions.lua | |
parent | 21f768be1401a920d687c611ee59a7140e625701 (diff) |
Properly document the WorldEdit API.
Diffstat (limited to 'functions.lua')
-rw-r--r-- | functions.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/functions.lua b/functions.lua index 2226e4c..35015a5 100644 --- a/functions.lua +++ b/functions.lua @@ -20,8 +20,8 @@ worldedit.volume = function(pos1, pos2) return (pos2.x - pos1.x + 1) * (pos2.y - pos1.y + 1) * (pos2.z - pos1.z + 1)
end
---fills a region defined by positions `pos1` and `pos2` with `nodename`, returning the number of nodes filled
-worldedit.fill = function(pos1, pos2, nodename)
+--sets a region defined by positions `pos1` and `pos2` to `nodename`, returning the number of nodes filled
+worldedit.set = function(pos1, pos2, nodename)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local env = minetest.env
@@ -72,7 +72,7 @@ worldedit.replace = function(pos1, pos2, searchnode, replacenode) return count
end
---copies the region defined by positions `pos1` and `pos2` along the `axis` axis by `amount` nodes, returning the number of nodes copied
+--copies the region defined by positions `pos1` and `pos2` along the `axis` axis ("x" or "y" or "z") by `amount` nodes, returning the number of nodes copied
worldedit.copy = function(pos1, pos2, axis, amount)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local env = minetest.env
@@ -117,7 +117,7 @@ worldedit.copy = function(pos1, pos2, axis, amount) return worldedit.volume(pos1, pos2)
end
---moves the region defined by positions `pos1` and `pos2` along the `axis` axis by `amount` nodes, returning the number of nodes moved
+--moves the region defined by positions `pos1` and `pos2` along the `axis` axis ("x" or "y" or "z") by `amount` nodes, returning the number of nodes moved
worldedit.move = function(pos1, pos2, axis, amount)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local env = minetest.env
@@ -164,7 +164,7 @@ worldedit.move = function(pos1, pos2, axis, amount) return worldedit.volume(pos1, pos2)
end
---duplicates the region defined by positions `pos1` and `pos2` along the `axis` axis `count` times, returning the number of nodes stacked
+--duplicates the region defined by positions `pos1` and `pos2` along the `axis` axis ("x" or "y" or "z") `count` times, returning the number of nodes stacked
worldedit.stack = function(pos1, pos2, axis, count)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
local length = pos2[axis] - pos1[axis] + 1
|