mirror of
https://github.com/minetest-mods/magma_conduits.git
synced 2025-01-06 12:37:33 +01:00
settings
This commit is contained in:
parent
13b65f837f
commit
0d4a03521d
@ -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_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_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_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")
|
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")
|
local named_waypoints_modpath = minetest.get_modpath("named_waypoints")
|
||||||
if named_waypoints_modpath then
|
if named_waypoints_modpath then
|
||||||
named_waypoints.register_named_waypoints("volcanoes", {
|
named_waypoints.register_named_waypoints("volcanoes", {
|
||||||
default_name = S("a volcano"),
|
default_name = S("a volcano"),
|
||||||
default_color = 0xFFFFFF,
|
default_color = 0xFFFFFF,
|
||||||
visibility_requires_item = "map:mapping_kit",
|
visibility_requires_item = requires_mapping_kit,
|
||||||
visibility_volume_radius = 1200,
|
visibility_volume_radius = tonumber(minetest.settings:get("magma_conduits_volcano_visibility_range")) or 1000,
|
||||||
discovery_volume_radius = 60,
|
discovery_volume_radius = tonumber(minetest.settings:get("magma_conduits_volcano_discovery_range")) or 60,
|
||||||
on_discovery = named_waypoints.default_discovery_popup
|
on_discovery = named_waypoints.default_discovery_popup
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user