From f300d97686842c9e1c43eb55afb62c654890438e Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Tue, 25 Dec 2018 18:20:49 -0700 Subject: [PATCH] remove the lava cutoff setting, no longer needed now that veins are fixed --- config.lua | 3 +-- magma_veins.lua | 20 +++++++------------- settingtypes.txt | 4 +--- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/config.lua b/config.lua index fc39c21..373d950 100644 --- a/config.lua +++ b/config.lua @@ -29,13 +29,12 @@ setting("bool", "cook_soil", true, "Cause soil and carbon-containing ores to be setting("bool", "magma_veins", true, "Enable magma veins") setting("int", "spread", 400, "Approximate spacing between magma conduits") -setting("int", "remove_lava_above", 512, "Remove lava above this y level") setting("bool", "obsidian_lining", true, "Add an obsidian lining to magma conduits") setting("bool", "ameliorate_floods", true, "Ameliorate lava floods on the surface") -- Removing this setting on account of issue https://github.com/minetest/minetest/issues/7364 -- Fixed with commit https://github.com/minetest/minetest/commit/5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968 -setting("int", "upper_limit", 31000, "Upper extent of magma conduits") +setting("int", "upper_limit", -256, "Upper extent of magma conduits") setting("int", "lower_limit", -31000, "Lower extent of magma conduits") setting("bool", "volcanoes", true, "Enable volcanoes") diff --git a/magma_veins.lua b/magma_veins.lua index e5f1fc0..7cdd342 100644 --- a/magma_veins.lua +++ b/magma_veins.lua @@ -47,9 +47,7 @@ minetest.register_ore({ local water_level = tonumber(minetest.get_mapgen_setting("water_level")) -local lava_y_cutoff = magma_conduits.config.remove_lava_above --- if the y cutoff is at or below water level, ameliorate_floods is pointless. -local ameliorate_floods = magma_conduits.config.ameliorate_floods and lava_y_cutoff > water_level +local ameliorate_floods = magma_conduits.config.ameliorate_floods local obsidian_lining = magma_conduits.config.obsidian_lining local c_air = minetest.get_content_id("air") @@ -68,7 +66,7 @@ end local remove_unsupported_lava remove_unsupported_lava = function(area, data, vi, x, y, z) --if below water level, abort. Caverns are on their own. - if y < water_level or y > lava_y_cutoff or not area:contains(x, y, z) then return end + if y < water_level or not area:contains(x, y, z) then return end if data[vi] == c_lava then if is_adjacent_to_air(area, data, x, y, z) then @@ -109,15 +107,11 @@ minetest.register_on_generated(function(minp, maxp, seed) vm:get_data(data) for vi, x, y, z in area:iterp_xyz(minp, maxp) do - if y > lava_y_cutoff and data[vi] == c_lava then - data[vi] = c_air - else - if obsidian_lining then - obsidianize(area, data, vi, x, y, z, minp, maxp) - end - if ameliorate_floods then - remove_unsupported_lava(area, data, vi, x, y, z) - end + if obsidian_lining then + obsidianize(area, data, vi, x, y, z, minp, maxp) + end + if ameliorate_floods then + remove_unsupported_lava(area, data, vi, x, y, z) end end diff --git a/settingtypes.txt b/settingtypes.txt index 3fef14e..2a1d379 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -7,15 +7,13 @@ magma_conduits_remove_default_lava (Remove default mapgen lava) bool true magma_conduits_magma_veins (Enable magma veins) bool true magma_conduits_spread (Approximate spacing between magma conduits) int 400 magma_conduits_obsidian_lining (Add an obsidian lining to magma conduits) bool true -#This is useful for preventing magma conduits from being placed in floatlands -magma_conduits_remove_lava_above (Remove any lava above this y level) int 512 #Removes magma near the surface that could spill out of an open magma vein onto #surrounding terrain magma_conduits_ameliorate_floods (Ameliorate lava floods on the surface) bool true # Note: Setting limits near "0" in versions of Minetest before June 2018 # commit 5c1edc5 may cause a crash due to a bug in vein ore generation -magma_conduits_upper_limit (Upper extent of magma conduits) int 31000 +magma_conduits_upper_limit (Upper extent of magma conduits) int -256 magma_conduits_lower_limit (Lower extent of magma conduits) int -31000 [Volcanoes]