yl_survey_fs/setup.lua
2024-09-21 08:49:15 +00:00

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()