mirror of
https://github.com/minetest-mods/magma_conduits.git
synced 2024-12-20 20:45:40 +01:00
665dbe2636
* 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
55 lines
2.6 KiB
Lua
55 lines
2.6 KiB
Lua
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
|
|
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
|
|
elseif stype == "string" then
|
|
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
|
|
elseif stype == "int" or stype == "float" then
|
|
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
|
|
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")
|
|
setting("bool", "glowing_rock", true, "Cause rock adjacent to lava to convert into glowing form")
|
|
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")
|
|
|
|
-- 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", -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")
|
|
|