summaryrefslogtreecommitdiff
path: root/worldedit_commands/init.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2015-06-01 16:53:03 -0400
committerShadowNinja <shadowninja@minetest.net>2015-06-01 16:53:03 -0400
commit4bd5d569090b99d1e9e3b98f907af79b1abd2722 (patch)
treef0fdd415318d48f74205f2e93c49b8da28db9fb9 /worldedit_commands/init.lua
parent163dffccb38a1f4e37866d7232cecfb5238f7af7 (diff)
Localize mkdir helper
Diffstat (limited to 'worldedit_commands/init.lua')
-rw-r--r--worldedit_commands/init.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua
index 0fa8e38..612de62 100644
--- a/worldedit_commands/init.lua
+++ b/worldedit_commands/init.lua
@@ -70,7 +70,7 @@ function worldedit.player_axis(name)
return "z", dir.z > 0 and 1 or -1
end
-function worldedit.mkdir(path)
+local function mkdir(path)
if minetest.mkdir then
minetest.mkdir(path)
else
@@ -895,7 +895,7 @@ minetest.register_chatcommand("/save", {
local path = minetest.get_worldpath() .. "/schems"
-- Create directory if it does not already exist
- worldedit.mkdir(path)
+ mkdir(path)
local filename = path .. "/" .. param .. ".we"
local file, err = io.open(filename, "wb")
@@ -1063,7 +1063,7 @@ minetest.register_chatcommand("/mtschemcreate", {
local path = minetest.get_worldpath() .. "/schems"
-- Create directory if it does not already exist
- worldedit.mkdir(path)
+ mkdir(path)
local filename = path .. "/" .. param .. ".mts"
local ret = minetest.create_schematic(worldedit.pos1[name],