2017-04-09 04:16:07 +02:00
|
|
|
local CONFIG_FILE_PREFIX = "magma_conduits_"
|
|
|
|
|
|
|
|
magma_conduits.config = {}
|
|
|
|
|
|
|
|
local print_settingtypes = false
|
|
|
|
|
|
|
|
local function setting(stype, name, default, description)
|
|
|
|
local value
|
|
|
|
if stype == "bool" then
|
2020-01-31 02:06:24 +01:00
|
|
|
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
|
2017-04-09 04:16:07 +02:00
|
|
|
elseif stype == "string" then
|
2020-01-31 02:06:24 +01:00
|
|
|
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
|
2017-04-09 04:16:07 +02:00
|
|
|
elseif stype == "int" or stype == "float" then
|
2020-01-31 02:06:24 +01:00
|
|
|
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
|
2017-04-09 04:16:07 +02:00
|
|
|
end
|
|
|
|
if value == nil then
|
|
|
|
value = default
|
|
|
|
end
|
|
|
|
magma_conduits.config[name] = value
|
|
|
|
|
|
|
|
if print_settingtypes then
|
|
|
|
minetest.debug(CONFIG_FILE_PREFIX..name.." ("..description..") "..stype.." "..tostring(default))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
setting("bool", "remove_default_lava", true, "Removes default mapgen lava")
|
2018-05-18 09:39:19 +02:00
|
|
|
setting("bool", "glowing_rock", true, "Cause rock adjacent to lava to convert into glowing form")
|
Volcanoes (#2)
* Initial stab at volcano mapgen
* Make caldera conical, randomized size a bit
* remove grass from underwater soil
* add snow, fix some errors in mountain shape calculations
* improved soil and snow generation, more efficient mapgen
* add some configuration for volcanos, and a find volcanoes command for debugging
* enhance findvolcano, chunk sizes limited to multiples of mapblocks
* more volcano options, also add soil cooking
* update readme and screenshot
* cosmetic tweaks, slight change to default slope range
* fixed the mapgen v7 glitch via a horrible hack :(
* fix the need-to-make-changes test
* use biome-defined material to decorate slopes
* apparently set_lighting and calc_lighting are only supposed to be called on mapgen voxelmanipulators
* add magma chambers at the base of the volcano pipe
* fixes to large-scale grid calculations
* remove a line I added for debugging purposes
* bringing back configurable limits now that the bug's been fixed for six months
* generalizing the heating/cooling ABM
* actually turn the cooling material into the targeted material.
* Revert "actually turn the cooling material into the targeted material."
This reverts commit 508e10acc7c3871cc56fb8347e7931e5595b5f54.
* Fix cooling target node type for real
* very strange, abms don't seem to be updating node groups somehow.
* Workaround for Minetest issue #7864
* using minetest.after proved unreliable, trying different approach
* remove the lava cutoff setting, no longer needed now that veins are fixed
* improve findvolcano command
* using the same solution for v7 mapgen bug as for the lava crash
This is still not 100% reliable, but it's still better than the post-gen patching.
* fix randomization of lava depth
* remove debugging
* extinct volcano lava depth wasn't working right either
2018-12-26 10:06:38 +01:00
|
|
|
setting("bool", "cook_soil", true, "Cause soil and carbon-containing ores to be cooked into other forms by lava")
|
|
|
|
|
|
|
|
setting("bool", "magma_veins", true, "Enable magma veins")
|
|
|
|
setting("int", "spread", 400, "Approximate spacing between magma conduits")
|
|
|
|
setting("bool", "obsidian_lining", true, "Add an obsidian lining to magma conduits")
|
|
|
|
setting("bool", "ameliorate_floods", true, "Ameliorate lava floods on the surface")
|
|
|
|
|
2018-05-22 08:27:28 +02:00
|
|
|
-- Removing this setting on account of issue https://github.com/minetest/minetest/issues/7364
|
Volcanoes (#2)
* Initial stab at volcano mapgen
* Make caldera conical, randomized size a bit
* remove grass from underwater soil
* add snow, fix some errors in mountain shape calculations
* improved soil and snow generation, more efficient mapgen
* add some configuration for volcanos, and a find volcanoes command for debugging
* enhance findvolcano, chunk sizes limited to multiples of mapblocks
* more volcano options, also add soil cooking
* update readme and screenshot
* cosmetic tweaks, slight change to default slope range
* fixed the mapgen v7 glitch via a horrible hack :(
* fix the need-to-make-changes test
* use biome-defined material to decorate slopes
* apparently set_lighting and calc_lighting are only supposed to be called on mapgen voxelmanipulators
* add magma chambers at the base of the volcano pipe
* fixes to large-scale grid calculations
* remove a line I added for debugging purposes
* bringing back configurable limits now that the bug's been fixed for six months
* generalizing the heating/cooling ABM
* actually turn the cooling material into the targeted material.
* Revert "actually turn the cooling material into the targeted material."
This reverts commit 508e10acc7c3871cc56fb8347e7931e5595b5f54.
* Fix cooling target node type for real
* very strange, abms don't seem to be updating node groups somehow.
* Workaround for Minetest issue #7864
* using minetest.after proved unreliable, trying different approach
* remove the lava cutoff setting, no longer needed now that veins are fixed
* improve findvolcano command
* using the same solution for v7 mapgen bug as for the lava crash
This is still not 100% reliable, but it's still better than the post-gen patching.
* fix randomization of lava depth
* remove debugging
* extinct volcano lava depth wasn't working right either
2018-12-26 10:06:38 +01:00
|
|
|
-- Fixed with commit https://github.com/minetest/minetest/commit/5c1edc58ab2abe8bc1f1bbcbb2f30a5899586968
|
|
|
|
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")
|
|
|
|
setting("int", "volcano_min_height", 20, "Minimum volcano peak")
|
|
|
|
setting("int", "volcano_max_height", 200, "Maximum volcano peak")
|
|
|
|
setting("float", "volcano_min_slope", 0.75, "Minimum volcano slope")
|
|
|
|
setting("float", "volcano_max_slope", 1.5, "Maximum volcano slope")
|
|
|
|
setting("int", "volcano_region_mapblocks", 16, "Map blocks per chunk")
|
|
|
|
|
|
|
|
setting("int", "volcano_min_depth", -3000, "Lowest point the magma pipe goes to")
|
|
|
|
setting("bool", "volcano_magma_chambers", true, "Enable magma chambers at the base of the magma pipe")
|
|
|
|
setting("float", "volcano_magma_chamber_radius_multiplier", 0.5, "Magma chamber radius multiplier")
|
|
|
|
|
|
|
|
setting("float", "volcano_probability_active", 0.3, "Probability that there's an active volcano in each region")
|
|
|
|
setting("float", "volcano_probability_dormant", 0.15, "Probability that there's a dormant volcano in each region")
|
|
|
|
setting("float", "volcano_probability_extinct", 0.15, "Probability that there's an extinct volcano in each region")
|
|
|
|
|