mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2024-12-26 02:40:36 +01:00
882395ef75
Split this mod into a set of sub-mods in a modpack, and in the process did a whole bunch of renovations. * updated Subterrane's API to allow for more patterned placement of things * added "warrens" * clean separation of flooded and non-flooded caverns * rearranged biomes to make cavern layers more distinct * added oil layer * added underworld layer
27 lines
865 B
Lua
27 lines
865 B
Lua
local CONFIG_FILE_PREFIX = "dfcaverns_"
|
|
|
|
df_underworld_items.config = {}
|
|
|
|
local print_settingtypes = false
|
|
|
|
local function setting(stype, name, default, description)
|
|
local value
|
|
if stype == "bool" then
|
|
value = minetest.setting_getbool(CONFIG_FILE_PREFIX..name)
|
|
elseif stype == "string" then
|
|
value = minetest.setting_get(CONFIG_FILE_PREFIX..name)
|
|
elseif stype == "int" or stype == "float" then
|
|
value = tonumber(minetest.setting_get(CONFIG_FILE_PREFIX..name))
|
|
end
|
|
if value == nil then
|
|
value = default
|
|
end
|
|
df_underworld_items.config[name] = value
|
|
|
|
if print_settingtypes then
|
|
minetest.debug(CONFIG_FILE_PREFIX..name.." ("..description..") "..stype.." "..tostring(default))
|
|
end
|
|
end
|
|
|
|
setting("bool", "invulnerable_slade", true, "Slade is invulnerable to players")
|
|
setting("bool", "destructive_pit_plasma", true, "Pit plasma destroys adjacent nodes") |