mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-25 18:20:38 +01:00
Localize mkdir helper
This commit is contained in:
parent
163dffccb3
commit
4bd5d56909
@ -70,7 +70,7 @@ function worldedit.player_axis(name)
|
|||||||
return "z", dir.z > 0 and 1 or -1
|
return "z", dir.z > 0 and 1 or -1
|
||||||
end
|
end
|
||||||
|
|
||||||
function worldedit.mkdir(path)
|
local function mkdir(path)
|
||||||
if minetest.mkdir then
|
if minetest.mkdir then
|
||||||
minetest.mkdir(path)
|
minetest.mkdir(path)
|
||||||
else
|
else
|
||||||
@ -895,7 +895,7 @@ minetest.register_chatcommand("/save", {
|
|||||||
|
|
||||||
local path = minetest.get_worldpath() .. "/schems"
|
local path = minetest.get_worldpath() .. "/schems"
|
||||||
-- Create directory if it does not already exist
|
-- Create directory if it does not already exist
|
||||||
worldedit.mkdir(path)
|
mkdir(path)
|
||||||
|
|
||||||
local filename = path .. "/" .. param .. ".we"
|
local filename = path .. "/" .. param .. ".we"
|
||||||
local file, err = io.open(filename, "wb")
|
local file, err = io.open(filename, "wb")
|
||||||
@ -1063,7 +1063,7 @@ minetest.register_chatcommand("/mtschemcreate", {
|
|||||||
|
|
||||||
local path = minetest.get_worldpath() .. "/schems"
|
local path = minetest.get_worldpath() .. "/schems"
|
||||||
-- Create directory if it does not already exist
|
-- Create directory if it does not already exist
|
||||||
worldedit.mkdir(path)
|
mkdir(path)
|
||||||
|
|
||||||
local filename = path .. "/" .. param .. ".mts"
|
local filename = path .. "/" .. param .. ".mts"
|
||||||
local ret = minetest.create_schematic(worldedit.pos1[name],
|
local ret = minetest.create_schematic(worldedit.pos1[name],
|
||||||
|
Loading…
Reference in New Issue
Block a user