mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-13 03:30:27 +01:00
bring dripstone into dfcaverns from subterrane, add glow water to sunless sea
This commit is contained in:
parent
50e9c64a29
commit
f3d3536ea9
@ -19,7 +19,7 @@ local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- para
|
||||
local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss")
|
||||
local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus")
|
||||
|
||||
local c_wet_flowstone = minetest.get_content_id("subterrane:wet_flowstone")
|
||||
local c_wet_flowstone = minetest.get_content_id("dfcaverns:wet_flowstone")
|
||||
|
||||
local shallow_cave_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
if data[bi] ~= c_stone then
|
||||
@ -30,7 +30,7 @@ local shallow_cave_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.025 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.025 * 4)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -43,7 +43,7 @@ local shallow_cave_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.025 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.025 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -146,7 +146,7 @@ subterrane:register_cave_layer({
|
||||
columns = {
|
||||
maximum_radius = 25,
|
||||
minimum_radius = 2,
|
||||
node = c_wet_flowstone,
|
||||
node = c_stone,
|
||||
weight = 0.25,
|
||||
maximum_count = 100,
|
||||
minimum_count = 25,
|
||||
|
@ -8,8 +8,8 @@ local c_dirt = minetest.get_content_id("default:dirt")
|
||||
local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss")
|
||||
local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus")
|
||||
|
||||
local c_wet_flowstone = minetest.get_content_id("subterrane:wet_flowstone")
|
||||
local c_dry_flowstone = minetest.get_content_id("subterrane:dry_flowstone")
|
||||
local c_wet_flowstone = minetest.get_content_id("dfcaverns:wet_flowstone")
|
||||
local c_dry_flowstone = minetest.get_content_id("dfcaverns:dry_flowstone")
|
||||
|
||||
local subsea_level = (dfcaverns.config.ymax - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level1_min
|
||||
|
||||
@ -41,7 +41,7 @@ local level_1_tower_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.005 then
|
||||
dfcaverns.spawn_tower_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -67,7 +67,7 @@ local level_1_fungiwood_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.005 then
|
||||
dfcaverns.spawn_fungiwood_vm(vi, area, data)
|
||||
end
|
||||
@ -83,7 +83,7 @@ local level_1_moist_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.03 then
|
||||
dfcaverns.glow_worm_ceiling(area, data, ai, vi, bi)
|
||||
end
|
||||
@ -110,7 +110,7 @@ local level_1_wet_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.025 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.025 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -134,7 +134,7 @@ local level_1_dry_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.05 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.05 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -148,7 +148,7 @@ local level_1_dry_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -189,7 +189,7 @@ local level_1_cave_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 4)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -203,7 +203,7 @@ local level_1_cave_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -14,8 +14,8 @@ local c_dirt = minetest.get_content_id("default:dirt")
|
||||
local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss")
|
||||
local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus")
|
||||
|
||||
local c_wet_flowstone = minetest.get_content_id("subterrane:wet_flowstone")
|
||||
local c_dry_flowstone = minetest.get_content_id("subterrane:dry_flowstone")
|
||||
local c_wet_flowstone = minetest.get_content_id("dfcaverns:wet_flowstone")
|
||||
local c_dry_flowstone = minetest.get_content_id("dfcaverns:dry_flowstone")
|
||||
|
||||
|
||||
local c_sweet_pod = minetest.get_content_id("dfcaverns:sweet_pod_6") -- param2 = 0
|
||||
@ -49,7 +49,7 @@ local level_2_tower_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.005 then
|
||||
dfcaverns.spawn_tower_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -73,7 +73,7 @@ local level_2_fungiwood_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.005 then
|
||||
dfcaverns.spawn_fungiwood_vm(vi, area, data)
|
||||
end
|
||||
@ -97,7 +97,7 @@ local level_2_tunnel_tube_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.05 then
|
||||
dfcaverns.spawn_tunnel_tube_vm(vi, area, data, param2_data)
|
||||
end
|
||||
@ -123,7 +123,7 @@ local level_2_black_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.025 then
|
||||
dfcaverns.spawn_black_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -149,7 +149,7 @@ local level_2_spore_tree_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.05 then
|
||||
dfcaverns.spawn_spore_tree_vm(vi, area, data)
|
||||
end
|
||||
@ -175,7 +175,7 @@ local level_2_goblin_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.025 then
|
||||
dfcaverns.spawn_goblin_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -192,7 +192,7 @@ local level_2_moist_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.07 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.07 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.025 then
|
||||
dfcaverns.glow_worm_ceiling(area, data, ai, vi, bi)
|
||||
end
|
||||
@ -219,7 +219,7 @@ local level_2_wet_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.05 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.05 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -243,7 +243,7 @@ local level_2_dry_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.05 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.05 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -255,7 +255,7 @@ local level_2_dry_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -285,7 +285,7 @@ local level_2_cave_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 4)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -299,7 +299,7 @@ local level_2_cave_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -20,8 +20,8 @@ local c_ice = minetest.get_content_id("default:ice")
|
||||
local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss")
|
||||
local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus")
|
||||
|
||||
local c_wet_flowstone = minetest.get_content_id("subterrane:wet_flowstone")
|
||||
local c_dry_flowstone = minetest.get_content_id("subterrane:dry_flowstone")
|
||||
local c_wet_flowstone = minetest.get_content_id("dfcaverns:wet_flowstone")
|
||||
local c_dry_flowstone = minetest.get_content_id("dfcaverns:dry_flowstone")
|
||||
|
||||
local c_sweet_pod = minetest.get_content_id("dfcaverns:sweet_pod_6") -- param2 = 0
|
||||
local c_quarry_bush = minetest.get_content_id("dfcaverns:quarry_bush_5") -- param2 = 4
|
||||
@ -44,7 +44,7 @@ local level_3_moist_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.03 then
|
||||
dfcaverns.glow_worm_ceiling(area, data, ai, vi, bi)
|
||||
end
|
||||
@ -70,7 +70,7 @@ local level_3_dry_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.05 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.05 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -95,11 +95,10 @@ local level_3_wet_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.05 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.05 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local level_3_underwater_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
if data[bi] ~= c_stone then
|
||||
return
|
||||
@ -115,7 +114,7 @@ local level_3_dry_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -136,7 +135,7 @@ local level_3_blood_thorn_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.05 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.05 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids)
|
||||
elseif math.random() < 0.05 then
|
||||
dfcaverns.spawn_blood_thorn_vm(vi, area, data, param2_data)
|
||||
end
|
||||
@ -165,7 +164,7 @@ local level_3_nether_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
data[vi] = c_air
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.icicle_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.icicle_ids)
|
||||
elseif math.random() < 0.005 then
|
||||
dfcaverns.spawn_nether_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -190,7 +189,7 @@ local level_3_tunnel_tube_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.05 then
|
||||
dfcaverns.spawn_tunnel_tube_vm(vi, area, data, param2_data)
|
||||
end
|
||||
@ -216,7 +215,7 @@ local level_3_spore_tree_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.05 then
|
||||
dfcaverns.spawn_spore_tree_vm(vi, area, data)
|
||||
end
|
||||
@ -242,7 +241,7 @@ local level_3_black_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids)
|
||||
elseif math.random() < 0.025 then
|
||||
dfcaverns.spawn_black_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -266,7 +265,7 @@ local level_3_goblin_cap_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
elseif drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
elseif math.random() < 0.025 then
|
||||
dfcaverns.spawn_goblin_cap_vm(vi, area, data)
|
||||
end
|
||||
@ -296,7 +295,7 @@ local level_3_cave_floor = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.075 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.075 * 4)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -310,7 +309,7 @@ local level_3_cave_ceiling = function(area, data, ai, vi, bi, param2_data)
|
||||
if drip_rand < 0.1 then
|
||||
local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4
|
||||
local height = math.floor(drip_rand/0.1 * 5)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids)
|
||||
subterrane:stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@ -538,6 +537,8 @@ minetest.register_biome({
|
||||
_subterrane_floor_decor = level_3_dry_floor,
|
||||
_subterrane_fill_node = c_air,
|
||||
_subterrane_column_node = c_dry_flowstone,
|
||||
_subterrane_override_sea_level = dfcaverns.config.sunless_sea_level,
|
||||
_subterrane_override_under_sea_biome = "dfcaverns_sunless_sea",
|
||||
_subterrane_mitigate_lava = false,
|
||||
})
|
||||
|
||||
|
@ -10,6 +10,8 @@ local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fun
|
||||
local c_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 = 0
|
||||
local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0
|
||||
|
||||
local c_glow_water = minetest.get_content_id("dfcaverns:glow_water_source")
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.debug(dfcaverns.config.sunless_sea_min)
|
||||
@ -20,6 +22,9 @@ local sunless_sea_underwater_floor = function(area, data, ai, vi, bi, param2_dat
|
||||
return
|
||||
end
|
||||
data[bi] = c_dirt
|
||||
if math.random() < 0.001 then
|
||||
data[vi] = c_glow_water
|
||||
end
|
||||
end
|
||||
|
||||
local sunless_sea_biome_def = {
|
||||
|
@ -91,4 +91,4 @@ if minetest.get_modpath("tnt") then
|
||||
end
|
||||
end
|
||||
|
||||
dfcaverns.config.sunless_sea_level = dfcaverns.config.level3_min - (dfcaverns.config.level3_min - dfcaverns.config.sunless_sea_min) * 0.3
|
||||
dfcaverns.config.sunless_sea_level = dfcaverns.config.level3_min - (dfcaverns.config.level3_min - dfcaverns.config.sunless_sea_min) * 0.5
|
||||
|
84
flowstone_nodes.lua
Normal file
84
flowstone_nodes.lua
Normal file
@ -0,0 +1,84 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
|
||||
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
|
||||
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
|
||||
minetest.register_alias("subterrane:dry_stal_1", "dfcaverns:dry_stal_1")
|
||||
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
|
||||
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
|
||||
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
|
||||
minetest.register_alias("subterrane:wet_stal_1", "dfcaverns:wet_stal_1")
|
||||
minetest.register_alias("subterrane:wet_flowstone", "dfcaverns:wet_flowstone")
|
||||
minetest.register_alias("subterrane:dry_flowstone", "dfcaverns:dry_flowstone")
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", {
|
||||
description = S("Dry Dripstone"),
|
||||
tiles = {
|
||||
"default_stone.png^[brighten",
|
||||
},
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("dfcaverns:dry_flowstone", {
|
||||
description = S("Dry Flowstone"),
|
||||
tiles = {"default_stone.png^[brighten"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
is_ground_content = true,
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", {
|
||||
description = S("Dry Dripstone"),
|
||||
tiles = {
|
||||
"default_stone.png^[brighten^dfcaverns_dripstone_streaks.png",
|
||||
},
|
||||
groups = {cracky = 3, stone = 2, subterrane_wet_dripstone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
}, "dfcaverns:dry_stal")
|
||||
|
||||
|
||||
minetest.register_node("dfcaverns:wet_flowstone", {
|
||||
description = S("Wet Flowstone"),
|
||||
tiles = {"default_stone.png^[brighten^dfcaverns_dripstone_streaks.png"},
|
||||
groups = {cracky = 3, stone = 1, subterrane_wet_dripstone = 1},
|
||||
is_ground_content = true,
|
||||
drop = 'default:cobble',
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
-----------------------------------------------
|
||||
|
||||
subterrane.register_stalagmite_nodes("dfcaverns:icicle", {
|
||||
description = S("Icicle"),
|
||||
tiles = {
|
||||
"default_ice.png",
|
||||
},
|
||||
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
local c_dry_stal_1 = minetest.get_content_id("dfcaverns:dry_stal_1") -- thinnest
|
||||
local c_dry_stal_2 = minetest.get_content_id("dfcaverns:dry_stal_2")
|
||||
local c_dry_stal_3 = minetest.get_content_id("dfcaverns:dry_stal_3")
|
||||
local c_dry_stal_4 = minetest.get_content_id("dfcaverns:dry_stal_4") -- thickest
|
||||
dfcaverns.dry_stalagmite_ids = {c_dry_stal_1, c_dry_stal_2, c_dry_stal_3, c_dry_stal_4}
|
||||
local c_wet_stal_1 = minetest.get_content_id("dfcaverns:wet_stal_1") -- thinnest
|
||||
local c_wet_stal_2 = minetest.get_content_id("dfcaverns:wet_stal_2")
|
||||
local c_wet_stal_3 = minetest.get_content_id("dfcaverns:wet_stal_3")
|
||||
local c_wet_stal_4 = minetest.get_content_id("dfcaverns:wet_stal_4") -- thickest
|
||||
dfcaverns.wet_stalagmite_ids = {c_wet_stal_1, c_wet_stal_2, c_wet_stal_3, c_wet_stal_4}
|
||||
local c_icicle_1 = minetest.get_content_id("dfcaverns:icicle_1") -- thinnest
|
||||
local c_icicle_2 = minetest.get_content_id("dfcaverns:icicle_2")
|
||||
local c_icicle_3 = minetest.get_content_id("dfcaverns:icicle_3")
|
||||
local c_icicle_4 = minetest.get_content_id("dfcaverns:icicle_4") -- thickest
|
||||
dfcaverns.icicle_ids = {c_icicle_1, c_icicle_2, c_icicle_3, c_icicle_4}
|
166
glow_water.lua
Normal file
166
glow_water.lua
Normal file
@ -0,0 +1,166 @@
|
||||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
minetest.register_node("dfcaverns:glow_water_source", {
|
||||
description = S("Mese Water"),
|
||||
_doc_items_longdesc = dfcaverns.doc.glow_water_desc,
|
||||
_doc_items_usagehelp = dfcaverns.doc.glow_water_usage,
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "default_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "default_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
alpha = 204,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "dfcaverns:glow_water_flowing",
|
||||
liquid_alternative_source = "dfcaverns:glow_water_source",
|
||||
liquid_viscosity = 7,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
light_source = default.LIGHT_MAX,
|
||||
post_effect_color = {a = 204, r = 250, g = 250, b = 10},
|
||||
groups = {liquid = 3, flammable = 2},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("dfcaverns:glow_water_flowing", {
|
||||
description = S("Flowing Mese Water"),
|
||||
_doc_items_longdesc = dfcaverns.doc.glow_water_desc,
|
||||
_doc_items_usagehelp = dfcaverns.doc.glow_water_usage,
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "default_water_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_water_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
alpha = 204,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "dfcaverns:glow_water_flowing",
|
||||
liquid_alternative_source = "dfcaverns:glow_water_source",
|
||||
liquid_viscosity = 7,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
light_source = 8,
|
||||
post_effect_color = {a = 204, r = 250, g = 250, b = 10},
|
||||
groups = {liquid = 3, flammable = 2, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
local random_direction ={
|
||||
{x=0,y=0,z=1},
|
||||
{x=0,y=0,z=-1},
|
||||
{x=0,y=1,z=0},
|
||||
{x=0,y=-1,z=0},
|
||||
{x=1,y=0,z=0},
|
||||
{x=-1,y=0,z=0},
|
||||
}
|
||||
|
||||
local get_node = minetest.get_node
|
||||
local set_node = minetest.set_node
|
||||
|
||||
local spark_spawner = {
|
||||
amount = 5,
|
||||
time = 0.1,
|
||||
minvel = {x=1, y=1, z=1},
|
||||
maxvel = {x=-1, y=-1, z=-1},
|
||||
minacc = {x=0, y= 2, z=0},
|
||||
maxacc = {x=0, y= 2, z=0},
|
||||
minexptime = 0.5,
|
||||
maxexptime = 1,
|
||||
minsize = 1,
|
||||
maxsize = 1,
|
||||
collisiondetection = true,
|
||||
vertical = false,
|
||||
texture = "dfcaverns_spark.png",
|
||||
}
|
||||
|
||||
minetest.register_abm({
|
||||
label = "dfcaverns glow_water",
|
||||
nodenames = {"dfcaverns:glow_water_source"},
|
||||
neighbors = {"default:water_source"},
|
||||
interval = 2,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(pos,node) -- Do everything possible to optimize this method
|
||||
spark_spawner.minpos = vector.add(pos, -0.5)
|
||||
spark_spawner.maxpos = vector.add(pos, 0.5)
|
||||
minetest.add_particlespawner(spark_spawner)
|
||||
|
||||
local check_pos = vector.add(pos, random_direction[math.random(6)])
|
||||
local check_node = get_node(check_pos)
|
||||
local check_node_name = check_node.name
|
||||
if check_node_name == "default:water_source" then
|
||||
set_node(pos, check_node)
|
||||
set_node(check_pos, node)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
if minetest.get_modpath("bucket") then
|
||||
bucket.register_liquid(
|
||||
"dfcaverns:glow_water_source",
|
||||
"dfcaverns:glow_water_flowing",
|
||||
"dfcaverns:glow_water_bucket",
|
||||
"dfcaverns_bucket_dwarven_syrup.png",
|
||||
S("Glow Water Bucket")
|
||||
)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("dynamic_liquid") then
|
||||
dynamic_liquid.liquid_abm("dfcaverns:glow_water_source", "dfcaverns:glow_water_flowing", 5)
|
||||
end
|
2
init.lua
2
init.lua
@ -9,6 +9,8 @@ dofile(modpath.."/doc.lua")
|
||||
|
||||
dofile(modpath.."/ground_cover.lua")
|
||||
dofile(modpath.."/glow_worms.lua")
|
||||
dofile(modpath.."/flowstone_nodes.lua")
|
||||
dofile(modpath.."/glow_water.lua")
|
||||
|
||||
-- Plants
|
||||
dofile(modpath.."/plants.lua") -- general functions
|
||||
|
BIN
textures/dfcaverns_dripstone_streaks.png
Normal file
BIN
textures/dfcaverns_dripstone_streaks.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 465 B |
BIN
textures/dfcaverns_spark.png
Normal file
BIN
textures/dfcaverns_spark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 B |
Loading…
Reference in New Issue
Block a user