yl_canned_food_mtg/setup.lua
2024-07-13 22:12:46 +02:00

20 lines
513 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_canned_food_mtg.settings.save_path
local function run_once()
local path = yl_canned_food_mtg.worldpath .. DIR_DELIM .. save_path
local file = io.open(path, "r")
if not file then
mkdir(path)
else
file:close()
end
end
run_once()