From d4f6f34f30fee40e7b42a4323a049c46cc2e8604 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 22 Nov 2020 16:26:12 -0700 Subject: [PATCH] had to change namegen's name to avoid a collision on ContentDB --- mod.conf | 2 +- volcanoes.lua | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mod.conf b/mod.conf index 5ab712d..f3ad41c 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = magma_conduits description = Removes default mapgen lava and adds widely-spaced volcanoes and lava "veins". depends = default -optional_depends = namegen, doc, named_waypoints \ No newline at end of file +optional_depends = name_generator, doc, named_waypoints \ No newline at end of file diff --git a/volcanoes.lua b/volcanoes.lua index 5d6085e..00aab14 100644 --- a/volcanoes.lua +++ b/volcanoes.lua @@ -121,9 +121,9 @@ local get_corner = function(pos) end -local namegen_path = minetest.get_modpath("namegen") -if namegen_path then - namegen.parse_lines(io.lines(modpath.."/volcano_names.cfg")) +local name_generator_path = minetest.get_modpath("name_generator") +if name_generator_path then + name_generator.parse_lines(io.lines(modpath.."/volcano_names.cfg")) end local get_volcano = function(pos) @@ -144,18 +144,18 @@ local get_volcano = function(pos) local depth_lava if state < state_extinct then depth_lava = - math.random(1, math.abs(depth_root)) -- extinct, put the lava somewhere deep. - if namegen_path then - name = namegen.generate("inactive_volcano") + if name_generator_path then + name = name_generator.generate("inactive_volcano") end elseif state < state_dormant then depth_lava = depth_peak - math.random(5, 50) -- dormant - if namegen_path then - name = namegen.generate("inactive_volcano") + if name_generator_path then + name = name_generator.generate("inactive_volcano") end else depth_lava = depth_peak - math.random(1, 25) -- active, put the lava near the top - if namegen_path then - name = namegen.generate("active_volcano") + if name_generator_path then + name = name_generator.generate("active_volcano") end color = 0xFF7F00 -- orange end