Refactor to use only Settings objects for settings.

Also remove globally stored path for modpath and data.
Basically use less global variables for better adaptation to multithreading.
This commit is contained in:
Gaël C
2024-01-04 22:47:50 +01:00
parent 6fa1852277
commit e5b8f2b3b8
9 changed files with 131 additions and 174 deletions

View File

@ -123,11 +123,7 @@ end
local modpath = ""
if minetest then
if minetest.global_exists('mapgen_rivers') then
modpath = mapgen_rivers.modpath .. "terrainlib_lua/"
else
modpath = minetest.get_modpath(minetest.get_current_modname()) .. "terrainlib_lua/"
end
modpath = minetest.get_modpath(minetest.get_current_modname()) .. "terrainlib_lua/"
end
local rivermapper = dofile(modpath .. "rivermapper.lua")