This commit is contained in:
FaceDeer 2020-01-25 01:41:43 -07:00
parent 13b65f837f
commit 0d4a03521d
2 changed files with 10 additions and 5 deletions

@ -46,4 +46,4 @@ magma_conduits_volcano_probability_extinct (Probability of extinct volcano in re
magma_conduits_show_volcanoes_in_hud (Show volcanoes in HUD) bool true
magma_conduits_hud_requires_mapping_kit (Require mapping kit to show in HUD) bool true
magma_conduits_volcano_discovery_range (Volcano discovery range) int 60
magma_conduits_volcano_visibility_range (Volcano HUD visibility range) int 1200
magma_conduits_volcano_visibility_range (Volcano HUD visibility range) int 1000

@ -9,16 +9,21 @@ dofile(modpath .. "/volcano_lava.lua") -- https://github.com/minetest/minetest/i
local S, NS = dofile(modpath.."/intllib.lua")
--dofile(modpath .. "/hud.lua")
local requires_mapping_kit
if minetest.settings:get_bool("magma_conduits_hud_requires_mapping_kit", true)
and minetest.registered_items["map:mapping_kit"] then
requires_mapping_kit = "map:mapping_kit"
end
local named_waypoints_modpath = minetest.get_modpath("named_waypoints")
if named_waypoints_modpath then
named_waypoints.register_named_waypoints("volcanoes", {
default_name = S("a volcano"),
default_color = 0xFFFFFF,
visibility_requires_item = "map:mapping_kit",
visibility_volume_radius = 1200,
discovery_volume_radius = 60,
visibility_requires_item = requires_mapping_kit,
visibility_volume_radius = tonumber(minetest.settings:get("magma_conduits_volcano_visibility_range")) or 1000,
discovery_volume_radius = tonumber(minetest.settings:get("magma_conduits_volcano_discovery_range")) or 60,
on_discovery = named_waypoints.default_discovery_popup
})
end