]> git.lizzy.rs Git - worldedit.git/commitdiff
Update `stack2` API documentation.
authorUberi <azhang9@gmail.com>
Sun, 6 Jul 2014 23:59:56 +0000 (19:59 -0400)
committerUberi <azhang9@gmail.com>
Sun, 6 Jul 2014 23:59:56 +0000 (19:59 -0400)
WorldEdit API.md
worldedit/manipulations.lua

index c05958e84ac6df76c0572ebb7c0469344d6cb751..8f4b7d23c357f6dd566aef666b4c6bb7df7c9691 100644 (file)
@@ -57,6 +57,12 @@ Duplicates the region defined by positions `pos1` and `pos2` along the `axis` ax
 \r
 Returns the number of nodes stacked.\r
 \r
+### count = worldedit.stack2(pos1, pos2, direction, amount)\r
+\r
+Duplicates the region defined by positions `pos1` and `pos2` `amount` times with offset vector `direction`.\r
+\r
+Returns the number of nodes stacked.\r
+\r
 ### count, newpos1, newpos2 = worldedit.stretch(pos1, pos2, stretchx, stretchy, stretchz)\r
 \r
 Stretches the region defined by positions `pos1` and `pos2` by an factor of positive integers `stretchx`, `stretchy`. and `stretchz` along the X, Y, and Z axes, respectively, with `pos1` as the origin.\r
index 80541fcd30bb8e76b78afc26bb5b5ec22120aed9..fb8506fd56ffbaa27f481a747206e05c11170d9c 100644 (file)
@@ -124,6 +124,7 @@ worldedit.replaceinverse = function(pos1, pos2, searchnode, replacenode)
        return count\r
 end\r
 \r
+--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\r
 worldedit.copy = function(pos1, pos2, axis, amount) --wip: replace the old version below\r
        local pos1, pos2 = worldedit.sort_pos(pos1, pos2)\r
 \r
@@ -282,6 +283,7 @@ worldedit.copy2 = function(pos1, pos2, direction, volume)
        end\r
 end\r
 \r
+--duplicates the region defined by positions `pos1` and `pos2` `amount` times with offset vector `direction`, returning the number of nodes stacked\r
 worldedit.stack2 = function(pos1, pos2, direction, amount, finished)\r
        local i = 0\r
        local translated = {x=0,y=0,z=0}\r
@@ -300,7 +302,7 @@ worldedit.stack2 = function(pos1, pos2, direction, amount, finished)
                end\r
        end\r
        nextone()\r
-       return nil\r
+       return worldedit.volume(pos1, pos2) * amount\r
 end\r
 \r
 --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\r