1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-07-04 17:10:36 +02:00

Renamed flipnodes to flip_nodes and some changes in comments

This commit is contained in:
Pierre-Yves Rollo
2015-10-28 09:10:46 +01:00
parent 6bab328d2b
commit 80f013f973

View File

@ -450,7 +450,7 @@ end
--- Flips a region along `axis`. Flips only nodes, no change on nodes orientations --- Flips a region along `axis`. Flips only nodes, no change on nodes orientations
-- @return The number of nodes flipped. -- @return The number of nodes flipped.
function worldedit.flipnodes(pos1, pos2, axis) function worldedit.flip_nodes(pos1, pos2, axis)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2) local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
worldedit.keep_loaded(pos1, pos2) worldedit.keep_loaded(pos1, pos2)
@ -576,13 +576,13 @@ function worldedit.rotate(pos1, pos2, axis, angle)
local count local count
if angle == 90 then if angle == 90 then
worldedit.flipnodes(pos1, pos2, other1) worldedit.flip_nodes(pos1, pos2, other1)
count, pos1, pos2 = worldedit.transpose(pos1, pos2, other1, other2) count, pos1, pos2 = worldedit.transpose(pos1, pos2, other1, other2)
elseif angle == 180 then elseif angle == 180 then
worldedit.flipnodes(pos1, pos2, other1) worldedit.flip_nodes(pos1, pos2, other1)
count = worldedit.flipnodes(pos1, pos2, other2) count = worldedit.flip_nodes(pos1, pos2, other2)
elseif angle == 270 then elseif angle == 270 then
worldedit.flipnodes(pos1, pos2, other2) worldedit.flip_nodes(pos1, pos2, other2)
count, pos1, pos2 = worldedit.transpose(pos1, pos2, other1, other2) count, pos1, pos2 = worldedit.transpose(pos1, pos2, other1, other2)
else else
error("Only 90 degree increments are supported!") error("Only 90 degree increments are supported!")
@ -598,7 +598,7 @@ end
-- @return The number of nodes flipped. -- @return The number of nodes flipped.
function worldedit.flip(pos1, pos2, axis) function worldedit.flip(pos1, pos2, axis)
local count local count
count = worldedit.flipnodes(pos1, pos2, axis) count = worldedit.flip_nodes(pos1, pos2, axis)
worldedit.orient(pos1, pos2, "flip", axis, 0) worldedit.orient(pos1, pos2, "flip", axis, 0)
return count return count
end end