Using mcl_vars

This commit is contained in:
ancientmarinerdev 2023-01-30 20:52:33 +00:00 committed by Gitea
parent 1f107ec0c7
commit 245ce99223
2 changed files with 2 additions and 8 deletions

View file

@ -1,11 +1,5 @@
mcl_util = {}
local MAPGEN_LIMIT = 31000
function mcl_util.get_mapgen_limit()
return MAPGEN_LIMIT
end
-- Updates all values in t using values from to*.
function table.update(t, ...)
for _, to in ipairs {...} do

View file

@ -24,8 +24,8 @@ local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= fa
local mobs_debug = minetest.settings:get_bool("mobs_debug", false) -- Shows helpful debug info above each mob
local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
local MAPGEN_LIMIT = mcl_util.get_mapgen_limit()
local MAPGEN_MOB_LIMIT = mcl_util.get_mapgen_limit() - 100
local MAPGEN_LIMIT = mcl_vars.mapgen_limit
local MAPGEN_MOB_LIMIT = MAPGEN_LIMIT - 90
-- 30927 seems to be the edge of the world, so could be closer, but this is safer