mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-12 03:00:26 +01:00
Fix bedrock in mineclone2 (#49)
* adjust more mcl_vars variables that were recently added to MineClone2 * try to detect mcl_vars values that should have been changed
This commit is contained in:
parent
8edf220213
commit
de08a9d481
@ -215,8 +215,33 @@ if minetest.get_modpath("mcl_init") then -- Mineclone 2
|
|||||||
|
|
||||||
mcl_vars.mg_overworld_min = lowest_elevation
|
mcl_vars.mg_overworld_min = lowest_elevation
|
||||||
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
|
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
|
||||||
|
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_overworld_min + 4
|
||||||
mcl_vars.mg_lava_overworld_max = mcl_vars.mg_overworld_min + 10
|
mcl_vars.mg_lava_overworld_max = mcl_vars.mg_overworld_min + 10
|
||||||
mcl_vars.mg_end_max = mcl_vars.mg_overworld_min - 2000
|
mcl_vars.mg_end_max = mcl_vars.mg_overworld_min - 2000
|
||||||
|
mcl_vars.mg_realm_barrier_overworld_end_max = mcl_vars.mg_end_max
|
||||||
|
mcl_vars.mg_realm_barrier_overworld_end_min = mcl_vars.mg_end_max - 11
|
||||||
|
|
||||||
|
-- try to detect any variables that should have been modified but weren't
|
||||||
|
local bad_entries = {}
|
||||||
|
for k, v in pairs(mcl_vars) do
|
||||||
|
-- if a value is in this range, it's probably a new value added by MineClone2 that we should be adjusting, add it to the table
|
||||||
|
if type(v) == "number" and v <= old_overworld_min + 10 and v >= mcl_vars.mg_overworld_min + 100 then
|
||||||
|
bad_entries[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- mark variables as ignored that we intentionally don't change, like so:
|
||||||
|
-- bad_entries.mg_value_that_shouldnt_be_adjusted = nil
|
||||||
|
|
||||||
|
for k, v in pairs(bad_entries) do
|
||||||
|
local new_value = v + mcl_vars.mg_overworld_min - old_overworld_min
|
||||||
|
minetest.log("error", "dfcaverns: variable wasn't modified or marked as ignored! guessing new value:")
|
||||||
|
minetest.log("error", "mcl_var." .. tostring(k) .. " = " .. tostring(new_value) .. " -- was " .. tostring(v))
|
||||||
|
minetest.log("error", "if it shouldn't be changed, mark it as ignored in df_dependencies/mapgen.lua like so:")
|
||||||
|
minetest.log("error", "bad_entries." .. tostring(k) .. " = nil")
|
||||||
|
minetest.log("error", "This is a bug, please report it to https://github.com/FaceDeer/dfcaverns/issues/new")
|
||||||
|
mcl_vars[k] = new_value
|
||||||
|
end
|
||||||
|
|
||||||
-- shouldn't need to worry about the setting, extend_ores checks if the ores
|
-- shouldn't need to worry about the setting, extend_ores checks if the ores
|
||||||
-- have already been registered.
|
-- have already been registered.
|
||||||
|
Loading…
Reference in New Issue
Block a user