mirror of
https://github.com/minetest-mods/magma_conduits.git
synced 2024-12-20 12:35:41 +01:00
make mapping kit requirements more flexible
This commit is contained in:
parent
66d191c7cd
commit
5e02e17c83
2
mod.conf
2
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, intllib, doc, map, named_waypoints
|
||||
optional_depends = namegen, intllib, doc, named_waypoints
|
@ -44,6 +44,10 @@ magma_conduits_volcano_probability_extinct (Probability of extinct volcano in re
|
||||
|
||||
[Volcano HUD waypoints]
|
||||
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_item (Require an item to view waypoints) bool true
|
||||
#Players can still discover the locations of volcanoes without this, but waypoints
|
||||
#will only be visible in their hud if they have this item in their inventory. You can also
|
||||
#specify "group:groupname" here. Leave it blank to default to map:mapping_kit.
|
||||
magma_conduits_hud_item_required (Specify the item or group required) string map:mapping_kit
|
||||
magma_conduits_volcano_discovery_range (Volcano discovery range) int 60
|
||||
magma_conduits_volcano_visibility_range (Volcano HUD visibility range) int 1000
|
@ -16,11 +16,15 @@ if named_waypoints_modpath then
|
||||
default_color = 0xFFFFFF,
|
||||
discovery_volume_radius = tonumber(minetest.settings:get("magma_conduits_volcano_discovery_range")) or 60,
|
||||
}
|
||||
if minetest.settings:get_bool("magma_conduits_hud_requires_mapping_kit", true)
|
||||
and minetest.registered_items["map:mapping_kit"] then
|
||||
volcano_waypoint_def.visibility_requires_item = "map:mapping_kit"
|
||||
|
||||
if minetest.settings:get_bool("magma_conduits_hud_requires_item", true) then
|
||||
local item_required = minetest.settings:get("magma_conduits_hud_item_required")
|
||||
if item_required == nil or item_required == "" then
|
||||
item_required = "map:mapping_kit"
|
||||
end
|
||||
volcano_waypoint_def.visibility_requires_item = item_required
|
||||
end
|
||||
|
||||
|
||||
if minetest.settings:get_bool("magma_conduits_show_volcanoes_in_hud", true) then
|
||||
volcano_waypoint_def.visibility_volume_radius = tonumber(minetest.settings:get("magma_conduits_volcano_visibility_range")) or 1000
|
||||
volcano_waypoint_def.on_discovery = named_waypoints.default_discovery_popup
|
||||
|
Loading…
Reference in New Issue
Block a user