]> git.lizzy.rs Git - worldedit.git/commitdiff
Localize mkdir helper
authorShadowNinja <shadowninja@minetest.net>
Mon, 1 Jun 2015 20:53:03 +0000 (16:53 -0400)
committerShadowNinja <shadowninja@minetest.net>
Mon, 1 Jun 2015 20:53:03 +0000 (16:53 -0400)
worldedit_commands/init.lua

index 0fa8e389da26dce29f77fccb763553c4ed1f8096..612de62ad4eb19152e5c1e9bfa85389179e38063 100644 (file)
@@ -70,7 +70,7 @@ function worldedit.player_axis(name)
        return "z", dir.z > 0 and 1 or -1\r
 end\r
 \r
-function worldedit.mkdir(path)\r
+local function mkdir(path)\r
        if minetest.mkdir then\r
                minetest.mkdir(path)\r
        else\r
@@ -895,7 +895,7 @@ minetest.register_chatcommand("/save", {
 \r
                local path = minetest.get_worldpath() .. "/schems"\r
                -- Create directory if it does not already exist\r
-               worldedit.mkdir(path)\r
+               mkdir(path)\r
 \r
                local filename = path .. "/" .. param .. ".we"\r
                local file, err = io.open(filename, "wb")\r
@@ -1063,7 +1063,7 @@ minetest.register_chatcommand("/mtschemcreate", {
 \r
                local path = minetest.get_worldpath() .. "/schems"\r
                -- Create directory if it does not already exist\r
-               worldedit.mkdir(path)\r
+               mkdir(path)\r
 \r
                local filename = path .. "/" .. param .. ".mts"\r
                local ret = minetest.create_schematic(worldedit.pos1[name],\r