moved directory creation to a point after reading the config file so that that value can be changed on the fly as well

This commit is contained in:
Sokomine 2022-09-14 22:47:30 +02:00
parent b70bdc60b9
commit 46ebb1d894

View File

@ -34,6 +34,11 @@ yl_speak_up.custom_server_functions = {}
yl_speak_up.reload = function(modpath, log_entry)
-- the server-specific configuration
dofile(modpath .. "config.lua")
-- those paths are set in config.lua - so make sure they exist
minetest.mkdir(yl_speak_up.worldpath..yl_speak_up.path)
minetest.mkdir(yl_speak_up.worldpath..yl_speak_up.inventory_path)
minetest.mkdir(yl_speak_up.worldpath..yl_speak_up.log_path)
-- logging and showing the log
dofile(modpath .. "fs_show_log.lua")
-- players *and* npc need privs for certain things; this here handles the NPC side of things
@ -147,10 +152,6 @@ end
-- better want to be on the safe side here)
dofile(modpath .. "register_once.lua")
minetest.mkdir(yl_speak_up.worldpath..yl_speak_up.path)
minetest.mkdir(yl_speak_up.worldpath..yl_speak_up.inventory_path)
minetest.mkdir(yl_speak_up.worldpath..yl_speak_up.log_path)
yl_speak_up.mob_table = yl_speak_up.init_mob_table() or {}