mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-18 16:30:27 +02:00
bunch of work on mineclone ores, moved main config into df_dependencies
This commit is contained in:
@ -1,57 +0,0 @@
|
||||
local CONFIG_FILE_PREFIX = "dfcaverns_"
|
||||
|
||||
df_caverns.config = {}
|
||||
|
||||
local print_settingtypes = false
|
||||
|
||||
local function setting(stype, name, default, description)
|
||||
local value
|
||||
if stype == "bool" then
|
||||
value = minetest.settings:get_bool(CONFIG_FILE_PREFIX..name, default)
|
||||
elseif stype == "string" then
|
||||
value = minetest.settings:get(CONFIG_FILE_PREFIX..name)
|
||||
elseif stype == "int" or stype == "float" then
|
||||
value = tonumber(minetest.settings:get(CONFIG_FILE_PREFIX..name))
|
||||
end
|
||||
if value == nil then
|
||||
value = default
|
||||
end
|
||||
df_caverns.config[name] = value
|
||||
|
||||
if print_settingtypes then
|
||||
minetest.debug(CONFIG_FILE_PREFIX..name.." ("..description..") "..stype.." "..tostring(default))
|
||||
end
|
||||
end
|
||||
|
||||
--Caverns
|
||||
|
||||
setting("float", "vertical_cavern_scale", 256, "Vertical cavern dimension scale")
|
||||
setting("float", "horizontal_cavern_scale", 256, "Horizontal cavern dimension scale")
|
||||
setting("float", "cavern_threshold", 0.5, "Cavern threshold")
|
||||
setting("float", "sunless_sea_threshold", 0.4, "Cavern threshold for sunless seas (higher number means sparser caverns)")
|
||||
setting("float", "tunnel_flooding_threshold", 0.25, "Threshold for flooding tunnels around flooded caverns")
|
||||
|
||||
setting("int", "ymax", -193, "Upper limit of level 1")
|
||||
setting("int", "level1_min", -832, "Upper limit of level 2")
|
||||
setting("int", "level2_min", -1472, "Upper limit of level 3")
|
||||
setting("int", "level3_min", -2112, "Upper limit of the sunless seas")
|
||||
setting("int", "sunless_sea_min", -2512, "Lower limit of the sunless seas")
|
||||
|
||||
setting("bool", "enable_oil_sea", true, "Enable oil sea")
|
||||
df_caverns.config.enable_oil_sea = df_caverns.config.enable_oil_sea and minetest.get_modpath("oil") ~= nil
|
||||
setting("int", "oil_sea_level", -2700, "Oil sea level")
|
||||
|
||||
setting("bool", "enable_lava_sea", true, "Enable magma sea")
|
||||
setting("int", "lava_sea_level", -2900, "Lava sea level")
|
||||
|
||||
setting("bool", "enable_underworld", true, "Enable underworld")
|
||||
df_caverns.config.enable_underworld = df_caverns.config.enable_underworld and minetest.get_modpath("df_underworld_items") ~= nil
|
||||
setting("int", "underworld_level", -3200, "Underworld level")
|
||||
setting("int", "underworld_glowing_pit_mapblocks", 8, "Average pit spacing measured in mapblocks")
|
||||
|
||||
setting("bool", "enable_primordial", true, "Enable primordial cavern")
|
||||
setting("int", "primordial_max", -3393, "Upper limit to primordial caverns")
|
||||
setting("int", "primordial_min", -4032, "Lower limit to primordial caverns")
|
||||
|
||||
setting("bool", "restrict_trees_to_biomes", false, "Restrict underground tree growth to their home biomes")
|
||||
setting("bool", "restrict_farmables_to_biomes", false, "Restrict underground farmable plant growth to their home biomes")
|
@ -1,11 +1,10 @@
|
||||
df_caverns = {}
|
||||
df_caverns.config = df_dependencies.config
|
||||
|
||||
--grab a shorthand for the filepath of the mod
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
--load companion lua files
|
||||
dofile(modpath.."/config.lua")
|
||||
|
||||
dofile(modpath.."/node_ids.lua")
|
||||
|
||||
dofile(modpath.."/shared.lua")
|
||||
|
@ -1,81 +0,0 @@
|
||||
[Cavern dimensions]
|
||||
|
||||
#Note that this doesn't guarantee caverns of this setting's size. This setting
|
||||
#affects the scale of features in the perlin noise that is used to build caverns.
|
||||
#Most caverns will be smaller than this (and a few might be larger)
|
||||
dfcaverns_vertical_cavern_scale (Vertical cavern dimension scale) float 256
|
||||
#Note that this doesn't guarantee caverns of this setting's size. This setting
|
||||
#affects the scale of features in the perlin noise that is used to build caverns.
|
||||
#Most caverns will be smaller than this (and a few might be larger)
|
||||
dfcaverns_horizontal_cavern_scale (Horizontal cavern dimension scale) float 256
|
||||
#Determines threshold for cave generation. Higher number means sparser, smaller caverns
|
||||
dfcaverns_cavern_threshold (Cavern threshold) float 0.5 0.0 1.0
|
||||
#Determines threshold for lower sea cave generation. Higher number means sparser, smaller caverns
|
||||
dfcaverns_sunless_sea_threshold (Cavern threshold for sunless sea) float 0.4 0.0 1.0
|
||||
#Determines how far out water extends into tunnels below the 'sea level' of from flooded
|
||||
#caverns. Lower numbers give more flooded tunnel. If this number equals the cavern
|
||||
#threshold tunnels will not be flooded at all, if it is 0 then half the tunnels will be flooded.
|
||||
dfcaverns_tunnel_flooding_threshold (Tunnel flooding threshold) float 0.25 0.0 1.0
|
||||
|
||||
[Cavern depth borders]
|
||||
|
||||
#maximum boundary for cavern depths are most efficient when they fit the formula (x*80-32-1)
|
||||
#where x is an integer. That way you don't get map blocks that straddle two cavern layers.
|
||||
dfcaverns_ymax (Upper limit of level 1) int -193
|
||||
#minimum boundaries for cavern depths are most efficient when they fit the formula (x*80-32)
|
||||
#where x is an integer. that way you don't get map blocks that straddle two cavern layers.
|
||||
dfcaverns_level1_min (Upper limit of level 2) int -832
|
||||
dfcaverns_level2_min (Upper limit of level 3) int -1472
|
||||
dfcaverns_level3_min (Upper limit of the sunless sea) int -2112
|
||||
dfcaverns_sunless_sea_min (Lower limit of the sunless sea) int -2512
|
||||
|
||||
[Lower Levels]
|
||||
|
||||
dfcaverns_enable_oil_sea (Generate oil sea) bool true
|
||||
dfcaverns_oil_sea_level (Oil sea level) int -2700
|
||||
|
||||
dfcaverns_enable_lava_sea (Generate magma sea) bool true
|
||||
dfcaverns_lava_sea_level (Lava sea level) int -2900
|
||||
|
||||
dfcaverns_enable_underworld (Generate underworld) bool true
|
||||
dfcaverns_underworld_level (Underworld level) int -3200
|
||||
#Set this to 0 to disable glowing pit generation entirely.
|
||||
dfcaverns_underworld_glowing_pit_mapblocks(Average pit spacing measured in mapblocks) int 8
|
||||
|
||||
[Underworld feature HUD]
|
||||
|
||||
dfcaverns_underworld_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.
|
||||
dfcaverns_underworld_hud_item_required (Specify the item or group required) string map:mapping_kit
|
||||
|
||||
dfcaverns_show_pits_in_hud (Show pit locations in HUD) bool true
|
||||
dfcaverns_pit_discovery_range (Pit discovery range) int 60
|
||||
dfcaverns_pit_visibility_range (Pit visibility range) int 500
|
||||
|
||||
dfcaverns_show_seals_in_hud (Seal locations in HUD) bool true
|
||||
dfcaverns_seal_discovery_range (Seal discovery range) int 10
|
||||
dfcaverns_seal_visibility_range (Seal visibility range) int 200
|
||||
|
||||
dfcaverns_show_ruins_in_hud (Ruin locations visible in HUD) bool true
|
||||
dfcaverns_ruin_discovery_range (Ruin discovery range) int 40
|
||||
dfcaverns_ruin_visibility_range (Ruin visibility range) int 250
|
||||
|
||||
[Primordial]
|
||||
|
||||
dfcaverns_enable_primordial (Generate primordial caverns) bool true
|
||||
dfcaverns_primordial_max (Upper limit of primordial caverns) int -3393
|
||||
dfcaverns_primordial_min (Lower limit of primordial caverns) int -4032
|
||||
|
||||
# This setting is pretty technical, it spreads out the
|
||||
# construction of giant mycelium networks on mapgen
|
||||
# over this many seconds. If you're experiencing lag spikes
|
||||
# during mapgen of Primordial cavern layer mushroom caverns
|
||||
# then increasing this number may help.
|
||||
dcaverns_giant_mycelium_timer_spread (Giant Mycelium mapgen timer spread) int 10
|
||||
|
||||
[Plant growth restrictions]
|
||||
|
||||
dfcaverns_restrict_trees_to_biomes (Restrict underground tree growth to their home biomes) bool false
|
||||
dfcaverns_restrict_farmables_to_biomes (Restrict underground farmable plant growth to their home biomes) bool false
|
Reference in New Issue
Block a user