2014-12-16 19:57:25 -10:00
|
|
|
-- caverealms v.0.8 by HeroOfTheWinds
|
2014-07-02 14:33:17 -10:00
|
|
|
-- original cave code modified from paramat's subterrain
|
|
|
|
-- For Minetest 0.4.8 stable
|
2014-06-13 21:29:45 -10:00
|
|
|
-- Depends default
|
|
|
|
-- License: code WTFPL
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--grab a shorthand for the filepath of the mod
|
2014-06-20 15:12:46 +10:00
|
|
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
|
2017-03-25 11:55:00 -06:00
|
|
|
caverealms = {}
|
|
|
|
|
2014-06-28 13:01:39 -10:00
|
|
|
--load companion lua files
|
|
|
|
dofile(modpath.."/config.lua") --configuration file; holds various constants
|
2017-03-25 11:55:00 -06:00
|
|
|
dofile(modpath.."/crafting.lua")
|
|
|
|
dofile(modpath.."/falling_ice.lua")
|
|
|
|
dofile(modpath.."/nodes.lua")
|
|
|
|
dofile(modpath.."/caverealms_biomes.lua")
|
|
|
|
|
|
|
|
local caverealms_def = {
|
|
|
|
minimum_depth = caverealms.config.ymax,
|
|
|
|
maximum_depth = caverealms.config.ymin,
|
|
|
|
cave_threshold = caverealms.config.tcave,
|
|
|
|
boundary_blend_range = 128,
|
|
|
|
perlin_cave = {
|
|
|
|
offset = 0,
|
|
|
|
scale = 1,
|
|
|
|
spread = {x=256, y=256, z=256},
|
|
|
|
seed = -400000000089,
|
|
|
|
octaves = 3,
|
|
|
|
persist = 0.67
|
|
|
|
},
|
|
|
|
perlin_wave = {
|
|
|
|
offset = 0,
|
|
|
|
scale = 1,
|
|
|
|
spread = {x=512, y=256, z=512}, -- squashed 2:1
|
|
|
|
seed = 59033,
|
|
|
|
octaves = 6,
|
|
|
|
persist = 0.63
|
|
|
|
},
|
2014-06-13 21:29:45 -10:00
|
|
|
}
|
|
|
|
|
2017-03-25 11:55:00 -06:00
|
|
|
subterrane:register_cave_layer(caverealms_def)
|
2014-07-02 14:33:17 -10:00
|
|
|
|
2017-03-25 11:55:00 -06:00
|
|
|
if caverealms.config.cavespawn then
|
|
|
|
subterrane:register_cave_spawn(caverealms_def, -960)
|
|
|
|
end
|