diff options
-rw-r--r-- | worldedit/init.lua | 2 | ||||
-rw-r--r-- | worldedit_commands/init.lua | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/worldedit/init.lua b/worldedit/init.lua index fb4a0c8..11b90e9 100644 --- a/worldedit/init.lua +++ b/worldedit/init.lua @@ -1,4 +1,4 @@ -local path = minetest.get_modpath("worldedit")
+local path = minetest.get_modpath(minetest.get_current_modname())
local loadmodule = function(path)
return pcall(function()
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 6830194..c90e855 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -560,18 +560,16 @@ minetest.register_chatcommand("/move", { amount = amount * sign
end
- local count = worldedit.move(pos1, pos2, axis, tonumber(amount))
+ local tenv = minetest.env
+ if worldedit.ENABLE_QUEUE then
+ tenv = worldedit.quene_aliasenv
+ end
+ local count = worldedit.move(pos1, pos2, axis, tonumber(amount), tenv)
pos1[axis] = pos1[axis] + amount
pos2[axis] = pos2[axis] + amount
worldedit.mark_pos1(name)
worldedit.mark_pos2(name)
-
- local tenv = minetest.env
- if worldedit.ENABLE_QUEUE then
- tenv = worldedit.quene_aliasenv
- end
- local count = worldedit.copy(pos1, pos2, axis, tonumber(amount), tenv)
worldedit.player_notify(name, count .. " nodes moved")
end,
})
|