generated from your-land/yl_template
20 lines
499 B
Lua
20 lines
499 B
Lua
-- Use this file to set up folder and variables once after installation of the mod
|
|
-- Afterwards you could disable this part of the code or set a variable that tells
|
|
-- this code not to run again
|
|
|
|
local mkdir = minetest.mkdir
|
|
local save_path = yl_template.settings.save_path
|
|
|
|
local function run_once()
|
|
local path = yl_template.worldpath .. DIR_DELIM .. save_path
|
|
local file = io.open(path, "r")
|
|
if not file then
|
|
mkdir(path)
|
|
else
|
|
file:close()
|
|
end
|
|
|
|
end
|
|
|
|
run_once()
|