summaryrefslogtreecommitdiff
path: root/worldedit_commands
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2016-07-04 19:51:28 +0200
committersfan5 <sfan5@live.de>2016-07-04 19:51:28 +0200
commit0b68b2aec676e737930743e7136e21c97f0ff292 (patch)
tree90e7dcb9b7a0a9b9f40cd830d53f0f9505811750 /worldedit_commands
parentf72abdb766d7808c4c731ec224c90f1f1fb395c6 (diff)
Fix //shift with absolute axis (x/y/z)
Diffstat (limited to 'worldedit_commands')
-rw-r--r--worldedit_commands/cuboid.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/worldedit_commands/cuboid.lua b/worldedit_commands/cuboid.lua
index 24dad28..c588b74 100644
--- a/worldedit_commands/cuboid.lua
+++ b/worldedit_commands/cuboid.lua
@@ -114,10 +114,12 @@ minetest.register_chatcommand("/shift", {
end
local axis, dir
- if direction ~= "?" then
- axis, dir = worldedit.translate_direction(name, direction)
- else
+ if direction == "x" or direction == "y" or direction == "z" then
+ axis, dir = direction, 1
+ elseif direction == "?" then
axis, dir = worldedit.player_axis(name)
+ else
+ axis, dir = worldedit.translate_direction(name, direction)
end
if axis == nil or dir == nil then
@@ -236,4 +238,4 @@ minetest.register_chatcommand("/contract", {
worldedit.marker_update(name)
end,
}
-) \ No newline at end of file
+)