]> git.lizzy.rs Git - worldedit.git/blobdiff - worldedit_commands/init.lua
Move worldedit.marker_update
[worldedit.git] / worldedit_commands / init.lua
index 91c16443711fbbbf202c273a7584b3c0b2ea47da..32bbc6c1e98abb566a3596e66e44aea86207e310 100644 (file)
@@ -333,8 +333,7 @@ worldedit.register_command("reset", {
        func = function(name)\r
                worldedit.pos1[name] = nil\r
                worldedit.pos2[name] = nil\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
                worldedit.set_pos[name] = nil\r
                --make sure the user does not try to confirm an operation after resetting pos:\r
                reset_pending(name)\r
@@ -347,8 +346,7 @@ worldedit.register_command("mark", {
        description = "Show markers at the region positions",\r
        privs = {worldedit=true},\r
        func = function(name)\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
                worldedit.player_notify(name, "region marked")\r
        end,\r
 })\r
@@ -361,8 +359,7 @@ worldedit.register_command("unmark", {
                local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]\r
                worldedit.pos1[name] = nil\r
                worldedit.pos2[name] = nil\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
                worldedit.pos1[name] = pos1\r
                worldedit.pos2[name] = pos2\r
                worldedit.player_notify(name, "region unmarked")\r
@@ -945,8 +942,7 @@ worldedit.register_command("move", {
 \r
                pos1[axis] = pos1[axis] + amount\r
                pos2[axis] = pos2[axis] + amount\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
                worldedit.player_notify(name, count .. " nodes moved")\r
        end,\r
 })\r
@@ -1037,8 +1033,7 @@ worldedit.register_command("stretch", {
                --reset markers to scaled positions\r
                worldedit.pos1[name] = pos1\r
                worldedit.pos2[name] = pos2\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
 \r
                worldedit.player_notify(name, count .. " nodes stretched")\r
        end,\r
@@ -1068,8 +1063,7 @@ worldedit.register_command("transpose", {
                --reset markers to transposed positions\r
                worldedit.pos1[name] = pos1\r
                worldedit.pos2[name] = pos2\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
 \r
                worldedit.player_notify(name, count .. " nodes transposed")\r
        end,\r
@@ -1119,8 +1113,7 @@ worldedit.register_command("rotate", {
                --reset markers to rotated positions\r
                worldedit.pos1[name] = pos1\r
                worldedit.pos2[name] = pos2\r
-               worldedit.mark_pos1(name)\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
 \r
                worldedit.player_notify(name, count .. " nodes rotated")\r
        end,\r
@@ -1346,9 +1339,8 @@ worldedit.register_command("allocate", {
                end\r
 \r
                worldedit.pos1[name] = nodepos1\r
-               worldedit.mark_pos1(name)\r
                worldedit.pos2[name] = nodepos2\r
-               worldedit.mark_pos2(name)\r
+               worldedit.marker_update(name)\r
 \r
                worldedit.player_notify(name, count .. " nodes allocated")\r
        end,\r