From 50e9c64a293e77c6d02b9135926def5f9ee6f7df Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 22 Apr 2018 08:01:13 -0600 Subject: [PATCH 01/25] Creating the Sunless Sea level, adding giant columns --- biomes.lua | 50 ++++++++++++++++++++++++-- biomes/lava_sea.lua | 24 +++---------- biomes/level1.lua | 18 +++++----- biomes/level2.lua | 30 +++++++++------- biomes/level3.lua | 66 ++++++++++++++++++++++------------ biomes/sunless_sea.lua | 81 ++++++++++++++++++++++++++++++++++++++++++ config.lua | 14 +++++--- init.lua | 1 + settingtypes.txt | 12 ++++--- 9 files changed, 219 insertions(+), 77 deletions(-) create mode 100644 biomes/sunless_sea.lua diff --git a/biomes.lua b/biomes.lua index eae290f..c93a75b 100644 --- a/biomes.lua +++ b/biomes.lua @@ -5,6 +5,7 @@ local c_sand = minetest.get_content_id("default:sand") local c_dirt = minetest.get_content_id("default:dirt") local c_coal_ore = minetest.get_content_id("default:stone_with_coal") local c_gravel = minetest.get_content_id("default:gravel") +local c_obsidian = minetest.get_content_id("default:obsidian") 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 @@ -18,6 +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 shallow_cave_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then @@ -28,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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids) end end @@ -41,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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.dry_stalagmite_ids) end end @@ -91,6 +93,14 @@ subterrane:register_cave_layer({ cave_threshold = dfcaverns.config.cavern_threshold, perlin_cave = perlin_cave, perlin_wave = perlin_wave, + columns = { + maximum_radius = 10, + minimum_radius = 2, + node = c_wet_flowstone, + weight = 0.25, + maximum_count = 30, + minimum_count = 5, + }, }) subterrane:register_cave_layer({ @@ -99,6 +109,14 @@ subterrane:register_cave_layer({ cave_threshold = dfcaverns.config.cavern_threshold, perlin_cave = perlin_cave, perlin_wave = perlin_wave, + columns = { + maximum_radius = 15, + minimum_radius = 2, + node = c_wet_flowstone, + weight = 0.25, + maximum_count = 50, + minimum_count = 10, + }, }) local perlin_cave_lava = { @@ -121,12 +139,38 @@ local perlin_wave_lava = { subterrane:register_cave_layer({ minimum_depth = dfcaverns.config.level3_min, - maximum_depth = dfcaverns.config.lava_sea_min, + maximum_depth = dfcaverns.config.sunless_sea_min, cave_threshold = dfcaverns.config.lava_sea_threshold, perlin_cave = perlin_cave_lava, perlin_wave = perlin_wave_lava, + columns = { + maximum_radius = 25, + minimum_radius = 2, + node = c_wet_flowstone, + weight = 0.25, + maximum_count = 100, + minimum_count = 25, + }, }) +if dfcaverns.config.enable_lava_sea then + subterrane:register_cave_layer({ + minimum_depth = dfcaverns.config.lava_sea_max, + maximum_depth = dfcaverns.config.lava_sea_min, + cave_threshold = dfcaverns.config.lava_sea_threshold, + perlin_cave = perlin_cave_lava, + perlin_wave = perlin_wave_lava, + columns = { + maximum_radius = 30, + minimum_radius = 5, + node = c_obsidian, + weight = 0.5, + maximum_count = 100, + minimum_count = 25, + }, + }) +end + dfcaverns.can_support_vegetation = {[c_sand] = true, [c_dirt] = true, [c_coal_ore] = true, [c_gravel] = true} dfcaverns.place_shrub = function(data, vi, param2_data, shrub_list) diff --git a/biomes/lava_sea.lua b/biomes/lava_sea.lua index fd5a206..5b10fe3 100644 --- a/biomes/lava_sea.lua +++ b/biomes/lava_sea.lua @@ -6,41 +6,25 @@ local c_dirt = minetest.get_content_id("default:dirt") local c_sand = minetest.get_content_id("default:sand") local c_lava = minetest.get_content_id("default:lava_source") -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_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 lava_sea_biome_def = { name = "dfcaverns_lava_sea", y_min = dfcaverns.config.lava_sea_min, - y_max = dfcaverns.config.level3_min, + y_max = dfcaverns.config.lava_sea_max, heat_point = 50, humidity_point = 50, } -if not dfcaverns.config.bottom_sea_contains_lava then - lava_sea_biome_def._subterrane_mitigate_lava = true -end - minetest.register_biome(lava_sea_biome_def) -local c_sea -if dfcaverns.config.bottom_sea_contains_lava then - c_sea = c_lava -else - c_sea = c_water -end - -local airspace = 256 +local airspace = (dfcaverns.config.lava_sea_max - dfcaverns.config.lava_sea_min) / 3 local data = {} minetest.register_on_generated(function(minp, maxp, seed) --if out of range of cave definition limits, abort - if minp.y > dfcaverns.config.level3_min - airspace or maxp.y < dfcaverns.config.lava_sea_min then + if minp.y > dfcaverns.config.lava_sea_max - airspace or maxp.y < dfcaverns.config.lava_sea_min then return end @@ -62,7 +46,7 @@ minetest.register_on_generated(function(minp, maxp, seed) local vi = area:index(x_min, y, z) --current node index for x = x_min, x_max do -- for each node do if data[vi] == c_air or data[vi] == c_water then - data[vi] = c_sea + data[vi] = c_lava end vi = vi + 1 end diff --git a/biomes/level1.lua b/biomes/level1.lua index 2c7d0da..b1521cd 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -11,7 +11,7 @@ local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fun local c_wet_flowstone = minetest.get_content_id("subterrane:wet_flowstone") local c_dry_flowstone = minetest.get_content_id("subterrane:dry_flowstone") -local subsea_level = (dfcaverns.config.level1_min - dfcaverns.config.ymax) * 0.3 + dfcaverns.config.level1_min +local subsea_level = (dfcaverns.config.ymax - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level1_min 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 @@ -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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids) end end diff --git a/biomes/level2.lua b/biomes/level2.lua index 45628b1..8a19da4 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -27,7 +27,7 @@ local c_cave_wheat = minetest.get_content_id("dfcaverns:cave_wheat_8") -- param2 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 subsea_level = (dfcaverns.config.level2_min - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level2_min +local subsea_level = (dfcaverns.config.level1_min - dfcaverns.config.level2_min) * 0.3 + dfcaverns.config.level2_min local level_2_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) @@ -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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids) end end @@ -482,6 +482,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_2_dry_ceiling, _subterrane_floor_decor = level_2_black_cap_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_cave_floor_decor = level_2_cave_floor, _subterrane_cave_ceiling_decor = level_2_cave_ceiling, _subterrane_mitigate_lava = true, @@ -496,6 +497,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_2_dry_ceiling, _subterrane_floor_decor = level_2_black_cap_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_cave_floor_decor = level_2_cave_floor, _subterrane_cave_ceiling_decor = level_2_cave_ceiling, _subterrane_mitigate_lava = true, @@ -510,6 +512,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_2_dry_ceiling, _subterrane_floor_decor = level_2_dry_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_mitigate_lava = false, }) @@ -522,5 +525,6 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_2_dry_ceiling, _subterrane_floor_decor = level_2_dry_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_mitigate_lava = false, }) \ No newline at end of file diff --git a/biomes/level3.lua b/biomes/level3.lua index 0a3bc10..9d8fd96 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -32,7 +32,7 @@ local c_cave_wheat = minetest.get_content_id("dfcaverns:cave_wheat_8") -- param2 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 subsea_level = (dfcaverns.config.level3_min - dfcaverns.config.level2_min) * 0.3 + dfcaverns.config.level3_min +local subsea_level = (dfcaverns.config.level2_min - dfcaverns.config.level3_min) * 0.3 + dfcaverns.config.level3_min local level_3_moist_ceiling = function(area, data, ai, vi, bi, param2_data) if data[ai] ~= c_stone then @@ -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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids) end end @@ -95,7 +95,7 @@ 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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids) end end @@ -115,7 +115,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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.dry_stalagmite_ids) end end @@ -136,7 +136,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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids) elseif math.random() < 0.05 then dfcaverns.spawn_blood_thorn_vm(vi, area, data, param2_data) end @@ -165,7 +165,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, false) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.icicle_ids) elseif math.random() < 0.005 then dfcaverns.spawn_nether_cap_vm(vi, area, data) end @@ -190,7 +190,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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids) elseif math.random() < 0.05 then dfcaverns.spawn_tunnel_tube_vm(vi, area, data, param2_data) end @@ -216,7 +216,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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids) elseif math.random() < 0.05 then dfcaverns.spawn_spore_tree_vm(vi, area, data) end @@ -241,8 +241,8 @@ local level_3_black_cap_floor = function(area, data, ai, vi, bi, param2_data) subterrane:giant_stalagmite(bi, area, data, 6, 15, c_dry_flowstone, c_dry_flowstone, c_dry_flowstone) 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, true) + local height = math.floor(drip_rand/0.1 * 5) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.dry_stalagmite_ids) elseif math.random() < 0.025 then dfcaverns.spawn_black_cap_vm(vi, area, data) end @@ -266,7 +266,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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids) elseif math.random() < 0.025 then dfcaverns.spawn_goblin_cap_vm(vi, area, data) end @@ -296,7 +296,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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, height, subterrane.wet_stalagmite_ids) end end @@ -310,7 +310,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, true) + subterrane:stalagmite(vi, area, data, param2_data, param2, -height, subterrane.wet_stalagmite_ids) end end @@ -319,7 +319,7 @@ end minetest.register_biome({ name = "dfcaverns_level3_flooded_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 50, humidity_point = 90, @@ -344,15 +344,18 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_blood_thorn_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 10, humidity_point = 30, _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_blood_thorn_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, + _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", _subterrane_mitigate_lava = true, }) @@ -364,6 +367,7 @@ minetest.register_biome({ humidity_point = 30, _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_blood_thorn_floor, + _subterrane_column_node = c_dry_flowstone, _subterrane_fill_node = c_air, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, @@ -372,15 +376,18 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_nether_cap_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 90, humidity_point = 50, _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_nether_cap_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_ice, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, + _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", _subterrane_mitigate_lava = true, }) @@ -393,6 +400,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_nether_cap_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_ice, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_mitigate_lava = true, @@ -400,7 +408,7 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_goblin_cap_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 20, humidity_point = 60, @@ -409,6 +417,8 @@ minetest.register_biome({ _subterrane_fill_node = c_air, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, + _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", _subterrane_mitigate_lava = true, }) @@ -428,7 +438,7 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_spore_tree_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 60, humidity_point = 60, @@ -437,6 +447,8 @@ minetest.register_biome({ _subterrane_fill_node = c_air, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, + _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", _subterrane_mitigate_lava = true, }) @@ -456,7 +468,7 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_tunnel_tube_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 60, humidity_point = 40, @@ -465,6 +477,8 @@ minetest.register_biome({ _subterrane_fill_node = c_air, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, + _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", _subterrane_mitigate_lava = true, }) @@ -484,27 +498,31 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_black_cap_biome_lower", - y_min = dfcaverns.config.level2_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 50, humidity_point = 15, _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_black_cap_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, + _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", _subterrane_mitigate_lava = true, }) minetest.register_biome({ name = "dfcaverns_level3_black_cap_biome_upper", y_min = subsea_level, - y_max = dfcaverns.config.level3_min, + y_max = dfcaverns.config.level2_min, heat_point = 50, humidity_point = 15, _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_black_cap_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_mitigate_lava = true, @@ -512,13 +530,14 @@ minetest.register_biome({ minetest.register_biome({ name = "dfcaverns_level3_dry_biome_lower", - y_min = dfcaverns.config.level3_min, + y_min = dfcaverns.config.sunless_sea_level, y_max = subsea_level, heat_point = 50, humidity_point = 10, _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_dry_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_mitigate_lava = false, }) @@ -531,5 +550,6 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_3_dry_ceiling, _subterrane_floor_decor = level_3_dry_floor, _subterrane_fill_node = c_air, + _subterrane_column_node = c_dry_flowstone, _subterrane_mitigate_lava = false, }) \ No newline at end of file diff --git a/biomes/sunless_sea.lua b/biomes/sunless_sea.lua new file mode 100644 index 0000000..4eb940f --- /dev/null +++ b/biomes/sunless_sea.lua @@ -0,0 +1,81 @@ +local c_water = minetest.get_content_id("default:water_source") +local c_air = minetest.get_content_id("air") +local c_stone = minetest.get_content_id("default:stone") +local c_cobble = minetest.get_content_id("default:cobble") +local c_dirt = minetest.get_content_id("default:dirt") +local c_sand = minetest.get_content_id("default:sand") + +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_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 = 0 +local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0 + +------------------------------------------------------------------------------------------- + +minetest.debug(dfcaverns.config.sunless_sea_min) +minetest.debug(dfcaverns.config.sunless_sea_level) + +local sunless_sea_underwater_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + data[bi] = c_dirt +end + +local sunless_sea_biome_def = { + name = "dfcaverns_sunless_sea", + y_min = dfcaverns.config.sunless_sea_min, + y_max = dfcaverns.config.sunless_sea_level, + heat_point = 50, + humidity_point = 50, + _subterrane_fill_node = c_water, + _subterrane_cave_fill_node = c_water, + _subterrane_mitigate_lava = true, + _subterrane_floor_decor = sunless_sea_underwater_floor, +} + +minetest.register_biome(sunless_sea_biome_def) + +local data = {} + +minetest.register_on_generated(function(minp, maxp, seed) + --if out of range of cave definition limits, abort + if minp.y > dfcaverns.config.sunless_sea_level or maxp.y < dfcaverns.config.sunless_sea_min then + return + end + + --easy reference to commonly used values + local t_start = os.clock() + local x_max = maxp.x + local y_max = maxp.y + local z_max = maxp.z + local x_min = minp.x + local y_min = minp.y + local z_min = minp.z + + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") + local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} + vm:get_data(data) + + for z = z_min, z_max do -- for each xy plane progressing northwards + for y = y_min, y_max do -- for each x row progressing upwards + if y <= dfcaverns.config.sunless_sea_level then + local vi = area:index(x_min, y, z) --current node index + for x = x_min, x_max do -- for each node do + if data[vi] == c_air then + data[vi] = c_water + end + vi = vi + 1 + end + end + end + end + + --send data back to voxelmanip + vm:set_data(data) + --calc lighting + vm:set_lighting({day = 0, night = 0}) + vm:calc_lighting() + --write it to world + vm:write_to_map() +end) \ No newline at end of file diff --git a/config.lua b/config.lua index b06daba..bec29a0 100644 --- a/config.lua +++ b/config.lua @@ -69,15 +69,19 @@ setting("bool", "light_kills_fungus", true, "Light kills fungus") 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("int", "ymax", -300, "Upper limit of level 1") setting("int", "level1_min", -900, "Upper limit of level 2") setting("int", "level2_min", -1500, "Upper limit of level 3") -setting("int", "level3_min", -2100, "Upper limit of lava sea") -setting("int", "lava_sea_min", -2700, "Lower limit of the lava sea") +setting("int", "level3_min", -2100, "Upper limit of the sunless sea") +setting("int", "sunless_sea_min", -2500, "Lower limit of the sunless sea") -setting("float", "lava_sea_threshold", 0.2, "Cavern threshold for magma sea (higher number means sparser magma)") -setting("bool", "bottom_sea_contains_lava", true, "Lower sea contains lava") +setting("int", "lava_sea_max", -3000, "Upper limit of the lava sea") +setting("int", "lava_sea_min", -3500, "Lower limit of the lava sea") + +setting("float", "lava_sea_threshold", 0.2, "Cavern threshold for sunless and magma seas (higher number means sparser magma)") +setting("bool", "enable_lava_sea", true, "Enable magma sea level") if minetest.get_modpath("tnt") then dfcaverns.config.enable_tnt = minetest.settings:get_bool("enable_tnt") @@ -86,3 +90,5 @@ if minetest.get_modpath("tnt") then dfcaverns.config.enable_tnt = minetest.is_singleplayer() end end + +dfcaverns.config.sunless_sea_level = dfcaverns.config.level3_min - (dfcaverns.config.level3_min - dfcaverns.config.sunless_sea_min) * 0.3 diff --git a/init.lua b/init.lua index 03b637a..9c4a54d 100644 --- a/init.lua +++ b/init.lua @@ -35,4 +35,5 @@ dofile(modpath.."/biomes.lua") dofile(modpath.."/biomes/level1.lua") dofile(modpath.."/biomes/level2.lua") dofile(modpath.."/biomes/level3.lua") +dofile(modpath.."/biomes/sunless_sea.lua") dofile(modpath.."/biomes/lava_sea.lua") diff --git a/settingtypes.txt b/settingtypes.txt index 2b985d3..189a79c 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -39,11 +39,13 @@ dfcaverns_cavern_threshold (Cavern threshold) float 0.5 0.0 1.0 dfcaverns_ymax (Upper limit of level 1) int -300 dfcaverns_level1_min (Upper limit of level 2) int -900 dfcaverns_level2_min (Upper limit of level 3) int -1500 -dfcaverns_level3_min (Upper limit of lava sea) int -2100 -dfcaverns_lava_sea_min (Lower limit of lava sea) int -2700 +dfcaverns_level3_min (Upper limit of the sunless sea) int -2100 +dfcaverns_sunless_sea_min (Lower limit of the sunless sea) int -2500 +dfcaverns_lava_sea_max (Upper limit of the lava sea) int -3000 +dfcaverns_lava_sea_min (Lower limit of the lava sea) int -3500 -[Lower Sea] +[Lower Seas] #Determines threshold for lower sea cave generation. Higher number means sparser cavern dfcaverns_lava_sea_threshold (Cavern threshold for magma sea) float 0.2 0.0 1.0 -#When true, the lower sea contains magma. When false, it's water instead. -dfcaverns_bottom_sea_contains_lava (Lower sea is lava) bool true \ No newline at end of file +#When true, the lava sea level is generated +dfcaverns_enable_lava_sea (Lower sea is lava) bool true \ No newline at end of file From f3d3536ea98a72c19a04dd2a43390b937ead7399 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 22 Apr 2018 20:16:20 -0600 Subject: [PATCH 02/25] bring dripstone into dfcaverns from subterrane, add glow water to sunless sea --- biomes.lua | 8 +- biomes/level1.lua | 20 +-- biomes/level2.lua | 28 ++-- biomes/level3.lua | 31 +++-- biomes/sunless_sea.lua | 5 + config.lua | 2 +- flowstone_nodes.lua | 84 ++++++++++++ glow_water.lua | 166 +++++++++++++++++++++++ init.lua | 2 + textures/dfcaverns_dripstone_streaks.png | Bin 0 -> 465 bytes textures/dfcaverns_spark.png | Bin 0 -> 185 bytes 11 files changed, 302 insertions(+), 44 deletions(-) create mode 100644 flowstone_nodes.lua create mode 100644 glow_water.lua create mode 100644 textures/dfcaverns_dripstone_streaks.png create mode 100644 textures/dfcaverns_spark.png diff --git a/biomes.lua b/biomes.lua index c93a75b..dd82051 100644 --- a/biomes.lua +++ b/biomes.lua @@ -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, diff --git a/biomes/level1.lua b/biomes/level1.lua index b1521cd..1164593 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -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 diff --git a/biomes/level2.lua b/biomes/level2.lua index 8a19da4..cf2e3e4 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -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 diff --git a/biomes/level3.lua b/biomes/level3.lua index 9d8fd96..767e8e8 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -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, }) diff --git a/biomes/sunless_sea.lua b/biomes/sunless_sea.lua index 4eb940f..0e4d904 100644 --- a/biomes/sunless_sea.lua +++ b/biomes/sunless_sea.lua @@ -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 = { diff --git a/config.lua b/config.lua index bec29a0..ba1febe 100644 --- a/config.lua +++ b/config.lua @@ -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 diff --git a/flowstone_nodes.lua b/flowstone_nodes.lua new file mode 100644 index 0000000..94ca3e6 --- /dev/null +++ b/flowstone_nodes.lua @@ -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} diff --git a/glow_water.lua b/glow_water.lua new file mode 100644 index 0000000..cc8ba0b --- /dev/null +++ b/glow_water.lua @@ -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 \ No newline at end of file diff --git a/init.lua b/init.lua index 9c4a54d..0ae8b60 100644 --- a/init.lua +++ b/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 diff --git a/textures/dfcaverns_dripstone_streaks.png b/textures/dfcaverns_dripstone_streaks.png new file mode 100644 index 0000000000000000000000000000000000000000..1e3002a670784155ae177aaec75a78d3f54c1f04 GIT binary patch literal 465 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPtv#^MWfXz3Z-9RDP%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6_|fq~J~)5S5w;&kh!{eB^V0&E}d+wRu6C=j;b0*8n|EvNPU z=C*scj;I^ha7~@Nhb`;~pRa?EPl@R#^LG&z((2FBzGtUBn`3OebsZH=>PRIO=8A%PX^@VTbm;H!&WjHTs=RIX6XK7q8gXcYe8Ypz{-}bPzWD2} zCAt?XL*7-_UJ`rphe7>w&84c6cU|Y&cV>M(`TNym`)SLX*?SgU0!12wr>mdKI;Vst E0Bl3Pi2wiq literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_spark.png b/textures/dfcaverns_spark.png new file mode 100644 index 0000000000000000000000000000000000000000..a18643a66beeab4339246aab5aa023e734996aab GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^%plCc1|-8Yw(bW~Y)RhkEUnfx)>bHL)Z$ zMWH;iBtya7(>EYRFO?mn(9^{+gyXvJ$&H*03>*hG)V=*#D0GL3)9?c0Vta1yeA$DR ScaGl!nc(T_=d#Wzp$P!KpDtej literal 0 HcmV?d00001 From 9669ec9dbf96952794705fd722eeb0dfeb394895 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sat, 5 May 2018 17:45:48 -0600 Subject: [PATCH 03/25] mesewater bucket --- glow_water.lua | 2 +- textures/dfcaverns_bucket_glow_water.png | Bin 0 -> 613 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 textures/dfcaverns_bucket_glow_water.png diff --git a/glow_water.lua b/glow_water.lua index cc8ba0b..78b7afe 100644 --- a/glow_water.lua +++ b/glow_water.lua @@ -156,7 +156,7 @@ if minetest.get_modpath("bucket") then "dfcaverns:glow_water_source", "dfcaverns:glow_water_flowing", "dfcaverns:glow_water_bucket", - "dfcaverns_bucket_dwarven_syrup.png", + "dfcaverns_bucket_glow_water.png", S("Glow Water Bucket") ) end diff --git a/textures/dfcaverns_bucket_glow_water.png b/textures/dfcaverns_bucket_glow_water.png new file mode 100644 index 0000000000000000000000000000000000000000..64a1fec9bf2fa22fa55fdc41c96a21feadb7ce2d GIT binary patch literal 613 zcmV-r0-F7aP)kb+@6r5uc`x@kB(0{&An4idx%YhEcfNBj{A0+`gsM8Q zYS`IH^j)-!<f3$+Mj7O7UN2fFCQEt(CVz1lt--?u20-czYm4(ptw z0;<(2>2&%KKkf+4P-sUwZ0`mE4nP3HFa!iu8CpDam0j1>LZLtyhWNe@KoA6Yo=2%v z>XSd*#2&Nn`vgG%faiIC|CtU{49g#7|1a?ioI~B|bs%Y900000NkvXXu0mjf(_Rbm literal 0 HcmV?d00001 From 3c97194831a6646f959c952fe976a93fe6586496 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Tue, 15 May 2018 22:08:35 -0600 Subject: [PATCH 04/25] slightly less flooding --- biomes/level1.lua | 8 ++++---- biomes/level2.lua | 4 +++- biomes/level3.lua | 4 +++- biomes/sunless_sea.lua | 3 --- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/biomes/level1.lua b/biomes/level1.lua index 1164593..55ee2e7 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -216,10 +216,10 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 100, - _subterrane_fill_node = c_water, + _subterrane_fill_node = c_air, _subterrane_cave_fill_node = c_water, _subterrane_floor_decor = level_1_underwater_floor, - _subterrane_mitigate_lava = false, -- no need to mitigate lava in a flooded cave, problem is self-solving + _subterrane_mitigate_lava = true, }) minetest.register_biome({ @@ -300,7 +300,7 @@ minetest.register_biome({ _subterrane_fill_node = c_air, _subterrane_cave_fill_node = c_water, _subterrane_floor_decor = level_1_underwater_floor, - _subterrane_mitigate_lava = false, -- no need to mitigate lava in a flooded cave, problem is self-solving + _subterrane_mitigate_lava = true, }) @@ -327,7 +327,7 @@ minetest.register_biome({ _subterrane_fill_node = c_air, _subterrane_cave_fill_node = c_water, _subterrane_floor_decor = level_1_underwater_floor, - _subterrane_mitigate_lava = false, -- no need to mitigate lava in a flooded cave, problem is self-solving + _subterrane_mitigate_lava = true, }) minetest.register_biome({ diff --git a/biomes/level2.lua b/biomes/level2.lua index cf2e3e4..19f350d 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -264,6 +264,8 @@ local level_2_underwater_floor = function(area, data, ai, vi, bi, param2_data) return end data[bi] = c_dirt + if data[vi] == c_air then data[vi] = c_water end + if data[ai] == c_air then data[ai] = c_water end end local level_2_cave_floor = function(area, data, ai, vi, bi, param2_data) @@ -312,7 +314,7 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 90, - _subterrane_fill_node = c_water, + _subterrane_fill_node = c_air, _subterrane_cave_fill_node = c_water, _subterrane_floor_decor = level_2_underwater_floor, _subterrane_mitigate_lava = false, diff --git a/biomes/level3.lua b/biomes/level3.lua index 767e8e8..6af087e 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -104,6 +104,8 @@ local level_3_underwater_floor = function(area, data, ai, vi, bi, param2_data) return end data[bi] = c_dirt + if data[vi] == c_air then data[vi] = c_water end + if data[ai] == c_air then data[ai] = c_water end end local level_3_dry_ceiling = function(area, data, ai, vi, bi, param2_data) @@ -322,7 +324,7 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 90, - _subterrane_fill_node = c_water, + _subterrane_fill_node = c_air, _subterrane_cave_fill_node = c_water, _subterrane_floor_decor = level_3_underwater_floor, }) diff --git a/biomes/sunless_sea.lua b/biomes/sunless_sea.lua index 0e4d904..c92e03e 100644 --- a/biomes/sunless_sea.lua +++ b/biomes/sunless_sea.lua @@ -14,9 +14,6 @@ local c_glow_water = minetest.get_content_id("dfcaverns:glow_water_source") ------------------------------------------------------------------------------------------- -minetest.debug(dfcaverns.config.sunless_sea_min) -minetest.debug(dfcaverns.config.sunless_sea_level) - local sunless_sea_underwater_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return From 1818ba023081d3093e2a9b1925e184d638f1d944 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Fri, 18 May 2018 01:43:56 -0600 Subject: [PATCH 05/25] add giant mese stalactites to lava sea --- biomes/lava_sea.lua | 10 +++ .../flowstone_nodes.lua | 0 features/glow_crystals.lua | 24 +++++++ glow_water.lua => features/glow_water.lua | 0 glow_worms.lua => features/glow_worms.lua | 0 ground_cover.lua => features/ground_cover.lua | 0 init.lua | 9 +-- locale/it.po | 67 +++++++++++++----- locale/template.pot | 67 +++++++++++++----- textures/dfcaverns_glow_mese.png | Bin 0 -> 330 bytes textures/license.txt | 3 + 11 files changed, 142 insertions(+), 38 deletions(-) rename flowstone_nodes.lua => features/flowstone_nodes.lua (100%) create mode 100644 features/glow_crystals.lua rename glow_water.lua => features/glow_water.lua (100%) rename glow_worms.lua => features/glow_worms.lua (100%) rename ground_cover.lua => features/ground_cover.lua (100%) create mode 100644 textures/dfcaverns_glow_mese.png diff --git a/biomes/lava_sea.lua b/biomes/lava_sea.lua index 5b10fe3..0565b7e 100644 --- a/biomes/lava_sea.lua +++ b/biomes/lava_sea.lua @@ -5,15 +5,25 @@ local c_cobble = minetest.get_content_id("default:cobble") local c_dirt = minetest.get_content_id("default:dirt") local c_sand = minetest.get_content_id("default:sand") local c_lava = minetest.get_content_id("default:lava_source") +local c_meseore = minetest.get_content_id("default:stone_with_mese") +local c_mesecry = minetest.get_content_id("dfcaverns:glow_mese") ------------------------------------------------------------------------------------------- +local lava_ceiling = function(area, data, ai, vi, bi) + if math.random() < 0.005 then + subterrane:giant_stalactite(ai, area, data, 6, 13, c_meseore, c_meseore, c_mesecry) + end +end + + local lava_sea_biome_def = { name = "dfcaverns_lava_sea", y_min = dfcaverns.config.lava_sea_min, y_max = dfcaverns.config.lava_sea_max, heat_point = 50, humidity_point = 50, + _subterrane_ceiling_decor = lava_ceiling, } minetest.register_biome(lava_sea_biome_def) diff --git a/flowstone_nodes.lua b/features/flowstone_nodes.lua similarity index 100% rename from flowstone_nodes.lua rename to features/flowstone_nodes.lua diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua new file mode 100644 index 0000000..8e2e0eb --- /dev/null +++ b/features/glow_crystals.lua @@ -0,0 +1,24 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +--glowing mese crystal blocks +minetest.register_node("dfcaverns:glow_mese", { + description = S("Flawless Mese Block"), + tiles = {"dfcaverns_glow_mese.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_glass_defaults(), + light_source = 13, + paramtype = "light", + use_texture_alpha = true, + drawtype = "glasslike", + sunlight_propagates = true, +}) + +minetest.register_craft({ + output = 'default:mese_crystal 12', + recipe = { + {'dfcaverns:glow_mese'}, + } +}) \ No newline at end of file diff --git a/glow_water.lua b/features/glow_water.lua similarity index 100% rename from glow_water.lua rename to features/glow_water.lua diff --git a/glow_worms.lua b/features/glow_worms.lua similarity index 100% rename from glow_worms.lua rename to features/glow_worms.lua diff --git a/ground_cover.lua b/features/ground_cover.lua similarity index 100% rename from ground_cover.lua rename to features/ground_cover.lua diff --git a/init.lua b/init.lua index 0ae8b60..436f293 100644 --- a/init.lua +++ b/init.lua @@ -7,10 +7,11 @@ local modpath = minetest.get_modpath(minetest.get_current_modname()) dofile(modpath.."/config.lua") dofile(modpath.."/doc.lua") -dofile(modpath.."/ground_cover.lua") -dofile(modpath.."/glow_worms.lua") -dofile(modpath.."/flowstone_nodes.lua") -dofile(modpath.."/glow_water.lua") +dofile(modpath.."/features/ground_cover.lua") +dofile(modpath.."/features/glow_worms.lua") +dofile(modpath.."/features/flowstone_nodes.lua") +dofile(modpath.."/features/glow_water.lua") +dofile(modpath.."/features/glow_crystals.lua") -- Plants dofile(modpath.."/plants.lua") -- general functions diff --git a/locale/it.po b/locale/it.po index a10dcb2..9c818ab 100644 --- a/locale/it.po +++ b/locale/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dfcaverns module's Italian locale\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-19 19:58-0600\n" +"POT-Creation-Date: 2018-05-18 01:34-0600\n" "PO-Revision-Date: 2017-08-17 23:01+0100\n" "Last-Translator: H4mlet \n" "Language-Team: ITALIANO\n" @@ -366,18 +366,6 @@ msgid "" "material." msgstr "" -#: glow_worms.lua:6 -msgid "Glow Worms" -msgstr "Vermi luminosi" - -#: ground_cover.lua:11 -msgid "Dirt With Cave Moss" -msgstr "Terra con muschio di caverna" - -#: ground_cover.lua:52 -msgid "Cobblestone With Floor Fungus" -msgstr "Ciottoli con funghi del terreno" - #: plants.lua:10 msgid "Dead Fungus" msgstr "Fungo morto" @@ -386,6 +374,51 @@ msgstr "Fungo morto" msgid "Cavern Fungi" msgstr "Funghi di caverna" +#: features\flowstone_nodes.lua:19 +#: features\flowstone_nodes.lua:39 +msgid "Dry Dripstone" +msgstr "" + +#: features\flowstone_nodes.lua:28 +msgid "Dry Flowstone" +msgstr "" + +#: features\flowstone_nodes.lua:49 +msgid "Wet Flowstone" +msgstr "" + +#: features\flowstone_nodes.lua:60 +msgid "Icicle" +msgstr "" + +#: features\glow_crystals.lua:7 +msgid "Flawless Mese Block" +msgstr "" + +#: features\glow_water.lua:6 +msgid "Mese Water" +msgstr "" + +#: features\glow_water.lua:55 +msgid "Flowing Mese Water" +msgstr "" + +#: features\glow_water.lua:160 +msgid "Glow Water Bucket" +msgstr "" + +#: features\glow_worms.lua:6 +msgid "Glow Worms" +msgstr "Vermi luminosi" + +#: features\ground_cover.lua:11 +msgid "Dirt With Cave Moss" +msgstr "Terra con muschio di caverna" + +#: features\ground_cover.lua:52 +msgid "Cobblestone With Floor Fungus" +msgstr "Ciottoli con funghi del terreno" + #: plants\cave_wheat.lua:10 #: plants\cave_wheat.lua:69 msgid "Cave Wheat" @@ -661,12 +694,12 @@ msgstr "Tubo di galleria" msgid "Tunnel Tube Plies" msgstr "Strati di tubo di galleria" -#: trees\tunnel_tube.lua:79 -#: trees\tunnel_tube.lua:135 -#: trees\tunnel_tube.lua:157 +#: trees\tunnel_tube.lua:82 +#: trees\tunnel_tube.lua:138 +#: trees\tunnel_tube.lua:158 msgid "Tunnel Tube Fruiting Body" msgstr "Corpo fruttifero del tubo di galleria" -#: trees\tunnel_tube.lua:187 +#: trees\tunnel_tube.lua:189 msgid "Tunnel Tube Spawn" msgstr "Prole di tubo di galleria" diff --git a/locale/template.pot b/locale/template.pot index a85a65d..97d5dfb 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-19 19:58-0600\n" +"POT-Creation-Date: 2018-05-18 01:34-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -365,18 +365,6 @@ msgid "" "material." msgstr "" -#: glow_worms.lua:6 -msgid "Glow Worms" -msgstr "" - -#: ground_cover.lua:11 -msgid "Dirt With Cave Moss" -msgstr "" - -#: ground_cover.lua:52 -msgid "Cobblestone With Floor Fungus" -msgstr "" - #: plants.lua:10 msgid "Dead Fungus" msgstr "" @@ -385,6 +373,51 @@ msgstr "" msgid "Cavern Fungi" msgstr "" +#: features\flowstone_nodes.lua:19 +#: features\flowstone_nodes.lua:39 +msgid "Dry Dripstone" +msgstr "" + +#: features\flowstone_nodes.lua:28 +msgid "Dry Flowstone" +msgstr "" + +#: features\flowstone_nodes.lua:49 +msgid "Wet Flowstone" +msgstr "" + +#: features\flowstone_nodes.lua:60 +msgid "Icicle" +msgstr "" + +#: features\glow_crystals.lua:7 +msgid "Flawless Mese Block" +msgstr "" + +#: features\glow_water.lua:6 +msgid "Mese Water" +msgstr "" + +#: features\glow_water.lua:55 +msgid "Flowing Mese Water" +msgstr "" + +#: features\glow_water.lua:160 +msgid "Glow Water Bucket" +msgstr "" + +#: features\glow_worms.lua:6 +msgid "Glow Worms" +msgstr "" + +#: features\ground_cover.lua:11 +msgid "Dirt With Cave Moss" +msgstr "" + +#: features\ground_cover.lua:52 +msgid "Cobblestone With Floor Fungus" +msgstr "" + #: plants\cave_wheat.lua:10 #: plants\cave_wheat.lua:69 msgid "Cave Wheat" @@ -660,12 +693,12 @@ msgstr "" msgid "Tunnel Tube Plies" msgstr "" -#: trees\tunnel_tube.lua:79 -#: trees\tunnel_tube.lua:135 -#: trees\tunnel_tube.lua:157 +#: trees\tunnel_tube.lua:82 +#: trees\tunnel_tube.lua:138 +#: trees\tunnel_tube.lua:158 msgid "Tunnel Tube Fruiting Body" msgstr "" -#: trees\tunnel_tube.lua:187 +#: trees\tunnel_tube.lua:189 msgid "Tunnel Tube Spawn" msgstr "" diff --git a/textures/dfcaverns_glow_mese.png b/textures/dfcaverns_glow_mese.png new file mode 100644 index 0000000000000000000000000000000000000000..ed433fede4e16cc143a3b33996857ab0e8fdd93b GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Uw}`DYf2nrWieBC3)7N0%s@tU zDTqC>lWFlRrfqAOXHR0Eak7A<24>)2YQk zfZ^avx#ArPIYLu^{O^wvb>MpO`ggkcV}Xkyr?1y|1zc4Q)%bqrh%deG9j3+{O{rsl2dv>%$4c zhxoQs+ur!Rhi9#aWOjC_^9rY(&lhK0*x0sh<39)HT}o3v?l%6*o)pLysl=$Y3Ftls MPgg&ebxsLQ06DLYpa1{> literal 0 HcmV?d00001 diff --git a/textures/license.txt b/textures/license.txt index 85540e7..0779d0b 100644 --- a/textures/license.txt +++ b/textures/license.txt @@ -21,3 +21,6 @@ dfcaverns_bread - derived from farming dfcaverns_pig_tail_thread - copied from farming dfcaverns_sugar - derived from farming dfcaverns_spore_tree_spores, dfcaverns_cave_wheat_seed, dfcaverns_pig_tail_seed - all derived from farming wheat seed + + +dfcaverns_glow_mese - from caverealms glow_mese \ No newline at end of file From 9190a348f2d7f5bc3aa64547d9d1302132befe0a Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sat, 19 May 2018 15:47:41 -0600 Subject: [PATCH 06/25] add giant glowing crystals to lower dry caverns --- biomes/level2.lua | 19 +++- biomes/level3.lua | 52 ++++++++-- features/glow_crystals.lua | 143 ++++++++++++++++++++++++++- locale/it.po | 12 ++- locale/template.pot | 12 ++- models/hex_crystal.mtl | 22 +++++ models/hex_crystal.obj | 114 +++++++++++++++++++++ models/hex_crystal_30.mtl | 22 +++++ models/hex_crystal_30.obj | 114 +++++++++++++++++++++ models/hex_crystal_30_45.mtl | 22 +++++ models/hex_crystal_30_45.obj | 114 +++++++++++++++++++++ textures/dfcaverns_glow_ruby.png | Bin 0 -> 330 bytes textures/dfcaverns_glow_ruby4x.png | Bin 0 -> 980 bytes textures/dfcaverns_glow_ruby_ore.png | Bin 0 -> 329 bytes textures/license.txt | 4 +- 15 files changed, 639 insertions(+), 11 deletions(-) create mode 100644 models/hex_crystal.mtl create mode 100644 models/hex_crystal.obj create mode 100644 models/hex_crystal_30.mtl create mode 100644 models/hex_crystal_30.obj create mode 100644 models/hex_crystal_30_45.mtl create mode 100644 models/hex_crystal_30_45.obj create mode 100644 textures/dfcaverns_glow_ruby.png create mode 100644 textures/dfcaverns_glow_ruby4x.png create mode 100644 textures/dfcaverns_glow_ruby_ore.png diff --git a/biomes/level2.lua b/biomes/level2.lua index 19f350d..d7c4450 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -259,6 +259,23 @@ local level_2_dry_ceiling = function(area, data, ai, vi, bi, param2_data) end end +local level_2_crystal_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + + if math.random() < 0.0025 then + dfcaverns.place_big_crystal_cluster(area, data, param2_data, vi, math.random(0,1), true) + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + 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, dfcaverns.dry_stalagmite_ids) + end +end + local level_2_underwater_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return @@ -511,7 +528,7 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 15, - _subterrane_ceiling_decor = level_2_dry_ceiling, + _subterrane_ceiling_decor = level_2_crystal_ceiling, _subterrane_floor_decor = level_2_dry_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, diff --git a/biomes/level3.lua b/biomes/level3.lua index 6af087e..e1f2759 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -74,6 +74,29 @@ local level_3_dry_floor = function(area, data, ai, vi, bi, param2_data) end end +local level_3_crystal_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + + floor_item = math.random() + if floor_item < 0.005 then + dfcaverns.place_big_crystal_cluster(area, data, param2_data, vi, math.random(0,2), false) + elseif floor_item < 0.5 then + data[bi] = c_cobble + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + if drip_rand < 0.001 then + subterrane:giant_stalagmite(bi, area, data, 6, 20, c_dry_flowstone, c_dry_flowstone, c_dry_flowstone) + 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, dfcaverns.dry_stalagmite_ids) + end +end + + local level_3_wet_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return @@ -120,6 +143,23 @@ local level_3_dry_ceiling = function(area, data, ai, vi, bi, param2_data) end end +local level_3_crystal_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + + if math.random() < 0.005 then + dfcaverns.place_big_crystal_cluster(area, data, param2_data, vi, math.random(0,3), true) + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + 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, dfcaverns.dry_stalagmite_ids) + end +end + local level_3_blood_thorn_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return @@ -349,7 +389,7 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 10, humidity_point = 30, - _subterrane_ceiling_decor = level_3_dry_ceiling, + _subterrane_ceiling_decor = level_3_crystal_ceiling, _subterrane_floor_decor = level_3_blood_thorn_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, @@ -366,7 +406,7 @@ minetest.register_biome({ y_max = dfcaverns.config.level2_min, heat_point = 10, humidity_point = 30, - _subterrane_ceiling_decor = level_3_dry_ceiling, + _subterrane_ceiling_decor = level_3_crystal_ceiling, _subterrane_floor_decor = level_3_blood_thorn_floor, _subterrane_column_node = c_dry_flowstone, _subterrane_fill_node = c_air, @@ -535,8 +575,8 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 10, - _subterrane_ceiling_decor = level_3_dry_ceiling, - _subterrane_floor_decor = level_3_dry_floor, + _subterrane_ceiling_decor = level_3_crystal_ceiling, + _subterrane_floor_decor = level_3_crystal_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, @@ -550,8 +590,8 @@ minetest.register_biome({ y_max = dfcaverns.config.level2_min, heat_point = 50, humidity_point = 10, - _subterrane_ceiling_decor = level_3_dry_ceiling, - _subterrane_floor_decor = level_3_dry_floor, + _subterrane_ceiling_decor = level_3_crystal_ceiling, + _subterrane_floor_decor = level_3_crystal_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, _subterrane_mitigate_lava = false, diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua index 8e2e0eb..1defdda 100644 --- a/features/glow_crystals.lua +++ b/features/glow_crystals.lua @@ -21,4 +21,145 @@ minetest.register_craft({ recipe = { {'dfcaverns:glow_mese'}, } -}) \ No newline at end of file +}) + +minetest.register_node("dfcaverns:glow_ruby_ore", { + description = S("Crystal Vein"), + tiles = {"dfcaverns_glow_ruby_ore.png"}, + is_ground_content = true, + groups = {cracky=2}, + sounds = default.node_sound_glass_defaults(), +}) + + +minetest.register_node("dfcaverns:big_crystal", { + description = S("Giant Crystal"), + drawtype = "mesh", + mesh = "hex_crystal.obj", + tiles = { + "dfcaverns_glow_ruby4x.png", + "dfcaverns_glow_ruby.png", + }, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {cracky=2, dfcaverns_big_crystal = 1}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 3, 0.5}, + }, + collision_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 3, 0.5}, + }, +}) + + +minetest.register_node("dfcaverns:big_crystal_30", { + description = S("Giant Crystal"), + drawtype = "mesh", + mesh = "hex_crystal_30.obj", + tiles = { + "dfcaverns_glow_ruby4x.png", + "dfcaverns_glow_ruby.png", + }, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {cracky=2, dfcaverns_big_crystal = 1}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.625, 0.5, 0.5, 0.375}, + {-0.5, 0.5, -1.25, 0.5, 1.5, -0.25}, + {-0.5, 1.5, -1.875, 0.5, 2.5, -0.875}, + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.625, 0.5, 0.5, 0.375}, + {-0.5, 0.5, -1.25, 0.5, 1.5, -0.25}, + {-0.5, 1.5, -1.875, 0.5, 2.5, -0.875}, + } + }, +}) + +minetest.register_node("dfcaverns:big_crystal_30_45", { + description = S("Giant Crystal"), + drawtype = "mesh", + mesh = "hex_crystal_30_45.obj", + tiles = { + "dfcaverns_glow_ruby4x.png", + "dfcaverns_glow_ruby.png", + }, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {cracky=2, dfcaverns_big_crystal = 1}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = { + {-0.375, -0.5, -0.625, 0.625, 0.5, 0.375}, + {0.0625, 0.5, -1.0625, 1.0625, 1.5, -0.0625}, + {0.5, 1.5, -1.5, 1.5, 2.5, -0.5}, + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.375, -0.5, -0.625, 0.625, 0.5, 0.375}, + {0.0625, 0.5, -1.0625, 1.0625, 1.5, -0.0625}, + {0.5, 1.5, -1.5, 1.5, 2.5, -0.5}, + } + }, +}) + +local c_stone = minetest.get_content_id("default:stone") +local c_air = minetest.get_content_id("air") +local c_big_crystal = minetest.get_content_id("dfcaverns:big_crystal") +local c_big_crystal_30 = minetest.get_content_id("dfcaverns:big_crystal_30") +local c_big_crystal_30_45 = minetest.get_content_id("dfcaverns:big_crystal_30_45") +local c_glow_ore = minetest.get_content_id("dfcaverns:glow_ruby_ore") + +local place_big_crystal = function(data, data_param2, i, ceiling) + orientation = math.random() + if orientation < 0.33 then + data[i] = c_big_crystal + elseif orientation < 0.66 then + data[i] = c_big_crystal_30 + else + data[i] = c_big_crystal_30_45 + end + if ceiling then + data_param2[i] = math.random(20,23) + else + data_param2[i] = math.random(0,3) + end + +end + +dfcaverns.place_big_crystal_cluster = function(area, data, data_param2, i, radius, ceiling) + local y + if ceiling then y = -1 else y = 1 end + local pos = area:position(i) + for li in area:iterp(vector.add(pos, -radius), vector.add(pos, radius)) do + local adjacent = li + y*area.ystride + if math.random() > 0.5 and data[li] == c_stone and data[adjacent] == c_air then + place_big_crystal(data, data_param2, adjacent, ceiling) + data[li] = c_glow_ore + end + end +end diff --git a/locale/it.po b/locale/it.po index 9c818ab..6334e2f 100644 --- a/locale/it.po +++ b/locale/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dfcaverns module's Italian locale\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-18 01:34-0600\n" +"POT-Creation-Date: 2018-05-19 15:46-0600\n" "PO-Revision-Date: 2017-08-17 23:01+0100\n" "Last-Translator: H4mlet \n" "Language-Team: ITALIANO\n" @@ -395,6 +395,16 @@ msgstr "" msgid "Flawless Mese Block" msgstr "" +#: features\glow_crystals.lua:27 +msgid "Crystal Vein" +msgstr "" + +#: features\glow_crystals.lua:36 +#: features\glow_crystals.lua:63 +#: features\glow_crystals.lua:97 +msgid "Giant Crystal" +msgstr "" + #: features\glow_water.lua:6 msgid "Mese Water" msgstr "" diff --git a/locale/template.pot b/locale/template.pot index 97d5dfb..c71b587 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-18 01:34-0600\n" +"POT-Creation-Date: 2018-05-19 15:46-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -394,6 +394,16 @@ msgstr "" msgid "Flawless Mese Block" msgstr "" +#: features\glow_crystals.lua:27 +msgid "Crystal Vein" +msgstr "" + +#: features\glow_crystals.lua:36 +#: features\glow_crystals.lua:63 +#: features\glow_crystals.lua:97 +msgid "Giant Crystal" +msgstr "" + #: features\glow_water.lua:6 msgid "Mese Water" msgstr "" diff --git a/models/hex_crystal.mtl b/models/hex_crystal.mtl new file mode 100644 index 0000000..0d3fc0a --- /dev/null +++ b/models/hex_crystal.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'hex crystal.blend' +# Material Count: 2 + +newmtl End_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Side_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.371605 0.494084 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/hex_crystal.obj b/models/hex_crystal.obj new file mode 100644 index 0000000..4f1f501 --- /dev/null +++ b/models/hex_crystal.obj @@ -0,0 +1,114 @@ +# Blender v2.77 (sub 0) OBJ File: 'hex crystal.blend' +# www.blender.org +mtllib hex_crystal.mtl +o Cylinder +v 0.000000 -0.882802 0.000000 +v 0.000000 2.873951 0.000000 +v 0.000000 -0.499696 -0.500000 +v 0.000000 2.490845 -0.500000 +v 0.433013 -0.499696 -0.250000 +v 0.433013 2.490845 -0.250000 +v 0.433013 -0.499696 0.250000 +v 0.433013 2.490845 0.250000 +v -0.000000 -0.499696 0.500000 +v -0.000000 2.490845 0.500000 +v -0.433013 -0.499696 0.250000 +v -0.433013 2.490845 0.250000 +v -0.433013 -0.499696 -0.250000 +v -0.433013 2.490845 -0.250000 +vt 0.4999 0.0000 +vt 0.4999 1.0000 +vt 0.3332 1.0000 +vt 0.3332 0.0000 +vt 0.1665 1.0000 +vt 0.1665 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 -0.0000 +vt 1.0000 1.0000 +vt 0.8333 1.0000 +vt 0.8333 -0.0000 +vt 0.6666 1.0000 +vt 0.6666 -0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.5000 0.5000 +vt 0.9313 0.7490 +vt 0.5000 0.9980 +vt 0.5000 0.5000 +vt 0.5000 0.0020 +vt 0.9313 0.2510 +vt 0.0687 0.7490 +vt 0.0687 0.2510 +vt 0.0687 0.2510 +vt 0.0687 0.7490 +vt 0.5000 0.0020 +vt 0.5000 0.9980 +vt 0.9313 0.2510 +vt 0.9313 0.7490 +vn 0.5000 0.0000 -0.8660 +vn 1.0000 0.0000 0.0000 +vn 0.5000 0.0000 0.8660 +vn -0.5000 0.0000 0.8660 +vn -1.0000 0.0000 0.0000 +vn -0.5000 0.0000 -0.8660 +vn 0.0000 1.0000 0.0000 +vn -0.0000 0.5465 0.8375 +vn 0.0000 -0.5465 0.8375 +vn 0.3313 -0.7489 -0.5739 +vn 0.3313 0.7489 -0.5739 +vn 0.6626 -0.7489 0.0000 +vn 0.6626 0.7489 0.0000 +vn 0.3313 -0.7489 0.5739 +vn 0.3313 0.7489 0.5739 +vn -0.3313 -0.7489 0.5739 +vn -0.3313 0.7489 0.5739 +vn -0.6626 -0.7489 0.0000 +vn -0.6626 0.7489 0.0000 +vn -0.3313 -0.7489 -0.5739 +vn -0.3313 0.7489 -0.5739 +g Cylinder_Cylinder_Side_Mat +usemtl Side_Mat +s off +f 3/1/1 4/2/1 6/3/1 5/4/1 +f 5/4/2 6/3/2 8/5/2 7/6/2 +f 7/6/3 8/5/3 10/7/3 9/8/3 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 11/12/5 12/11/5 14/13/5 13/14/5 +f 13/14/6 14/13/6 4/2/6 3/1/6 +f 10/15/7 8/16/7 12/17/7 +f 12/17/8 8/16/8 2/18/8 +f 2/18/1 8/16/1 14/19/1 +f 14/19/7 8/16/7 6/20/7 +f 14/19/9 6/20/9 2/18/9 +f 11/21/9 1/22/9 7/23/9 +f 7/23/1 1/22/1 13/24/1 +f 13/24/8 1/22/8 5/25/8 +f 9/8/7 7/23/7 11/21/7 +f 11/21/7 7/23/7 13/24/7 +f 13/24/7 7/23/7 5/25/7 +f 13/24/7 5/25/7 3/26/7 +g Cylinder_Cylinder_End_Mat +usemtl End_Mat +f 1/27/10 3/28/10 5/29/10 +f 2/30/11 6/31/11 4/32/11 +f 1/27/12 5/29/12 7/33/12 +f 2/30/13 8/34/13 6/31/13 +f 1/27/14 7/33/14 9/35/14 +f 2/30/15 10/36/15 8/34/15 +f 1/27/16 9/35/16 11/37/16 +f 2/30/17 12/38/17 10/36/17 +f 1/27/18 11/37/18 13/39/18 +f 2/30/19 14/40/19 12/38/19 +f 1/27/20 13/39/20 3/28/20 +f 2/30/21 4/32/21 14/40/21 diff --git a/models/hex_crystal_30.mtl b/models/hex_crystal_30.mtl new file mode 100644 index 0000000..89f4b07 --- /dev/null +++ b/models/hex_crystal_30.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'hex crystal 30.blend' +# Material Count: 2 + +newmtl End_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Side_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.371605 0.494084 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/hex_crystal_30.obj b/models/hex_crystal_30.obj new file mode 100644 index 0000000..738a528 --- /dev/null +++ b/models/hex_crystal_30.obj @@ -0,0 +1,114 @@ +# Blender v2.77 (sub 0) OBJ File: 'hex crystal 30.blend' +# www.blender.org +mtllib hex_crystal_30.mtl +o Cylinder +v -0.000000 -0.831516 0.191401 +v 0.000000 2.421927 -1.686976 +v -0.500000 -0.499737 -0.000152 +v -0.500000 2.090148 -1.495423 +v -0.250000 -0.716243 -0.375152 +v -0.250000 1.873641 -1.870423 +v 0.250000 -0.716243 -0.375152 +v 0.250000 1.873641 -1.870423 +v 0.500000 -0.499737 -0.000152 +v 0.500000 2.090148 -1.495423 +v 0.250000 -0.283230 0.374848 +v 0.250000 2.306654 -1.120423 +v -0.250000 -0.283230 0.374848 +v -0.250000 2.306654 -1.120423 +vt 0.4999 0.0000 +vt 0.4999 1.0000 +vt 0.3332 1.0000 +vt 0.3332 0.0000 +vt 0.1665 1.0000 +vt 0.1665 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 -0.0000 +vt 1.0000 1.0000 +vt 0.8333 1.0000 +vt 0.8333 -0.0000 +vt 0.6666 1.0000 +vt 0.6666 -0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.5000 0.5000 +vt 0.9313 0.7490 +vt 0.5000 0.9980 +vt 0.5000 0.5000 +vt 0.5000 0.0020 +vt 0.9313 0.2510 +vt 0.0687 0.7490 +vt 0.0687 0.2510 +vt 0.0687 0.2510 +vt 0.0687 0.7490 +vt 0.5000 0.0020 +vt 0.5000 0.9980 +vt 0.9313 0.2510 +vt 0.9313 0.7490 +vn -0.8660 -0.2500 -0.4330 +vn 0.0000 -0.5000 -0.8660 +vn 0.8660 -0.2500 -0.4330 +vn 0.8660 0.2500 0.4330 +vn 0.0000 0.5000 0.8660 +vn -0.8660 0.2500 0.4330 +vn 0.0000 0.8660 -0.5000 +vn 0.8375 0.4733 -0.2732 +vn 0.8375 -0.4733 0.2732 +vn -0.5739 -0.8143 0.0875 +vn -0.5739 0.4830 -0.6614 +vn 0.0000 -0.9799 -0.1994 +vn -0.0000 0.3173 -0.9483 +vn 0.5739 -0.8143 0.0875 +vn 0.5739 0.4830 -0.6614 +vn 0.5739 -0.4830 0.6614 +vn 0.5739 0.8143 -0.0875 +vn 0.0000 -0.3173 0.9483 +vn 0.0000 0.9799 0.1994 +vn -0.5739 -0.4830 0.6614 +vn -0.5739 0.8143 -0.0875 +g Cylinder_Cylinder_Side_Mat +usemtl Side_Mat +s off +f 3/1/1 4/2/1 6/3/1 5/4/1 +f 5/4/2 6/3/2 8/5/2 7/6/2 +f 7/6/3 8/5/3 10/7/3 9/8/3 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 11/12/5 12/11/5 14/13/5 13/14/5 +f 13/14/6 14/13/6 4/2/6 3/1/6 +f 10/15/7 8/16/7 12/17/7 +f 12/17/8 8/16/8 2/18/8 +f 2/18/1 8/16/1 14/19/1 +f 14/19/7 8/16/7 6/20/7 +f 14/19/9 6/20/9 2/18/9 +f 11/21/9 1/22/9 7/23/9 +f 7/23/1 1/22/1 13/24/1 +f 13/24/8 1/22/8 5/25/8 +f 9/8/7 7/23/7 11/21/7 +f 11/21/7 7/23/7 13/24/7 +f 13/24/7 7/23/7 5/25/7 +f 13/24/7 5/25/7 3/26/7 +g Cylinder_Cylinder_End_Mat +usemtl End_Mat +f 1/27/10 3/28/10 5/29/10 +f 2/30/11 6/31/11 4/32/11 +f 1/27/12 5/29/12 7/33/12 +f 2/30/13 8/34/13 6/31/13 +f 1/27/14 7/33/14 9/35/14 +f 2/30/15 10/36/15 8/34/15 +f 1/27/16 9/35/16 11/37/16 +f 2/30/17 12/38/17 10/36/17 +f 1/27/18 11/37/18 13/39/18 +f 2/30/19 14/40/19 12/38/19 +f 1/27/20 13/39/20 3/28/20 +f 2/30/21 4/32/21 14/40/21 diff --git a/models/hex_crystal_30_45.mtl b/models/hex_crystal_30_45.mtl new file mode 100644 index 0000000..89f4b07 --- /dev/null +++ b/models/hex_crystal_30_45.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'hex crystal 30.blend' +# Material Count: 2 + +newmtl End_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Side_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.371605 0.494084 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/hex_crystal_30_45.obj b/models/hex_crystal_30_45.obj new file mode 100644 index 0000000..5bbb47d --- /dev/null +++ b/models/hex_crystal_30_45.obj @@ -0,0 +1,114 @@ +# Blender v2.77 (sub 0) OBJ File: 'hex crystal 30.blend' +# www.blender.org +mtllib hex_crystal_30_45.mtl +o Cylinder +v 0.135341 -0.831516 0.135341 +v -1.192872 2.421927 -1.192872 +v -0.353661 -0.499737 0.353446 +v -1.410977 2.090148 -0.703870 +v -0.442049 -0.716243 -0.088496 +v -1.499365 1.873641 -1.145812 +v -0.088496 -0.716243 -0.442049 +v -1.145812 1.873641 -1.499365 +v 0.353446 -0.499737 -0.353661 +v -0.703870 2.090148 -1.410977 +v 0.441834 -0.283230 0.088281 +v -0.615482 2.306654 -0.969035 +v 0.088281 -0.283230 0.441834 +v -0.969035 2.306654 -0.615482 +vt 0.4999 0.0000 +vt 0.4999 1.0000 +vt 0.3332 1.0000 +vt 0.3332 0.0000 +vt 0.1665 1.0000 +vt 0.1665 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 -0.0000 +vt 1.0000 1.0000 +vt 0.8333 1.0000 +vt 0.8333 -0.0000 +vt 0.6666 1.0000 +vt 0.6666 -0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.5000 0.5000 +vt 0.9313 0.7490 +vt 0.5000 0.9980 +vt 0.5000 0.5000 +vt 0.5000 0.0020 +vt 0.9313 0.2510 +vt 0.0687 0.7490 +vt 0.0687 0.2510 +vt 0.0687 0.2510 +vt 0.0687 0.7490 +vt 0.5000 0.0020 +vt 0.5000 0.9980 +vt 0.9313 0.2510 +vt 0.9313 0.7490 +vn -0.9186 -0.2500 0.3062 +vn -0.6124 -0.5000 -0.6124 +vn 0.3062 -0.2500 -0.9186 +vn 0.9186 0.2500 -0.3062 +vn 0.6124 0.5000 0.6124 +vn -0.3062 0.2500 0.9186 +vn -0.3536 0.8660 -0.3536 +vn 0.3990 0.4733 -0.7854 +vn 0.7854 -0.4733 -0.3990 +vn -0.3439 -0.8143 0.4677 +vn -0.8735 0.4830 -0.0619 +vn -0.1410 -0.9799 -0.1410 +vn -0.6706 0.3173 -0.6706 +vn 0.4677 -0.8143 -0.3439 +vn -0.0619 0.4830 -0.8735 +vn 0.8735 -0.4830 0.0619 +vn 0.3439 0.8143 -0.4677 +vn 0.6706 -0.3173 0.6706 +vn 0.1410 0.9799 0.1410 +vn 0.0619 -0.4830 0.8735 +vn -0.4677 0.8143 0.3439 +g Cylinder_Cylinder_Side_Mat +usemtl Side_Mat +s off +f 3/1/1 4/2/1 6/3/1 5/4/1 +f 5/4/2 6/3/2 8/5/2 7/6/2 +f 7/6/3 8/5/3 10/7/3 9/8/3 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 11/12/5 12/11/5 14/13/5 13/14/5 +f 13/14/6 14/13/6 4/2/6 3/1/6 +f 10/15/7 8/16/7 12/17/7 +f 12/17/8 8/16/8 2/18/8 +f 2/18/1 8/16/1 14/19/1 +f 14/19/7 8/16/7 6/20/7 +f 14/19/9 6/20/9 2/18/9 +f 11/21/9 1/22/9 7/23/9 +f 7/23/1 1/22/1 13/24/1 +f 13/24/8 1/22/8 5/25/8 +f 9/8/7 7/23/7 11/21/7 +f 11/21/7 7/23/7 13/24/7 +f 13/24/7 7/23/7 5/25/7 +f 13/24/7 5/25/7 3/26/7 +g Cylinder_Cylinder_End_Mat +usemtl End_Mat +f 1/27/10 3/28/10 5/29/10 +f 2/30/11 6/31/11 4/32/11 +f 1/27/12 5/29/12 7/33/12 +f 2/30/13 8/34/13 6/31/13 +f 1/27/14 7/33/14 9/35/14 +f 2/30/15 10/36/15 8/34/15 +f 1/27/16 9/35/16 11/37/16 +f 2/30/17 12/38/17 10/36/17 +f 1/27/18 11/37/18 13/39/18 +f 2/30/19 14/40/19 12/38/19 +f 1/27/20 13/39/20 3/28/20 +f 2/30/21 4/32/21 14/40/21 diff --git a/textures/dfcaverns_glow_ruby.png b/textures/dfcaverns_glow_ruby.png new file mode 100644 index 0000000000000000000000000000000000000000..59fd46b6c0d1df6d17c8d69558e5a1eedcdde508 GIT binary patch literal 330 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Uw}`D>tuPE&1y>LbkuKqxd9p5 z)RlqkE4rGuJzXB8B;K$#zaJO1MpY3gbyQ0YD0SV!df2WH-7PuI4`g)C5z*Xf?jqi6p-Z;8yQSO-;{fYDD zC(KGc5_S8FmA%83quFQJ6?e6-Ox%54?DFY8ms`i~Xk5SDw{Y9WZ5&aZ$_sn9KAa$Y zh;K`^?TycSc-DGIW@m>wuW;J=d~wEwjcwaD{&Qg7r8MQ^ZsWh~Nr7yUN{m{YfbL`P MboFyt=akR{02UIFmjD0& literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_glow_ruby4x.png b/textures/dfcaverns_glow_ruby4x.png new file mode 100644 index 0000000000000000000000000000000000000000..00356c78a7cfcf2ddebb61cf67f4b58baacbc556 GIT binary patch literal 980 zcmV;_11tQAP)O0eQcr3E2X-KN<#^0w)QdJ@ykcpTeY>d4EnK5)rgEL-z?<8R))Hy`==o#qo< zjrQ6a{F7t2Doj72VlV)}a*;bXx{pf1;d6`Kt>}O4KG`cXU1aB8hbR4S9v^snzYkm$ zqGB+lPXMrLb@(U8^I&J;j7Ldgudl9hy;QOf_V@SRefZGI!_$wam)iwOd4W<100l~6 z-+$mRW=yiMt3o7zq=di>6`^sAyWL04KcD{kEDui(KmRP5^bU6|$Kn29ATkO#0Fe!l zDl>@2+3KpD1OeAeB|8tV%|;`y&|2H_2Lth&e~F60VAbk43Y2}T`vG@VIESrT9ROfD zj_A3rM@&=X<;l_4UtRzJ<+lCz(_ePeyiMbzaT0+r`?d%^M^b3^YJe&!g5b+{Vvb(X)&C7qJegA>O&W97LR)-po5h0OU5U@Nv z{kC{>o4lSv$|+f@R`FKnUT1o8-1nmx6@%g4`a1lRUt;RsPQ_E&j6tQ-uq4-p6*0y+bk6L$nzwCd63KD88M4RlsNBAZ!>1!(y5TAr;|K0Md_QB!CpY4}J8CkntEx)oLg3F8TnZt3nhgeWT4@m)BesqTOopt5^a6 ze-S8D42Ck(g+Vlrn5NK{m%Z{AUu|V?x^(e8Jbk=k?~FW8wp&fECKHLP3nQ&l5k*q? zK8l(~2-U6f+Iq{TTHh>ksPPzn6eAC>rGK*DI}&NHPL-u)Q)aqIf?!6AML&G$&W!ro zThDtvo>g*Pe&GieeqiAT7Jgvi2Nr%{;RpVAKkzSEJl7kgT!U-?0000~T6581c-C}_|NsBB9)c18005y$ zL_t&-87091Lc%Z%K+#wfn<(4JGDUxAd;e2f@ICQ3j@XuUeOs36b$7WFe6y}VZhfSb zg6W+H_hu$9n!x#7L8p_LnJOet?$Z0 Date: Sat, 19 May 2018 19:28:06 -0600 Subject: [PATCH 07/25] make crystals drop non-tilted type for now --- features/glow_crystals.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua index 1defdda..011ad7a 100644 --- a/features/glow_crystals.lua +++ b/features/glow_crystals.lua @@ -73,6 +73,7 @@ minetest.register_node("dfcaverns:big_crystal_30", { sunlight_propagates = true, walkable = false, light_source = 12, + drop = "dfcaverns:big_crystal", groups = {cracky=2, dfcaverns_big_crystal = 1}, sounds = default.node_sound_glass_defaults(), selection_box = { @@ -107,6 +108,7 @@ minetest.register_node("dfcaverns:big_crystal_30_45", { sunlight_propagates = true, walkable = false, light_source = 12, + drop = "dfcaverns:big_crystal", groups = {cracky=2, dfcaverns_big_crystal = 1}, sounds = default.node_sound_glass_defaults(), selection_box = { From c7239528127261224bb88cfb44930d396c96b80b Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 20 May 2018 00:45:38 -0600 Subject: [PATCH 08/25] two crystal sizes, add slight glow to cave moss, add columns to layer 1 --- biomes.lua | 18 ++- features/glow_crystals.lua | 130 ++++++++++++++++-- features/ground_cover.lua | 1 + locale/it.po | 14 +- locale/template.pot | 14 +- ...ystal_30.mtl => hex_crystal_30_45_big.mtl} | 0 ...al_30_45.obj => hex_crystal_30_45_big.obj} | 0 models/hex_crystal_30_45_med.mtl | 22 +++ models/hex_crystal_30_45_med.obj | 114 +++++++++++++++ ...ystal_30_45.mtl => hex_crystal_30_big.mtl} | 0 ..._crystal_30.obj => hex_crystal_30_big.obj} | 0 models/hex_crystal_30_med.mtl | 22 +++ models/hex_crystal_30_med.obj | 114 +++++++++++++++ .../{hex_crystal.mtl => hex_crystal_big.mtl} | 0 .../{hex_crystal.obj => hex_crystal_big.obj} | 0 models/hex_crystal_med.mtl | 22 +++ models/hex_crystal_med.obj | 114 +++++++++++++++ textures/dfcaverns_glow_ruby_quarter.png | Bin 0 -> 364 bytes textures/license.txt | 2 +- trees/nether_cap.lua | 2 +- 20 files changed, 565 insertions(+), 24 deletions(-) rename models/{hex_crystal_30.mtl => hex_crystal_30_45_big.mtl} (100%) rename models/{hex_crystal_30_45.obj => hex_crystal_30_45_big.obj} (100%) create mode 100644 models/hex_crystal_30_45_med.mtl create mode 100644 models/hex_crystal_30_45_med.obj rename models/{hex_crystal_30_45.mtl => hex_crystal_30_big.mtl} (100%) rename models/{hex_crystal_30.obj => hex_crystal_30_big.obj} (100%) create mode 100644 models/hex_crystal_30_med.mtl create mode 100644 models/hex_crystal_30_med.obj rename models/{hex_crystal.mtl => hex_crystal_big.mtl} (100%) rename models/{hex_crystal.obj => hex_crystal_big.obj} (100%) create mode 100644 models/hex_crystal_med.mtl create mode 100644 models/hex_crystal_med.obj create mode 100644 textures/dfcaverns_glow_ruby_quarter.png diff --git a/biomes.lua b/biomes.lua index dd82051..7cdac02 100644 --- a/biomes.lua +++ b/biomes.lua @@ -85,6 +85,14 @@ subterrane:register_cave_layer({ cave_threshold = dfcaverns.config.cavern_threshold, perlin_cave = perlin_cave, perlin_wave = perlin_wave, + columns = { + maximum_radius = 10, + minimum_radius = 4, + node = c_wet_flowstone, + weight = 0.25, + maximum_count = 20, + minimum_count = 0, + }, }) subterrane:register_cave_layer({ @@ -94,8 +102,8 @@ subterrane:register_cave_layer({ perlin_cave = perlin_cave, perlin_wave = perlin_wave, columns = { - maximum_radius = 10, - minimum_radius = 2, + maximum_radius = 15, + minimum_radius = 4, node = c_wet_flowstone, weight = 0.25, maximum_count = 30, @@ -110,8 +118,8 @@ subterrane:register_cave_layer({ perlin_cave = perlin_cave, perlin_wave = perlin_wave, columns = { - maximum_radius = 15, - minimum_radius = 2, + maximum_radius = 20, + minimum_radius = 5, node = c_wet_flowstone, weight = 0.25, maximum_count = 50, @@ -145,7 +153,7 @@ subterrane:register_cave_layer({ perlin_wave = perlin_wave_lava, columns = { maximum_radius = 25, - minimum_radius = 2, + minimum_radius = 5, node = c_stone, weight = 0.25, maximum_count = 100, diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua index 011ad7a..ff78882 100644 --- a/features/glow_crystals.lua +++ b/features/glow_crystals.lua @@ -35,7 +35,7 @@ minetest.register_node("dfcaverns:glow_ruby_ore", { minetest.register_node("dfcaverns:big_crystal", { description = S("Giant Crystal"), drawtype = "mesh", - mesh = "hex_crystal.obj", + mesh = "hex_crystal_big.obj", tiles = { "dfcaverns_glow_ruby4x.png", "dfcaverns_glow_ruby.png", @@ -58,11 +58,37 @@ minetest.register_node("dfcaverns:big_crystal", { }, }) +minetest.register_node("dfcaverns:med_crystal", { + description = S("Big Crystal"), + drawtype = "mesh", + mesh = "hex_crystal_med.obj", + tiles = { + "dfcaverns_glow_ruby.png", + "dfcaverns_glow_ruby_quarter.png", + }, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {cracky=2, dfcaverns_big_crystal = 1}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 1.25, 0.25}, + }, + collision_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 1.25, 0.25}, + }, +}) + minetest.register_node("dfcaverns:big_crystal_30", { description = S("Giant Crystal"), drawtype = "mesh", - mesh = "hex_crystal_30.obj", + mesh = "hex_crystal_30_big.obj", tiles = { "dfcaverns_glow_ruby4x.png", "dfcaverns_glow_ruby.png", @@ -82,7 +108,7 @@ minetest.register_node("dfcaverns:big_crystal_30", { {-0.5, -0.5, -0.625, 0.5, 0.5, 0.375}, {-0.5, 0.5, -1.25, 0.5, 1.5, -0.25}, {-0.5, 1.5, -1.875, 0.5, 2.5, -0.875}, - } + }, }, collision_box = { type = "fixed", @@ -90,14 +116,49 @@ minetest.register_node("dfcaverns:big_crystal_30", { {-0.5, -0.5, -0.625, 0.5, 0.5, 0.375}, {-0.5, 0.5, -1.25, 0.5, 1.5, -0.25}, {-0.5, 1.5, -1.875, 0.5, 2.5, -0.875}, + }, + }, +}) + +minetest.register_node("dfcaverns:med_crystal_30", { + description = S("Big Crystal"), + drawtype = "mesh", + mesh = "hex_crystal_30_med.obj", + tiles = { + "dfcaverns_glow_ruby.png", + "dfcaverns_glow_ruby_quarter.png", + }, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + light_source = 12, + drop = "dfcaverns:med_crystal", + groups = {cracky=2, dfcaverns_big_crystal = 1}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, -0.3125, 0.25, 0.0, 0.1875}, + {-0.25, 0.0, -0.625, 0.25, 0.5, -0.125}, + {-0.25, 0.5, -0.9375, 0.25, 1.0, -0.4375}, } }, + collision_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, -0.3125, 0.25, 0.0, 0.1875}, + {-0.25, 0.0, -0.625, 0.25, 0.5, -0.125}, + {-0.25, 0.5, -0.9375, 0.25, 1.0, -0.4375}, + }, + }, }) minetest.register_node("dfcaverns:big_crystal_30_45", { description = S("Giant Crystal"), drawtype = "mesh", - mesh = "hex_crystal_30_45.obj", + mesh = "hex_crystal_30_45_big.obj", tiles = { "dfcaverns_glow_ruby4x.png", "dfcaverns_glow_ruby.png", @@ -117,7 +178,7 @@ minetest.register_node("dfcaverns:big_crystal_30_45", { {-0.375, -0.5, -0.625, 0.625, 0.5, 0.375}, {0.0625, 0.5, -1.0625, 1.0625, 1.5, -0.0625}, {0.5, 1.5, -1.5, 1.5, 2.5, -0.5}, - } + }, }, collision_box = { type = "fixed", @@ -125,25 +186,76 @@ minetest.register_node("dfcaverns:big_crystal_30_45", { {-0.375, -0.5, -0.625, 0.625, 0.5, 0.375}, {0.0625, 0.5, -1.0625, 1.0625, 1.5, -0.0625}, {0.5, 1.5, -1.5, 1.5, 2.5, -0.5}, - } + }, + }, +}) + + +minetest.register_node("dfcaverns:med_crystal_30_45", { + description = S("Big Crystal"), + drawtype = "mesh", + mesh = "hex_crystal_30_45_med.obj", + tiles = { + "dfcaverns_glow_ruby4x.png", + "dfcaverns_glow_ruby.png", + }, + use_texture_alpha = true, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + walkable = false, + light_source = 12, + drop = "dfcaverns:med_crystal", + groups = {cracky=2, dfcaverns_big_crystal = 1}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = { + {-0.1875, -0.5, -0.3125, 0.3125, 0.0, 0.1875}, + {0.03125, 0.0, -0.53125, 0.53125, 0.5, -0.03125}, + {0.25, 0.5, -0.75, 0.75, 1.0, -0.25}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.1875, -0.5, -0.3125, 0.3125, 0.0, 0.1875}, + {0.03125, 0.0, -0.53125, 0.53125, 0.5, -0.03125}, + {0.25, 0.5, -0.75, 0.75, 1.0, -0.25}, + }, }, }) local c_stone = minetest.get_content_id("default:stone") local c_air = minetest.get_content_id("air") local c_big_crystal = minetest.get_content_id("dfcaverns:big_crystal") +local c_med_crystal = minetest.get_content_id("dfcaverns:med_crystal") local c_big_crystal_30 = minetest.get_content_id("dfcaverns:big_crystal_30") +local c_med_crystal_30 = minetest.get_content_id("dfcaverns:med_crystal_30") local c_big_crystal_30_45 = minetest.get_content_id("dfcaverns:big_crystal_30_45") +local c_med_crystal_30_45 = minetest.get_content_id("dfcaverns:med_crystal_30_45") local c_glow_ore = minetest.get_content_id("dfcaverns:glow_ruby_ore") local place_big_crystal = function(data, data_param2, i, ceiling) orientation = math.random() if orientation < 0.33 then - data[i] = c_big_crystal + if math.random() > 0.5 then + data[i] = c_big_crystal + else + data[i] = c_med_crystal + end elseif orientation < 0.66 then - data[i] = c_big_crystal_30 + if math.random() > 0.5 then + data[i] = c_big_crystal_30 + else + data[i] = c_med_crystal_30 + end else - data[i] = c_big_crystal_30_45 + if math.random() > 0.5 then + data[i] = c_big_crystal_30_45 + else + data[i] = c_med_crystal_30_45 + end end if ceiling then data_param2[i] = math.random(20,23) diff --git a/features/ground_cover.lua b/features/ground_cover.lua index b663862..49ea16f 100644 --- a/features/ground_cover.lua +++ b/features/ground_cover.lua @@ -16,6 +16,7 @@ minetest.register_node("dfcaverns:dirt_with_cave_moss", { tileable_vertical = false}}, drop = "default:dirt", is_ground_content = true, + light_source = 2, groups = {crumbly = 3, soil = 1, light_sensitive_fungus = 11}, sounds = default.node_sound_dirt_defaults({ footstep = {name = "default_grass_footstep", gain = 0.25}, diff --git a/locale/it.po b/locale/it.po index 6334e2f..1e7d094 100644 --- a/locale/it.po +++ b/locale/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dfcaverns module's Italian locale\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-19 15:46-0600\n" +"POT-Creation-Date: 2018-05-20 00:42-0600\n" "PO-Revision-Date: 2017-08-17 23:01+0100\n" "Last-Translator: H4mlet \n" "Language-Team: ITALIANO\n" @@ -400,11 +400,17 @@ msgid "Crystal Vein" msgstr "" #: features\glow_crystals.lua:36 -#: features\glow_crystals.lua:63 -#: features\glow_crystals.lua:97 +#: features\glow_crystals.lua:89 +#: features\glow_crystals.lua:159 msgid "Giant Crystal" msgstr "" +#: features\glow_crystals.lua:62 +#: features\glow_crystals.lua:124 +#: features\glow_crystals.lua:195 +msgid "Big Crystal" +msgstr "" + #: features\glow_water.lua:6 msgid "Mese Water" msgstr "" @@ -425,7 +431,7 @@ msgstr "Vermi luminosi" msgid "Dirt With Cave Moss" msgstr "Terra con muschio di caverna" -#: features\ground_cover.lua:52 +#: features\ground_cover.lua:53 msgid "Cobblestone With Floor Fungus" msgstr "Ciottoli con funghi del terreno" diff --git a/locale/template.pot b/locale/template.pot index c71b587..863d7cd 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-19 15:46-0600\n" +"POT-Creation-Date: 2018-05-20 00:42-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -399,11 +399,17 @@ msgid "Crystal Vein" msgstr "" #: features\glow_crystals.lua:36 -#: features\glow_crystals.lua:63 -#: features\glow_crystals.lua:97 +#: features\glow_crystals.lua:89 +#: features\glow_crystals.lua:159 msgid "Giant Crystal" msgstr "" +#: features\glow_crystals.lua:62 +#: features\glow_crystals.lua:124 +#: features\glow_crystals.lua:195 +msgid "Big Crystal" +msgstr "" + #: features\glow_water.lua:6 msgid "Mese Water" msgstr "" @@ -424,7 +430,7 @@ msgstr "" msgid "Dirt With Cave Moss" msgstr "" -#: features\ground_cover.lua:52 +#: features\ground_cover.lua:53 msgid "Cobblestone With Floor Fungus" msgstr "" diff --git a/models/hex_crystal_30.mtl b/models/hex_crystal_30_45_big.mtl similarity index 100% rename from models/hex_crystal_30.mtl rename to models/hex_crystal_30_45_big.mtl diff --git a/models/hex_crystal_30_45.obj b/models/hex_crystal_30_45_big.obj similarity index 100% rename from models/hex_crystal_30_45.obj rename to models/hex_crystal_30_45_big.obj diff --git a/models/hex_crystal_30_45_med.mtl b/models/hex_crystal_30_45_med.mtl new file mode 100644 index 0000000..c68593e --- /dev/null +++ b/models/hex_crystal_30_45_med.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'hex crystal 30 45.blend' +# Material Count: 2 + +newmtl End_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Side_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.371605 0.494084 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/hex_crystal_30_45_med.obj b/models/hex_crystal_30_45_med.obj new file mode 100644 index 0000000..6d750e6 --- /dev/null +++ b/models/hex_crystal_30_45_med.obj @@ -0,0 +1,114 @@ +# Blender v2.77 (sub 0) OBJ File: 'hex crystal 30 45.blend' +# www.blender.org +mtllib hex_crystal_30_45_med.mtl +o Cylinder +v 0.067670 -0.665758 0.067670 +v -0.596436 0.960964 -0.596436 +v -0.176830 -0.499868 0.176723 +v -0.705489 0.795074 -0.351935 +v -0.221025 -0.608121 -0.044248 +v -0.749683 0.686821 -0.572906 +v -0.044248 -0.608121 -0.221025 +v -0.572906 0.686821 -0.749683 +v 0.176723 -0.499868 -0.176830 +v -0.351935 0.795074 -0.705489 +v 0.220917 -0.391615 0.044140 +v -0.307741 0.903327 -0.484518 +v 0.044140 -0.391615 0.220917 +v -0.484518 0.903327 -0.307741 +vt 0.4999 0.0000 +vt 0.4999 1.0000 +vt 0.3332 1.0000 +vt 0.3332 0.0000 +vt 0.1665 1.0000 +vt 0.1665 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 -0.0000 +vt 1.0000 1.0000 +vt 0.8333 1.0000 +vt 0.8333 -0.0000 +vt 0.6666 1.0000 +vt 0.6666 -0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.5000 0.5000 +vt 0.9313 0.7490 +vt 0.5000 0.9980 +vt 0.5000 0.5000 +vt 0.5000 0.0020 +vt 0.9313 0.2510 +vt 0.0687 0.7490 +vt 0.0687 0.2510 +vt 0.0687 0.2510 +vt 0.0687 0.7490 +vt 0.5000 0.0020 +vt 0.5000 0.9980 +vt 0.9313 0.2510 +vt 0.9313 0.7490 +vn -0.9186 -0.2500 0.3062 +vn -0.6124 -0.5000 -0.6124 +vn 0.3062 -0.2500 -0.9186 +vn 0.9186 0.2500 -0.3062 +vn 0.6124 0.5000 0.6124 +vn -0.3062 0.2500 0.9186 +vn -0.3536 0.8660 -0.3536 +vn 0.3990 0.4733 -0.7854 +vn 0.7854 -0.4733 -0.3990 +vn -0.3439 -0.8143 0.4677 +vn -0.8735 0.4830 -0.0619 +vn -0.1410 -0.9799 -0.1410 +vn -0.6706 0.3173 -0.6706 +vn 0.4677 -0.8143 -0.3439 +vn -0.0619 0.4830 -0.8735 +vn 0.8735 -0.4830 0.0619 +vn 0.3439 0.8143 -0.4677 +vn 0.6706 -0.3173 0.6706 +vn 0.1410 0.9799 0.1410 +vn 0.0619 -0.4830 0.8735 +vn -0.4677 0.8143 0.3439 +g Cylinder_Cylinder_Side_Mat +usemtl Side_Mat +s off +f 3/1/1 4/2/1 6/3/1 5/4/1 +f 5/4/2 6/3/2 8/5/2 7/6/2 +f 7/6/3 8/5/3 10/7/3 9/8/3 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 11/12/5 12/11/5 14/13/5 13/14/5 +f 13/14/6 14/13/6 4/2/6 3/1/6 +f 10/15/7 8/16/7 12/17/7 +f 12/17/8 8/16/8 2/18/8 +f 2/18/1 8/16/1 14/19/1 +f 14/19/7 8/16/7 6/20/7 +f 14/19/9 6/20/9 2/18/9 +f 11/21/9 1/22/9 7/23/9 +f 7/23/1 1/22/1 13/24/1 +f 13/24/8 1/22/8 5/25/8 +f 9/8/7 7/23/7 11/21/7 +f 11/21/7 7/23/7 13/24/7 +f 13/24/7 7/23/7 5/25/7 +f 13/24/7 5/25/7 3/26/7 +g Cylinder_Cylinder_End_Mat +usemtl End_Mat +f 1/27/10 3/28/10 5/29/10 +f 2/30/11 6/31/11 4/32/11 +f 1/27/12 5/29/12 7/33/12 +f 2/30/13 8/34/13 6/31/13 +f 1/27/14 7/33/14 9/35/14 +f 2/30/15 10/36/15 8/34/15 +f 1/27/16 9/35/16 11/37/16 +f 2/30/17 12/38/17 10/36/17 +f 1/27/18 11/37/18 13/39/18 +f 2/30/19 14/40/19 12/38/19 +f 1/27/20 13/39/20 3/28/20 +f 2/30/21 4/32/21 14/40/21 diff --git a/models/hex_crystal_30_45.mtl b/models/hex_crystal_30_big.mtl similarity index 100% rename from models/hex_crystal_30_45.mtl rename to models/hex_crystal_30_big.mtl diff --git a/models/hex_crystal_30.obj b/models/hex_crystal_30_big.obj similarity index 100% rename from models/hex_crystal_30.obj rename to models/hex_crystal_30_big.obj diff --git a/models/hex_crystal_30_med.mtl b/models/hex_crystal_30_med.mtl new file mode 100644 index 0000000..89f4b07 --- /dev/null +++ b/models/hex_crystal_30_med.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'hex crystal 30.blend' +# Material Count: 2 + +newmtl End_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Side_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.371605 0.494084 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/hex_crystal_30_med.obj b/models/hex_crystal_30_med.obj new file mode 100644 index 0000000..8909981 --- /dev/null +++ b/models/hex_crystal_30_med.obj @@ -0,0 +1,114 @@ +# Blender v2.77 (sub 0) OBJ File: 'hex crystal 30.blend' +# www.blender.org +mtllib hex_crystal_30_med.mtl +o Cylinder +v -0.000000 -0.665758 0.095701 +v 0.000000 0.960964 -0.843488 +v -0.250000 -0.499868 -0.000076 +v -0.250000 0.795074 -0.747711 +v -0.125000 -0.608121 -0.187576 +v -0.125000 0.686821 -0.935211 +v 0.125000 -0.608121 -0.187576 +v 0.125000 0.686821 -0.935212 +v 0.250000 -0.499868 -0.000076 +v 0.250000 0.795074 -0.747711 +v 0.125000 -0.391615 0.187424 +v 0.125000 0.903327 -0.560211 +v -0.125000 -0.391615 0.187424 +v -0.125000 0.903327 -0.560211 +vt 0.4999 0.0000 +vt 0.4999 1.0000 +vt 0.3332 1.0000 +vt 0.3332 0.0000 +vt 0.1665 1.0000 +vt 0.1665 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 -0.0000 +vt 1.0000 1.0000 +vt 0.8333 1.0000 +vt 0.8333 -0.0000 +vt 0.6666 1.0000 +vt 0.6666 -0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.5000 0.5000 +vt 0.9313 0.7490 +vt 0.5000 0.9980 +vt 0.5000 0.5000 +vt 0.5000 0.0020 +vt 0.9313 0.2510 +vt 0.0687 0.7490 +vt 0.0687 0.2510 +vt 0.0687 0.2510 +vt 0.0687 0.7490 +vt 0.5000 0.0020 +vt 0.5000 0.9980 +vt 0.9313 0.2510 +vt 0.9313 0.7490 +vn -0.8660 -0.2500 -0.4330 +vn 0.0000 -0.5000 -0.8660 +vn 0.8660 -0.2500 -0.4330 +vn 0.8660 0.2500 0.4330 +vn 0.0000 0.5000 0.8660 +vn -0.8660 0.2500 0.4330 +vn 0.0000 0.8660 -0.5000 +vn 0.8375 0.4733 -0.2732 +vn 0.8375 -0.4733 0.2732 +vn -0.5739 -0.8143 0.0875 +vn -0.5739 0.4830 -0.6614 +vn 0.0000 -0.9799 -0.1994 +vn -0.0000 0.3173 -0.9483 +vn 0.5739 -0.8143 0.0875 +vn 0.5739 0.4830 -0.6614 +vn 0.5739 -0.4830 0.6614 +vn 0.5739 0.8143 -0.0875 +vn 0.0000 -0.3173 0.9483 +vn 0.0000 0.9799 0.1994 +vn -0.5739 -0.4830 0.6614 +vn -0.5739 0.8143 -0.0875 +g Cylinder_Cylinder_Side_Mat +usemtl Side_Mat +s off +f 3/1/1 4/2/1 6/3/1 5/4/1 +f 5/4/2 6/3/2 8/5/2 7/6/2 +f 7/6/3 8/5/3 10/7/3 9/8/3 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 11/12/5 12/11/5 14/13/5 13/14/5 +f 13/14/6 14/13/6 4/2/6 3/1/6 +f 10/15/7 8/16/7 12/17/7 +f 12/17/8 8/16/8 2/18/8 +f 2/18/1 8/16/1 14/19/1 +f 14/19/7 8/16/7 6/20/7 +f 14/19/9 6/20/9 2/18/9 +f 11/21/9 1/22/9 7/23/9 +f 7/23/1 1/22/1 13/24/1 +f 13/24/8 1/22/8 5/25/8 +f 9/8/7 7/23/7 11/21/7 +f 11/21/7 7/23/7 13/24/7 +f 13/24/7 7/23/7 5/25/7 +f 13/24/7 5/25/7 3/26/7 +g Cylinder_Cylinder_End_Mat +usemtl End_Mat +f 1/27/10 3/28/10 5/29/10 +f 2/30/11 6/31/11 4/32/11 +f 1/27/12 5/29/12 7/33/12 +f 2/30/13 8/34/13 6/31/13 +f 1/27/14 7/33/14 9/35/14 +f 2/30/15 10/36/15 8/34/15 +f 1/27/16 9/35/16 11/37/16 +f 2/30/17 12/38/17 10/36/17 +f 1/27/18 11/37/18 13/39/18 +f 2/30/19 14/40/19 12/38/19 +f 1/27/20 13/39/20 3/28/20 +f 2/30/21 4/32/21 14/40/21 diff --git a/models/hex_crystal.mtl b/models/hex_crystal_big.mtl similarity index 100% rename from models/hex_crystal.mtl rename to models/hex_crystal_big.mtl diff --git a/models/hex_crystal.obj b/models/hex_crystal_big.obj similarity index 100% rename from models/hex_crystal.obj rename to models/hex_crystal_big.obj diff --git a/models/hex_crystal_med.mtl b/models/hex_crystal_med.mtl new file mode 100644 index 0000000..0d3fc0a --- /dev/null +++ b/models/hex_crystal_med.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'hex crystal.blend' +# Material Count: 2 + +newmtl End_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Side_Mat +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.371605 0.494084 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/hex_crystal_med.obj b/models/hex_crystal_med.obj new file mode 100644 index 0000000..c9991a0 --- /dev/null +++ b/models/hex_crystal_med.obj @@ -0,0 +1,114 @@ +# Blender v2.77 (sub 0) OBJ File: 'hex crystal.blend' +# www.blender.org +mtllib hex_crystal_med.mtl +o Cylinder +v 0.000000 -0.691401 0.000000 +v 0.000000 1.186976 0.000000 +v 0.000000 -0.499848 -0.250000 +v 0.000000 0.995423 -0.250000 +v 0.216506 -0.499848 -0.125000 +v 0.216506 0.995423 -0.125000 +v 0.216506 -0.499848 0.125000 +v 0.216506 0.995423 0.125000 +v -0.000000 -0.499848 0.250000 +v -0.000000 0.995423 0.250000 +v -0.216506 -0.499848 0.125000 +v -0.216506 0.995423 0.125000 +v -0.216506 -0.499848 -0.125000 +v -0.216506 0.995423 -0.125000 +vt 0.4999 0.0000 +vt 0.4999 1.0000 +vt 0.3332 1.0000 +vt 0.3332 0.0000 +vt 0.1665 1.0000 +vt 0.1665 0.0000 +vt 0.0000 1.0000 +vt 0.0000 0.0000 +vt 1.0000 -0.0000 +vt 1.0000 1.0000 +vt 0.8333 1.0000 +vt 0.8333 -0.0000 +vt 0.6666 1.0000 +vt 0.6666 -0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.0000 0.0000 +vt 0.5000 0.5000 +vt 0.9313 0.7490 +vt 0.5000 0.9980 +vt 0.5000 0.5000 +vt 0.5000 0.0020 +vt 0.9313 0.2510 +vt 0.0687 0.7490 +vt 0.0687 0.2510 +vt 0.0687 0.2510 +vt 0.0687 0.7490 +vt 0.5000 0.0020 +vt 0.5000 0.9980 +vt 0.9313 0.2510 +vt 0.9313 0.7490 +vn 0.5000 0.0000 -0.8660 +vn 1.0000 0.0000 0.0000 +vn 0.5000 0.0000 0.8660 +vn -0.5000 0.0000 0.8660 +vn -1.0000 0.0000 0.0000 +vn -0.5000 0.0000 -0.8660 +vn 0.0000 1.0000 0.0000 +vn -0.0000 0.5465 0.8375 +vn 0.0000 -0.5465 0.8375 +vn 0.3313 -0.7489 -0.5739 +vn 0.3313 0.7489 -0.5739 +vn 0.6626 -0.7489 0.0000 +vn 0.6626 0.7489 0.0000 +vn 0.3313 -0.7489 0.5739 +vn 0.3313 0.7489 0.5739 +vn -0.3313 -0.7489 0.5739 +vn -0.3313 0.7489 0.5739 +vn -0.6626 -0.7489 0.0000 +vn -0.6626 0.7489 0.0000 +vn -0.3313 -0.7489 -0.5739 +vn -0.3313 0.7489 -0.5739 +g Cylinder_Cylinder_Side_Mat +usemtl Side_Mat +s off +f 3/1/1 4/2/1 6/3/1 5/4/1 +f 5/4/2 6/3/2 8/5/2 7/6/2 +f 7/6/3 8/5/3 10/7/3 9/8/3 +f 9/9/4 10/10/4 12/11/4 11/12/4 +f 11/12/5 12/11/5 14/13/5 13/14/5 +f 13/14/6 14/13/6 4/2/6 3/1/6 +f 10/15/7 8/16/7 12/17/7 +f 12/17/8 8/16/8 2/18/8 +f 2/18/1 8/16/1 14/19/1 +f 14/19/7 8/16/7 6/20/7 +f 14/19/9 6/20/9 2/18/9 +f 11/21/9 1/22/9 7/23/9 +f 7/23/1 1/22/1 13/24/1 +f 13/24/8 1/22/8 5/25/8 +f 9/8/7 7/23/7 11/21/7 +f 11/21/7 7/23/7 13/24/7 +f 13/24/7 7/23/7 5/25/7 +f 13/24/7 5/25/7 3/26/7 +g Cylinder_Cylinder_End_Mat +usemtl End_Mat +f 1/27/10 3/28/10 5/29/10 +f 2/30/11 6/31/11 4/32/11 +f 1/27/12 5/29/12 7/33/12 +f 2/30/13 8/34/13 6/31/13 +f 1/27/14 7/33/14 9/35/14 +f 2/30/15 10/36/15 8/34/15 +f 1/27/16 9/35/16 11/37/16 +f 2/30/17 12/38/17 10/36/17 +f 1/27/18 11/37/18 13/39/18 +f 2/30/19 14/40/19 12/38/19 +f 1/27/20 13/39/20 3/28/20 +f 2/30/21 4/32/21 14/40/21 diff --git a/textures/dfcaverns_glow_ruby_quarter.png b/textures/dfcaverns_glow_ruby_quarter.png new file mode 100644 index 0000000000000000000000000000000000000000..95f3e4db0d5318b08b987daee14448a990df5368 GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPds|XtpXQ28Okj|f;E{-7*mst{sbMe*6wg>q+!F$%t{`~H+6bC1Ff=JYb@I_8CDOH0>X__^($>bg|L zHQ7fMeeD~T{yt&a`+L#j#p^7N-K*%~T)J&d)}{xsiiL_rH9ubJi*<`iwfRnczMPGt zkk@xk%Y=iU{$5 Date: Sun, 20 May 2018 18:04:37 -0600 Subject: [PATCH 09/25] make crystals solid, add recipes to allow players to tilt harvested crystals --- features/glow_crystals.lua | 52 +++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua index ff78882..2302a13 100644 --- a/features/glow_crystals.lua +++ b/features/glow_crystals.lua @@ -44,7 +44,6 @@ minetest.register_node("dfcaverns:big_crystal", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - walkable = false, light_source = 12, groups = {cracky=2, dfcaverns_big_crystal = 1}, sounds = default.node_sound_glass_defaults(), @@ -70,7 +69,6 @@ minetest.register_node("dfcaverns:med_crystal", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - walkable = false, light_source = 12, groups = {cracky=2, dfcaverns_big_crystal = 1}, sounds = default.node_sound_glass_defaults(), @@ -97,7 +95,6 @@ minetest.register_node("dfcaverns:big_crystal_30", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - walkable = false, light_source = 12, drop = "dfcaverns:big_crystal", groups = {cracky=2, dfcaverns_big_crystal = 1}, @@ -108,6 +105,15 @@ minetest.register_node("dfcaverns:big_crystal_30", { {-0.5, -0.5, -0.625, 0.5, 0.5, 0.375}, {-0.5, 0.5, -1.25, 0.5, 1.5, -0.25}, {-0.5, 1.5, -1.875, 0.5, 2.5, -0.875}, + --The following is a more accurate set of collision boxes that theoretically + --allows the crystal to be climbed like stairs, but in practice the physics + --don't seem to work quite right so I'm leaving it "simple" for now. +-- {-0.5, -0.5, -0.625, 0.5, 0.0, 0.375}, +-- {-0.5, 0.0, -0.9375, 0.5, 0.5, 0.0625}, +-- {-0.5, 0.5, -1.25, 0.5, 1.0, -0.25}, +-- {-0.5, 1.0, -1.5625, 0.5, 1.5, -0.5625}, +-- {-0.5, 1.5, -1.875, 0.5, 2.0, -0.875}, +-- {-0.25, 2.0, -1.625, 0.25, 2.5, -1.125}, }, }, collision_box = { @@ -116,6 +122,12 @@ minetest.register_node("dfcaverns:big_crystal_30", { {-0.5, -0.5, -0.625, 0.5, 0.5, 0.375}, {-0.5, 0.5, -1.25, 0.5, 1.5, -0.25}, {-0.5, 1.5, -1.875, 0.5, 2.5, -0.875}, +-- {-0.5, -0.5, -0.625, 0.5, 0.0, 0.375}, +-- {-0.5, 0.0, -0.9375, 0.5, 0.5, 0.0625}, +-- {-0.5, 0.5, -1.25, 0.5, 1.0, -0.25}, +-- {-0.5, 1.0, -1.5625, 0.5, 1.5, -0.5625}, +-- {-0.5, 1.5, -1.875, 0.5, 2.0, -0.875}, +-- {-0.25, 2.0, -1.625, 0.25, 2.5, -1.125}, }, }, }) @@ -132,7 +144,6 @@ minetest.register_node("dfcaverns:med_crystal_30", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - walkable = false, light_source = 12, drop = "dfcaverns:med_crystal", groups = {cracky=2, dfcaverns_big_crystal = 1}, @@ -167,7 +178,6 @@ minetest.register_node("dfcaverns:big_crystal_30_45", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - walkable = false, light_source = 12, drop = "dfcaverns:big_crystal", groups = {cracky=2, dfcaverns_big_crystal = 1}, @@ -203,7 +213,6 @@ minetest.register_node("dfcaverns:med_crystal_30_45", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - walkable = false, light_source = 12, drop = "dfcaverns:med_crystal", groups = {cracky=2, dfcaverns_big_crystal = 1}, @@ -226,6 +235,37 @@ minetest.register_node("dfcaverns:med_crystal_30_45", { }, }) +minetest.register_craft({ + type = "shapeless", + output = 'dfcaverns:big_crystal_30', + recipe = {'dfcaverns:big_crystal'}, +}) +minetest.register_craft({ + type = "shapeless", + output = 'dfcaverns:big_crystal_30_45', + recipe = {'dfcaverns:big_crystal_30'}, +}) +minetest.register_craft({ + type = "shapeless", + output = 'dfcaverns:big_crystal', + recipe = {'dfcaverns:big_crystal_30_45'}, +}) +minetest.register_craft({ + type = "shapeless", + output = 'dfcaverns:med_crystal_30', + recipe = {'dfcaverns:med_crystal'}, +}) +minetest.register_craft({ + type = "shapeless", + output = 'dfcaverns:med_crystal_30_45', + recipe = {'dfcaverns:med_crystal_30'}, +}) +minetest.register_craft({ + type = "shapeless", + output = 'dfcaverns:med_crystal', + recipe = {'dfcaverns:med_crystal_30_45'}, +}) + local c_stone = minetest.get_content_id("default:stone") local c_air = minetest.get_content_id("air") local c_big_crystal = minetest.get_content_id("dfcaverns:big_crystal") From 84cbda2febe875ca28ba1337ff9454812f1c519e Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 20 May 2018 23:44:19 -0600 Subject: [PATCH 10/25] mesh-based tunnel tube segments --- features/glow_crystals.lua | 2 +- models/tunnel_tube_slant.mtl | 62 +++++++++++++ models/tunnel_tube_slant.obj | 94 +++++++++++++++++++ models/tunnel_tube_slant_2.mtl | 62 +++++++++++++ models/tunnel_tube_slant_2.obj | 94 +++++++++++++++++++ models/tunnel_tube_slant_full.mtl | 62 +++++++++++++ models/tunnel_tube_slant_full.obj | 94 +++++++++++++++++++ trees/tunnel_tube.lua | 149 +++++++++++++++++++++++++----- 8 files changed, 596 insertions(+), 23 deletions(-) create mode 100644 models/tunnel_tube_slant.mtl create mode 100644 models/tunnel_tube_slant.obj create mode 100644 models/tunnel_tube_slant_2.mtl create mode 100644 models/tunnel_tube_slant_2.obj create mode 100644 models/tunnel_tube_slant_full.mtl create mode 100644 models/tunnel_tube_slant_full.obj diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua index 2302a13..920b949 100644 --- a/features/glow_crystals.lua +++ b/features/glow_crystals.lua @@ -277,7 +277,7 @@ local c_med_crystal_30_45 = minetest.get_content_id("dfcaverns:med_crystal_30_45 local c_glow_ore = minetest.get_content_id("dfcaverns:glow_ruby_ore") local place_big_crystal = function(data, data_param2, i, ceiling) - orientation = math.random() + local orientation = math.random() if orientation < 0.33 then if math.random() > 0.5 then data[i] = c_big_crystal diff --git a/models/tunnel_tube_slant.mtl b/models/tunnel_tube_slant.mtl new file mode 100644 index 0000000..b33fe71 --- /dev/null +++ b/models/tunnel_tube_slant.mtl @@ -0,0 +1,62 @@ +# Blender MTL File: 'tunnel tube base.blend' +# Material Count: 6 + +newmtl Back +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Bottom +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Front +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Left +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Right +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Top +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/tunnel_tube_slant.obj b/models/tunnel_tube_slant.obj new file mode 100644 index 0000000..1ea9b6d --- /dev/null +++ b/models/tunnel_tube_slant.obj @@ -0,0 +1,94 @@ +# Blender v2.77 (sub 0) OBJ File: 'tunnel tube base.blend' +# www.blender.org +mtllib tunnel_tube_slant.mtl +o tunnel_tube_slant_Cube.002 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 -0.250000 +v -0.250000 -0.500000 -0.250000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 0.500000 -1.000000 +v -0.500000 0.500000 -1.000000 +v 0.500000 0.500000 0.000000 +v -0.500000 0.500000 -0.000000 +v -0.250000 0.500000 -0.250000 +v -0.250000 0.500000 -0.750000 +v 0.250000 0.500000 -0.750000 +v 0.250000 0.500000 -0.250000 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vt 0.2500 0.7500 +vt 0.7500 0.7500 +vt 0.7500 0.2500 +vt 1.0000 -0.0000 +vt -0.0000 0.0000 +vt 0.2500 0.2500 +vt 1.0000 1.0000 +vt 1.0000 0.0000 +vt 0.7500 0.2500 +vt 0.7500 0.7500 +vt 0.2500 0.7500 +vt 0.0000 1.0000 +vt 0.2500 0.2500 +vt -0.0000 0.0000 +vt 1.0000 0.0000 +vt 1.5000 1.0000 +vt 0.5000 1.0000 +vt 0.0000 0.0000 +vt 1.2500 1.0000 +vt 0.7500 1.0000 +vt 0.2500 0.0000 +vt 0.7500 0.0000 +vt 0.5000 1.0000 +vt 1.5000 1.0000 +vt 1.0000 0.0000 +vt 0.7500 1.0000 +vt 1.2500 1.0000 +vt 0.7500 0.0000 +vt 0.2500 0.0000 +vt 1.0000 1.0000 +vt -0.0000 1.0000 +vt 0.7500 1.0000 +vt 0.2500 1.0000 +vt 0.2500 0.0000 +vt 0.0000 0.0000 +vt 0.2500 1.0000 +vt 0.7500 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 0.4472 0.8944 +vn 0.0000 -0.4472 -0.8944 +g tunnel_tube_slant_Cube.002_Top +usemtl Top +s off +f 9/1/1 10/2/1 14/3/1 15/4/1 +f 9/1/1 15/4/1 16/5/1 11/6/1 +f 14/3/1 10/2/1 12/7/1 13/8/1 +f 11/6/1 16/5/1 13/8/1 12/7/1 +g tunnel_tube_slant_Cube.002_Bottom +usemtl Bottom +f 1/9/2 2/10/2 5/11/2 6/12/2 +f 1/9/2 6/12/2 7/13/2 8/14/2 +f 8/14/2 7/13/2 4/15/2 3/16/2 +f 5/11/2 2/10/2 3/16/2 4/15/2 +g tunnel_tube_slant_Cube.002_Right +usemtl Right +f 1/17/3 9/18/3 11/19/3 2/20/3 +f 14/21/3 13/22/3 4/23/3 7/24/3 +g tunnel_tube_slant_Cube.002_Left +usemtl Left +f 3/16/4 12/25/4 10/26/4 8/27/4 +f 16/28/4 15/29/4 6/30/4 5/31/4 +g tunnel_tube_slant_Cube.002_Front +usemtl Front +f 2/10/5 11/32/5 12/33/5 3/16/5 +f 15/34/5 14/35/5 7/36/5 6/30/5 +g tunnel_tube_slant_Cube.002_Back +usemtl Back +f 9/1/6 1/17/6 8/37/6 10/2/6 +f 13/38/6 16/28/6 5/39/6 4/23/6 \ No newline at end of file diff --git a/models/tunnel_tube_slant_2.mtl b/models/tunnel_tube_slant_2.mtl new file mode 100644 index 0000000..b33fe71 --- /dev/null +++ b/models/tunnel_tube_slant_2.mtl @@ -0,0 +1,62 @@ +# Blender MTL File: 'tunnel tube base.blend' +# Material Count: 6 + +newmtl Back +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Bottom +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Front +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Left +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Right +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Top +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/tunnel_tube_slant_2.obj b/models/tunnel_tube_slant_2.obj new file mode 100644 index 0000000..2b61938 --- /dev/null +++ b/models/tunnel_tube_slant_2.obj @@ -0,0 +1,94 @@ +# Blender v2.77 (sub 0) OBJ File: 'tunnel tube base.blend' +# www.blender.org +mtllib tunnel_tube_slant_2.mtl +o tunnel_tube_slant_Cube.002 +v 0.500000 -0.500000 0.000000 +v 0.500000 -0.500000 1.000000 +v -0.500000 -0.500000 1.000000 +v -0.250000 -0.500000 0.750000 +v 0.250000 -0.500000 0.750000 +v 0.250000 -0.500000 0.250000 +v -0.250000 -0.500000 0.250000 +v -0.500000 -0.500000 -0.000000 +v 0.500000 0.500000 -0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v -0.250000 0.500000 0.250000 +v -0.250000 0.500000 -0.250000 +v 0.250000 0.500000 -0.250000 +v 0.250000 0.500000 0.250000 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vt 0.2500 0.7500 +vt 0.7500 0.7500 +vt 0.7500 0.2500 +vt 1.0000 -0.0000 +vt -0.0000 0.0000 +vt 0.2500 0.2500 +vt 1.0000 1.0000 +vt 1.0000 0.0000 +vt 0.7500 0.2500 +vt 0.7500 0.7500 +vt 0.2500 0.7500 +vt 0.0000 1.0000 +vt 0.2500 0.2500 +vt -0.0000 0.0000 +vt 0.5000 0.0000 +vt -0.0000 1.0000 +vt -0.5000 0.0000 +vt 0.7500 1.0000 +vt 0.2500 1.0000 +vt -0.2500 0.0000 +vt 0.2500 0.0000 +vt -0.5000 0.0000 +vt 0.0000 1.0000 +vt 1.0000 1.0000 +vt 0.5000 0.0000 +vt 0.2500 1.0000 +vt 0.7500 1.0000 +vt 0.2500 0.0000 +vt -0.2500 0.0000 +vt 1.0000 1.0000 +vt 0.2500 1.0000 +vt 0.7500 0.0000 +vt 1.0000 0.0000 +vt 0.0000 0.0000 +vt 0.7500 1.0000 +vt 0.7500 0.0000 +vt 0.2500 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 0.4472 0.8944 +vn 0.0000 -0.4472 -0.8944 +g tunnel_tube_slant_Cube.002_Top +usemtl Top +s off +f 9/1/1 10/2/1 14/3/1 15/4/1 +f 9/1/1 15/4/1 16/5/1 11/6/1 +f 14/3/1 10/2/1 12/7/1 13/8/1 +f 11/6/1 16/5/1 13/8/1 12/7/1 +g tunnel_tube_slant_Cube.002_Bottom +usemtl Bottom +f 1/9/2 2/10/2 5/11/2 6/12/2 +f 1/9/2 6/12/2 7/13/2 8/14/2 +f 8/14/2 7/13/2 4/15/2 3/16/2 +f 5/11/2 2/10/2 3/16/2 4/15/2 +g tunnel_tube_slant_Cube.002_Right +usemtl Right +f 1/17/3 9/1/3 11/18/3 2/19/3 +f 14/20/3 13/21/3 4/22/3 7/23/3 +g tunnel_tube_slant_Cube.002_Left +usemtl Left +f 3/24/4 12/25/4 10/26/4 8/27/4 +f 16/28/4 15/29/4 6/30/4 5/31/4 +g tunnel_tube_slant_Cube.002_Front +usemtl Front +f 2/10/5 11/32/5 12/25/5 3/16/5 +f 15/29/5 14/33/5 7/23/5 6/34/5 +g tunnel_tube_slant_Cube.002_Back +usemtl Back +f 9/1/6 1/35/6 8/36/6 10/2/6 +f 13/21/6 16/37/6 5/38/6 4/39/6 diff --git a/models/tunnel_tube_slant_full.mtl b/models/tunnel_tube_slant_full.mtl new file mode 100644 index 0000000..b33fe71 --- /dev/null +++ b/models/tunnel_tube_slant_full.mtl @@ -0,0 +1,62 @@ +# Blender MTL File: 'tunnel tube base.blend' +# Material Count: 6 + +newmtl Back +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Bottom +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Front +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Left +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Right +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 + +newmtl Top +Ns 96.078431 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 diff --git a/models/tunnel_tube_slant_full.obj b/models/tunnel_tube_slant_full.obj new file mode 100644 index 0000000..070b1ef --- /dev/null +++ b/models/tunnel_tube_slant_full.obj @@ -0,0 +1,94 @@ +# Blender v2.77 (sub 0) OBJ File: 'tunnel tube base.blend' +# www.blender.org +mtllib tunnel_tube_slant_full.mtl +o tunnel_tube_slant_Cube.002 +v 0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 -0.500000 0.500000 +v -0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 0.250000 +v 0.250000 -0.500000 -0.250000 +v -0.250000 -0.500000 -0.250000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 0.500000 -1.500000 +v -0.500000 0.500000 -1.500000 +v 0.500000 0.500000 -0.500000 +v -0.500000 0.500000 -0.500000 +v -0.250000 0.500000 -0.750000 +v -0.250000 0.500000 -1.250000 +v 0.250000 0.500000 -1.250000 +v 0.250000 0.500000 -0.750000 +vt 1.0000 1.0000 +vt 0.0000 1.0000 +vt 0.2500 0.7500 +vt 0.7500 0.7500 +vt 0.7500 0.2500 +vt 1.0000 -0.0000 +vt -0.0000 0.0000 +vt 0.2500 0.2500 +vt 1.0000 1.0000 +vt 1.0000 0.0000 +vt 0.7500 0.2500 +vt 0.7500 0.7500 +vt 0.2500 0.7500 +vt 0.0000 1.0000 +vt 0.2500 0.2500 +vt -0.0000 0.0000 +vt 1.0000 0.0000 +vt 2.0000 1.0000 +vt 1.0000 1.0000 +vt 0.0000 0.0000 +vt 1.7500 1.0000 +vt 1.2500 1.0000 +vt 0.2500 0.0000 +vt 0.7500 0.0000 +vt 1.0000 1.0000 +vt 2.0000 1.0000 +vt 1.0000 0.0000 +vt 1.2500 1.0000 +vt 1.7500 1.0000 +vt 0.7500 0.0000 +vt 0.2500 0.0000 +vt -0.0000 1.0000 +vt 0.7500 1.2500 +vt 0.2500 1.2500 +vt 0.2500 0.2500 +vt 0.7500 0.2500 +vt 0.0000 0.0000 +vt 0.2500 1.2500 +vt 0.7500 1.2500 +vn 0.0000 1.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 0.7071 0.7071 +vn 0.0000 -0.7071 -0.7071 +g tunnel_tube_slant_Cube.002_Top +usemtl Top +s off +f 9/1/1 10/2/1 14/3/1 15/4/1 +f 9/1/1 15/4/1 16/5/1 11/6/1 +f 14/3/1 10/2/1 12/7/1 13/8/1 +f 11/6/1 16/5/1 13/8/1 12/7/1 +g tunnel_tube_slant_Cube.002_Bottom +usemtl Bottom +f 1/9/2 2/10/2 5/11/2 6/12/2 +f 1/9/2 6/12/2 7/13/2 8/14/2 +f 8/14/2 7/13/2 4/15/2 3/16/2 +f 5/11/2 2/10/2 3/16/2 4/15/2 +g tunnel_tube_slant_Cube.002_Right +usemtl Right +f 1/17/3 9/18/3 11/19/3 2/20/3 +f 14/21/3 13/22/3 4/23/3 7/24/3 +g tunnel_tube_slant_Cube.002_Left +usemtl Left +f 3/16/4 12/25/4 10/26/4 8/27/4 +f 16/28/4 15/29/4 6/30/4 5/31/4 +g tunnel_tube_slant_Cube.002_Front +usemtl Front +f 2/10/5 11/19/5 12/32/5 3/16/5 +f 15/33/5 14/34/5 7/35/5 6/36/5 +g tunnel_tube_slant_Cube.002_Back +usemtl Back +f 9/1/6 1/17/6 8/37/6 10/2/6 +f 13/38/6 16/39/6 5/11/6 4/15/6 diff --git a/trees/tunnel_tube.lua b/trees/tunnel_tube.lua index 4df96f0..9f812b3 100644 --- a/trees/tunnel_tube.lua +++ b/trees/tunnel_tube.lua @@ -35,6 +35,94 @@ minetest.register_node("dfcaverns:tunnel_tube", { }, }) +minetest.register_node("dfcaverns:tunnel_tube_slant_bottom", { + description = S("Tunnel Tube"), + _doc_items_longdesc = dfcaverns.doc.tunnel_tube_desc, + _doc_items_usagehelp = dfcaverns.doc.tunnel_tube_usage, + tiles = {"dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png"}, + paramtype2 = "facedir", + drawtype = "mesh", + mesh = "tunnel_tube_slant.obj", + paramtype = "light", + drop = "dfcaverns:tunnel_tube", + groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.625, 0.5, 0.0, 0.375}, + {-0.5, 0.0, -0.875, 0.5, 0.5, 0.125}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.625, 0.5, 0.0, 0.375}, + {-0.5, 0.0, -0.875, 0.5, 0.5, 0.125}, + }, + }, + +}) + +minetest.register_node("dfcaverns:tunnel_tube_slant_top", { + description = S("Tunnel Tube"), + _doc_items_longdesc = dfcaverns.doc.tunnel_tube_desc, + _doc_items_usagehelp = dfcaverns.doc.tunnel_tube_usage, + tiles = {"dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png"}, + paramtype2 = "facedir", + drawtype = "mesh", + mesh = "tunnel_tube_slant_2.obj", + paramtype = "light", + drop = "dfcaverns:tunnel_tube", + groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.125, 0.5, 0.0, 0.875}, + {-0.5, 0.0, -0.375, 0.5, 0.5, 0.625}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.125, 0.5, 0.0, 0.875}, + {-0.5, 0.0, -0.375, 0.5, 0.5, 0.625}, + }, + }, +}) + +minetest.register_node("dfcaverns:tunnel_tube_slant_full", { + description = S("Tunnel Tube"), + _doc_items_longdesc = dfcaverns.doc.tunnel_tube_desc, + _doc_items_usagehelp = dfcaverns.doc.tunnel_tube_usage, + tiles = {"dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png", "dfcaverns_tunnel_tube.png"}, + paramtype2 = "facedir", + drawtype = "mesh", + mesh = "tunnel_tube_slant_full.obj", + paramtype = "light", + drop = "dfcaverns:tunnel_tube", + groups = {choppy = 3, tree = 1, oddly_breakable_by_hand=1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.75, 0.5, 0, 0.25}, + {-0.5, 0, -1.25, 0.5, 0.5, -0.25}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.75, 0.5, 0, 0.25}, + {-0.5, 0, -1.25, 0.5, 0.5, -0.25}, + }, + }, +}) + --Wood minetest.register_craft({ output = 'dfcaverns:tunnel_tube_wood 4', @@ -218,23 +306,27 @@ minetest.register_node("dfcaverns:tunnel_tube_sapling", { }) local tunnel_tube_directions = { - {x=1,y=0,z=0}, - {x=-1,y=0,z=0}, - {x=0,y=0,z=1}, - {x=0,y=0,z=-1}, --- {x=1,y=0,z=1}, -- diagonals work, but they don't look as nice as orthogonals --- {x=-1,y=0,z=1}, --- {x=1,y=0,z=-1}, --- {x=-1,y=0,z=-1}, + [0] = {x=0,y=0,z=-1}, + [1] = {x=-1,y=0,z=0}, + [2] = {x=0,y=0,z=1}, + [3] = {x=1,y=0,z=0}, } -local tunnel_tube_curvature = {0,0,0,0,1,1,1,2,2,3,4} +local tunnel_tube_displacement = +{ + [4] = 1, + [5] = 1, + [6] = 2, + [7] = 2, + [8] = 3, + [9] = 3, +} dfcaverns.spawn_tunnel_tube = function(pos) - local direction = tunnel_tube_directions[math.random(1,4)] - local height = math.random(6,10) + local direction = math.random(0,3) -- serves as both the facedir and the lookup in the direction table + local height = math.random(4,9) local x, y, z = pos.x, pos.y, pos.z - local top_pos = vector.add(pos, vector.multiply(direction, tunnel_tube_curvature[height])) + local top_pos = vector.add(pos, vector.multiply(tunnel_tube_directions[direction], tunnel_tube_displacement[height])) top_pos.y = y + height - 1 local vm = minetest.get_voxel_manip() @@ -254,28 +346,41 @@ end local c_air = minetest.get_content_id("air") local c_ignore = minetest.get_content_id("ignore") local c_tunnel_tube = minetest.get_content_id("dfcaverns:tunnel_tube") +local c_tunnel_tube_bottom = minetest.get_content_id("dfcaverns:tunnel_tube_slant_bottom") +local c_tunnel_tube_top = minetest.get_content_id("dfcaverns:tunnel_tube_slant_top") +local c_tunnel_tube_full = minetest.get_content_id("dfcaverns:tunnel_tube_slant_full") local c_tunnel_tube_fruiting_body = minetest.get_content_id("dfcaverns:tunnel_tube_fruiting_body") +-- was simplest to just hardcode these patterns for each height from 4 to 9 +-- pattern is displacement, node +local tunnel_tube_patterns = +{ + [4] = {{0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_fruiting_body}}, + [5] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_fruiting_body}}, + [6] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_fruiting_body}}, + [7] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_fruiting_body}}, + [8] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_full}, {3, c_tunnel_tube_fruiting_body}}, + [9] = {{0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube}, {0, c_tunnel_tube_bottom}, {1, c_tunnel_tube_top}, {1, c_tunnel_tube_full}, {2, c_tunnel_tube_full}, {3, c_tunnel_tube_fruiting_body}}, +} + dfcaverns.spawn_tunnel_tube_vm = function(vi, area, data, param2_data, height, direction) - if not height then height = math.random(6, 10) end - if not direction then direction = tunnel_tube_directions[math.random(1,4)] end + if not height then height = math.random(4, 9) end + if direction == nil then direction = math.random(0,3) end local pos = area:position(vi) local y = pos.y local previous_vi = vi - for i = 1, height do + local pattern = tunnel_tube_patterns[height] + for i, nodepattern in ipairs(pattern) do pos.y = y + i - 1 - vi = area:indexp(vector.add(pos, vector.multiply(direction, tunnel_tube_curvature[i]))) + vi = area:indexp(vector.add(pos, vector.multiply(tunnel_tube_directions[direction], nodepattern[1]))) if data[vi] == c_air or data[vi] == c_ignore then previous_vi = vi - if i ~= height then - data[vi] = c_tunnel_tube - param2_data[vi] = 0 - else - data[vi] = c_tunnel_tube_fruiting_body - end + data[vi] = nodepattern[2] + param2_data[vi] = direction else data[previous_vi] = c_tunnel_tube_fruiting_body + param2_data[vi] = direction break end end From cd433bb8eb543e3ffbef00bac4587d0a3e317a14 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Mon, 21 May 2018 13:23:25 -0600 Subject: [PATCH 11/25] doc update, a bit more diversity to black cap caverns --- biomes/level2.lua | 21 +++- biomes/level3.lua | 28 ++++- doc.lua | 22 +++- features/flowstone_nodes.lua | 12 +- features/glow_crystals.lua | 16 +++ locale/it.po | 218 ++++++++++++++++++++++++----------- locale/template.pot | 218 ++++++++++++++++++++++++----------- trees/black_cap.lua | 10 +- 8 files changed, 394 insertions(+), 151 deletions(-) diff --git a/biomes/level2.lua b/biomes/level2.lua index d7c4450..17028d3 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -10,6 +10,7 @@ local c_stone = minetest.get_content_id("default:stone") local c_cobble = minetest.get_content_id("default:cobble") local c_mossycobble = minetest.get_content_id("default:mossycobble") local c_dirt = minetest.get_content_id("default:dirt") +local c_stone_with_coal = minetest.get_content_id("default:stone_with_coal") 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") @@ -109,7 +110,7 @@ local level_2_black_cap_floor = function(area, data, ai, vi, bi, param2_data) end if math.random() < 0.25 then - data[bi] = c_dirt + data[bi] = c_stone_with_coal else data[bi] = c_cobble_fungus end @@ -259,6 +260,20 @@ local level_2_dry_ceiling = function(area, data, ai, vi, bi, param2_data) end end +local level_2_black_cap_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + local drip_rand = subterrane:vertically_consistent_random(vi, area) + 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, dfcaverns.dry_stalagmite_ids) + elseif math.random() < 0.25 then + data[ai] = c_stone_with_coal + end +end + local level_2_crystal_ceiling = function(area, data, ai, vi, bi, param2_data) if data[ai] ~= c_stone then return @@ -498,7 +513,7 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 20, - _subterrane_ceiling_decor = level_2_dry_ceiling, + _subterrane_ceiling_decor = level_2_black_cap_ceiling, _subterrane_floor_decor = level_2_black_cap_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, @@ -513,7 +528,7 @@ minetest.register_biome({ y_max = dfcaverns.config.level1_min, heat_point = 50, humidity_point = 20, - _subterrane_ceiling_decor = level_2_dry_ceiling, + _subterrane_ceiling_decor = level_2_black_cap_ceiling, _subterrane_floor_decor = level_2_black_cap_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, diff --git a/biomes/level3.lua b/biomes/level3.lua index e1f2759..7fea466 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -12,6 +12,7 @@ local c_cobble = minetest.get_content_id("default:cobble") local c_mossycobble = minetest.get_content_id("default:mossycobble") local c_dirt = minetest.get_content_id("default:dirt") local c_sand = minetest.get_content_id("default:sand") +local c_stone_with_coal = minetest.get_content_id("default:stone_with_coal") local c_silver_sand = minetest.get_content_id("default:silver_sand") local c_snow = minetest.get_content_id("default:snow") @@ -143,6 +144,21 @@ local level_3_dry_ceiling = function(area, data, ai, vi, bi, param2_data) end end +local level_3_black_cap_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + local drip_rand = subterrane:vertically_consistent_random(vi, area) + 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, dfcaverns.dry_stalagmite_ids) + elseif math.random() < 0.25 then + data[ai] = c_stone_with_coal + end +end + + local level_3_crystal_ceiling = function(area, data, ai, vi, bi, param2_data) if data[ai] ~= c_stone then return @@ -173,7 +189,7 @@ local level_3_blood_thorn_floor = function(area, data, ai, vi, bi, param2_data) local drip_rand = subterrane:vertically_consistent_random(vi, area) if math.random() < 0.1 then - dfcaverns.place_shrub(data, vi, param2_data, {c_sweet_pod, c_sweet_pod, c_plump_helmet, c_dead_fungus, c_dead_fungus, c_dead_fungus, c_cavern_fungi}) + dfcaverns.place_shrub(data, vi, param2_data, {c_sweet_pod, c_sweet_pod, c_dead_fungus, c_dead_fungus, c_dead_fungus, c_cavern_fungi}) 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) @@ -201,7 +217,7 @@ local level_3_nether_cap_floor = function(area, data, ai, vi, bi, param2_data) local drip_rand = subterrane:vertically_consistent_random(vi, area) if math.random() < 0.01 and data[bi] ~= c_ice then - dfcaverns.place_shrub(data, vi, param2_data, {c_dimple_cup, c_plump_helmet, c_dead_fungus, c_dead_fungus, c_dead_fungus, c_cavern_fungi}) + dfcaverns.place_shrub(data, vi, param2_data, {c_dimple_cup, c_dead_fungus, c_dead_fungus, c_dead_fungus, c_cavern_fungi}) 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) @@ -269,7 +285,7 @@ local level_3_black_cap_floor = function(area, data, ai, vi, bi, param2_data) end if math.random() < 0.25 then - data[bi] = c_dirt + data[bi] = c_stone_with_coal else data[bi] = c_cobble_fungus end @@ -303,7 +319,7 @@ local level_3_goblin_cap_floor = function(area, data, ai, vi, bi, param2_data) local drip_rand = subterrane:vertically_consistent_random(vi, area) if math.random() < 0.1 then - dfcaverns.place_shrub(data, vi, param2_data, {c_plump_helmet, c_sweet_pod, c_sweet_pod, c_quarry_bush, c_dead_fungus, c_cavern_fungi}) + dfcaverns.place_shrub(data, vi, param2_data, {c_plump_helmet, c_plump_helmet, c_sweet_pod, c_dead_fungus, c_cavern_fungi}) 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) @@ -543,7 +559,7 @@ minetest.register_biome({ y_max = subsea_level, heat_point = 50, humidity_point = 15, - _subterrane_ceiling_decor = level_3_dry_ceiling, + _subterrane_ceiling_decor = level_3_black_cap_ceiling, _subterrane_floor_decor = level_3_black_cap_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, @@ -560,7 +576,7 @@ minetest.register_biome({ y_max = dfcaverns.config.level2_min, heat_point = 50, humidity_point = 15, - _subterrane_ceiling_decor = level_3_dry_ceiling, + _subterrane_ceiling_decor = level_3_black_cap_ceiling, _subterrane_floor_decor = level_3_black_cap_floor, _subterrane_fill_node = c_air, _subterrane_column_node = c_dry_flowstone, diff --git a/doc.lua b/doc.lua index 03ebe3f..748f245 100644 --- a/doc.lua +++ b/doc.lua @@ -16,13 +16,31 @@ dfcaverns.doc.roast_desc = S("Four finely minced ingredients combine into a roas dfcaverns.doc.roast_usage = nil dfcaverns.doc.cave_moss_desc = S("Cave moss is technically a form of mold, but fortunately a relatively benign one given its ubiquity. Its fibers form a tough but springy mat over the surface of any organic-rich soil that accumulates deep underground.") -dfcaverns.doc.cave_moss_usage = S("Cave moss has no known uses. It dies when exposed to bright light sources.") +dfcaverns.doc.cave_moss_usage = S("Cave moss has no known uses aside from the faint glow it emits. It dies when exposed to bright light sources such as the Sun.") dfcaverns.doc.floor_fungus_desc = S("Floor fungus produces a thin, slick film that spreads through the cracks of broken rock. Its ability to subsist on the tiniest traces of nutrients means it's found in relatively harsh underground environments.") dfcaverns.doc.floor_fungus_usage = S("Floor fungus has no known uses. It can penetrate deeply into cobblestone constructions if an infestation gets hold, but it is difficult to transport and is inhibited by light so it hasn't spread beyond the deep caverns.") dfcaverns.doc.glow_worms_desc = S("Glistening strings of silk hang from the ceilings of some of the larger caverns, lit by the millions of tiny bioluminescent worms that spun them. Glow worms prey on the insects they lure and entangle with their faux starry sky - and sometimes the occasional bat or other larger flying beast.") dfcaverns.doc.glow_worms_usage = S("Glow worms can be harvested and used as a source of light but they die when exposed to light significantly brighter than themselves or when immersed in water. A colony of glow worms hung in a hospitable environment will undergo a modest amount of growth, allowing it to be divided and propagated.") + +dfcaverns.doc.flowstone_desc = S("Flowstone is a carbonate-rich rock formation deposited by flowing water. It consists of minerals that the water dissolved earlier as it widens cracks and fissures into caves.") +dfcaverns.doc.flowstone_usage = S("Aside from the aesthetic beauty of its formations flowstone has no special properties or uses.") +dfcaverns.doc.dripstone_desc = S("The iconic stalactites and stalagmites found in caverns are composed of flowstone (or 'dripstone' in the case of these formations). Moist dripstone is still undergoing growth, whereas dry dripstone is found in 'dead' caverns once the source of water that created them ceases.") +dfcaverns.doc.dripstone_usage = S("Although stalagmites are blunter than the stalactites above them, they can cause extra damage to the unwary caver who falls on them.") +dfcaverns.doc.icicle_desc = S("Ice formed by water dripping slowly into a cold environment, icicles tend to be exceptionally pure and clear.") +dfcaverns.doc.icicle_usage = S("Falling onto an icicle is particularly damaging.") + + +dfcaverns.doc.glow_mese_desc = S("Deep in the infernal conditions of the magma sea, over the course of millions of years, mese crystals grow into flawless blocks that glow bright with strange energies.") +dfcaverns.doc.glow_mese_usage = S("These blocks can be broken down into a large number of mese crystals, but cannot be artificially reassembled.") + +dfcaverns.doc.glow_ruby_ore_desc = S("Large, dry caverns deep underground are well suited to aeons-long processes that concentrate crystalline substances in their walls. This rock is riddled with veins of the stuff.") +dfcaverns.doc.glow_ruby_ore_usage = S("Aside from its aesthetic value this rock has no particular use.") + +dfcaverns.doc.big_crystal_desc = S("Monolithic crystals of this size form only over extremely long periods deep underground, in large long-lived cavities that allow them room to grow. Water and the life it hosts tend to disrupt the formation process of these crystals so they're only found in dry environments.") +dfcaverns.doc.big_crystal_usage = S("Aside from its aesthetic value this crystal has no particular use.") + -- Plants dfcaverns.doc.dead_fungus_desc = S("Whatever this fungus was in life, it is now dead.") @@ -70,7 +88,7 @@ dfcaverns.doc.sweet_pod_syrup_usage = S("Too strong and thick to drink straight, -- Trees dfcaverns.doc.black_cap_desc = S("The dense black wood of these mushrooms is heavy and hard to work with, and has few remarkable properties.") -dfcaverns.doc.black_cap_usage = S("Aside from the artistic applications of its particularly dark color, black cap wood is a long-burning fuel source that's as good as coal for some applications.") +dfcaverns.doc.black_cap_usage = S("Aside from the artistic applications of its particularly dark color, black cap wood is a long-burning fuel source that's as good as coal for some applications. Black cap gills are oily and make for excellent torch fuel.") dfcaverns.doc.blood_thorn_desc = S("Blood thorns are the most vicious of underground flora, as befits their harsh environments. Found only in hot, dry caverns with sandy soil far from the surface world's organic bounty, blood thorns seek to supplement their nutrient supply with wickedly barbed hollow spines that actively drain fluids from whatever stray plant or creature they might impale.") dfcaverns.doc.blood_thorn_usage = S("When harvested, the central stalk of a blood thorn can be cut into planks and used as wood. It has a purple-red hue that may or may not appeal, depending on one's artistic tastes.") diff --git a/features/flowstone_nodes.lua b/features/flowstone_nodes.lua index 94ca3e6..a8bbe43 100644 --- a/features/flowstone_nodes.lua +++ b/features/flowstone_nodes.lua @@ -17,6 +17,8 @@ minetest.register_alias("subterrane:dry_flowstone", "dfcaverns:dry_flowstone") subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", { description = S("Dry Dripstone"), + _doc_items_longdesc = dfcaverns.doc.dripstone_desc, + _doc_items_usagehelp = dfcaverns.doc.dripstone_usage, tiles = { "default_stone.png^[brighten", }, @@ -26,6 +28,8 @@ subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", { minetest.register_node("dfcaverns:dry_flowstone", { description = S("Dry Flowstone"), + _doc_items_longdesc = dfcaverns.doc.flowstone_desc, + _doc_items_usagehelp = dfcaverns.doc.flowstone_usage, tiles = {"default_stone.png^[brighten"}, groups = {cracky = 3, stone = 1}, is_ground_content = true, @@ -36,7 +40,9 @@ minetest.register_node("dfcaverns:dry_flowstone", { ----------------------------------------------- subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", { - description = S("Dry Dripstone"), + description = S("Wet Dripstone"), + _doc_items_longdesc = dfcaverns.doc.dripstone_desc, + _doc_items_usagehelp = dfcaverns.doc.dripstone_usage, tiles = { "default_stone.png^[brighten^dfcaverns_dripstone_streaks.png", }, @@ -47,6 +53,8 @@ subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", { minetest.register_node("dfcaverns:wet_flowstone", { description = S("Wet Flowstone"), + _doc_items_longdesc = dfcaverns.doc.flowstone_desc, + _doc_items_usagehelp = dfcaverns.doc.flowstone_usage, tiles = {"default_stone.png^[brighten^dfcaverns_dripstone_streaks.png"}, groups = {cracky = 3, stone = 1, subterrane_wet_dripstone = 1}, is_ground_content = true, @@ -58,6 +66,8 @@ minetest.register_node("dfcaverns:wet_flowstone", { subterrane.register_stalagmite_nodes("dfcaverns:icicle", { description = S("Icicle"), + _doc_items_longdesc = dfcaverns.doc.icicle_desc, + _doc_items_usagehelp = dfcaverns.doc.icicle_usage, tiles = { "default_ice.png", }, diff --git a/features/glow_crystals.lua b/features/glow_crystals.lua index 920b949..7ad9475 100644 --- a/features/glow_crystals.lua +++ b/features/glow_crystals.lua @@ -5,6 +5,8 @@ local S, NS = dofile(MP.."/intllib.lua") --glowing mese crystal blocks minetest.register_node("dfcaverns:glow_mese", { description = S("Flawless Mese Block"), + _doc_items_longdesc = dfcaverns.doc.glow_mese_desc, + _doc_items_usagehelp = dfcaverns.doc.glow_mese_usage, tiles = {"dfcaverns_glow_mese.png"}, is_ground_content = true, groups = {cracky=3}, @@ -25,6 +27,8 @@ minetest.register_craft({ minetest.register_node("dfcaverns:glow_ruby_ore", { description = S("Crystal Vein"), + _doc_items_longdesc = dfcaverns.doc.glow_ruby_ore_desc, + _doc_items_usagehelp = dfcaverns.doc.glow_ruby_ore_usage, tiles = {"dfcaverns_glow_ruby_ore.png"}, is_ground_content = true, groups = {cracky=2}, @@ -34,6 +38,8 @@ minetest.register_node("dfcaverns:glow_ruby_ore", { minetest.register_node("dfcaverns:big_crystal", { description = S("Giant Crystal"), + _doc_items_longdesc = dfcaverns.doc.big_crystal_desc, + _doc_items_usagehelp = dfcaverns.doc.big_crystal_usage, drawtype = "mesh", mesh = "hex_crystal_big.obj", tiles = { @@ -59,6 +65,8 @@ minetest.register_node("dfcaverns:big_crystal", { minetest.register_node("dfcaverns:med_crystal", { description = S("Big Crystal"), + _doc_items_longdesc = dfcaverns.doc.big_crystal_desc, + _doc_items_usagehelp = dfcaverns.doc.big_crystal_usage, drawtype = "mesh", mesh = "hex_crystal_med.obj", tiles = { @@ -85,6 +93,8 @@ minetest.register_node("dfcaverns:med_crystal", { minetest.register_node("dfcaverns:big_crystal_30", { description = S("Giant Crystal"), + _doc_items_longdesc = dfcaverns.doc.big_crystal_desc, + _doc_items_usagehelp = dfcaverns.doc.big_crystal_usage, drawtype = "mesh", mesh = "hex_crystal_30_big.obj", tiles = { @@ -134,6 +144,8 @@ minetest.register_node("dfcaverns:big_crystal_30", { minetest.register_node("dfcaverns:med_crystal_30", { description = S("Big Crystal"), + _doc_items_longdesc = dfcaverns.doc.big_crystal_desc, + _doc_items_usagehelp = dfcaverns.doc.big_crystal_usage, drawtype = "mesh", mesh = "hex_crystal_30_med.obj", tiles = { @@ -168,6 +180,8 @@ minetest.register_node("dfcaverns:med_crystal_30", { minetest.register_node("dfcaverns:big_crystal_30_45", { description = S("Giant Crystal"), + _doc_items_longdesc = dfcaverns.doc.big_crystal_desc, + _doc_items_usagehelp = dfcaverns.doc.big_crystal_usage, drawtype = "mesh", mesh = "hex_crystal_30_45_big.obj", tiles = { @@ -203,6 +217,8 @@ minetest.register_node("dfcaverns:big_crystal_30_45", { minetest.register_node("dfcaverns:med_crystal_30_45", { description = S("Big Crystal"), + _doc_items_longdesc = dfcaverns.doc.big_crystal_desc, + _doc_items_usagehelp = dfcaverns.doc.big_crystal_usage, drawtype = "mesh", mesh = "hex_crystal_30_45_med.obj", tiles = { diff --git a/locale/it.po b/locale/it.po index 1e7d094..3a41ba3 100644 --- a/locale/it.po +++ b/locale/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dfcaverns module's Italian locale\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-20 00:42-0600\n" +"POT-Creation-Date: 2018-05-21 13:21-0600\n" "PO-Revision-Date: 2017-08-17 23:01+0100\n" "Last-Translator: H4mlet \n" "Language-Team: ITALIANO\n" @@ -45,7 +45,8 @@ msgstr "" #: doc.lua:19 msgid "" -"Cave moss has no known uses. It dies when exposed to bright light sources." +"Cave moss has no known uses aside from the faint glow it emits. It dies when " +"exposed to bright light sources such as the Sun." msgstr "" #: doc.lua:20 @@ -78,106 +79,179 @@ msgid "" "a modest amount of growth, allowing it to be divided and propagated." msgstr "" +#: doc.lua:27 +msgid "" +"Flowstone is a carbonate-rich rock formation deposited by flowing water. It " +"consists of minerals that the water dissolved earlier as it widens cracks " +"and fissures into caves." +msgstr "" + #: doc.lua:28 -msgid "Whatever this fungus was in life, it is now dead." +msgid "" +"Aside from the aesthetic beauty of its formations flowstone has no special " +"properties or uses." msgstr "" #: doc.lua:29 msgid "" +"The iconic stalactites and stalagmites found in caverns are composed of " +"flowstone (or 'dripstone' in the case of these formations). Moist dripstone " +"is still undergoing growth, whereas dry dripstone is found in 'dead' caverns " +"once the source of water that created them ceases." +msgstr "" + +#: doc.lua:30 +msgid "" +"Although stalagmites are blunter than the stalactites above them, they can " +"cause extra damage to the unwary caver who falls on them." +msgstr "" + +#: doc.lua:31 +msgid "" +"Ice formed by water dripping slowly into a cold environment, icicles tend to " +"be exceptionally pure and clear." +msgstr "" + +#: doc.lua:32 +msgid "Falling onto an icicle is particularly damaging." +msgstr "" + +#: doc.lua:35 +msgid "" +"Deep in the infernal conditions of the magma sea, over the course of " +"millions of years, mese crystals grow into flawless blocks that glow bright " +"with strange energies." +msgstr "" + +#: doc.lua:36 +msgid "" +"These blocks can be broken down into a large number of mese crystals, but " +"cannot be artificially reassembled." +msgstr "" + +#: doc.lua:38 +msgid "" +"Large, dry caverns deep underground are well suited to aeons-long processes " +"that concentrate crystalline substances in their walls. This rock is riddled " +"with veins of the stuff." +msgstr "" + +#: doc.lua:39 +msgid "Aside from its aesthetic value this rock has no particular use." +msgstr "" + +#: doc.lua:41 +msgid "" +"Monolithic crystals of this size form only over extremely long periods deep " +"underground, in large long-lived cavities that allow them room to grow. " +"Water and the life it hosts tend to disrupt the formation process of these " +"crystals so they're only found in dry environments." +msgstr "" + +#: doc.lua:42 +msgid "Aside from its aesthetic value this crystal has no particular use." +msgstr "" + +#: doc.lua:46 +msgid "Whatever this fungus was in life, it is now dead." +msgstr "" + +#: doc.lua:47 +msgid "" "Dead fungus quickly decays into an unrecognizable mess. It can be used as " "weak fuel or terrible decor." msgstr "" -#: doc.lua:31 +#: doc.lua:49 msgid "" "A species of lavender mushroom ubiquitous in caves that is most notable for " "the soft bioluminescence it produces." msgstr "" -#: doc.lua:32 +#: doc.lua:50 msgid "" "This mushroom is inedible but continues producing modest levels of light " "long after it's picked." msgstr "" -#: doc.lua:34 +#: doc.lua:52 msgid "" "Cave wheat is literally a breed of grain-producing grass that somehow lost " "its ability to photosynthesize and adapted to a more fungal style of life." msgstr "" -#: doc.lua:35 +#: doc.lua:53 msgid "" "Like its surface cousin, cave wheat produces grain that can be ground into a " "form of flour." msgstr "" -#: doc.lua:36 +#: doc.lua:54 msgid "Cave wheat seed ground into a powder suitable for cooking." msgstr "" -#: doc.lua:37 +#: doc.lua:55 msgid "" "When baked alone it forms an edible bread, but it combines well with other " "more flavorful ingredients." msgstr "" -#: doc.lua:38 +#: doc.lua:56 msgid "" "Bread baked from cave wheat flour is tough and durable. A useful ration for " "long expeditions." msgstr "" -#: doc.lua:39 +#: doc.lua:57 msgid "It's not tasty, but it keeps you going." msgstr "" -#: doc.lua:41 +#: doc.lua:59 msgid "" "The distinctive midnight-blue caps of these mushrooms are inverted, exposing " "their gills to any breeze that might pass, and have dimpled edges that give " "them their name." msgstr "" -#: doc.lua:42 +#: doc.lua:60 msgid "" "Dimple cups can be dried, ground, and processed to extract a deep blue dye." msgstr "" -#: doc.lua:44 +#: doc.lua:62 msgid "" "Pig tails are a fibrous fungal growth that's most notable for its twisting " "stalks. In a mature stand of pig tails the helical stalks intertwine into a " "dense mesh." msgstr "" -#: doc.lua:45 +#: doc.lua:63 msgid "Pig tail stalks can be processed to extract fibers useful as thread." msgstr "" -#: doc.lua:46 +#: doc.lua:64 msgid "Threads of pig tail fiber." msgstr "" -#: doc.lua:47 +#: doc.lua:65 msgid "" "A crafting item that can be woven into textiles and other similar items." msgstr "" -#: doc.lua:49 +#: doc.lua:67 msgid "" "Plump helmets are a thick, fleshy mushroom that's edible picked straight " "from the ground. They form a staple diet for both lost cave explorers and " "the fauna that preys on them." msgstr "" -#: doc.lua:50 +#: doc.lua:68 msgid "" "While they can be eaten fresh, they can be monotonous fare and are perhaps " "better appreciated as part of a more complex prepared dish." msgstr "" -#: doc.lua:52 +#: doc.lua:70 msgid "" "A rare breed of fungus from deep underground that produces a bushy cluster " "of rumpled gray 'blades'. The biological function of these blades is not " @@ -185,24 +259,24 @@ msgid "" "the blade's base." msgstr "" -#: doc.lua:53 +#: doc.lua:71 msgid "" "Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are " "edible with processing." msgstr "" -#: doc.lua:54 +#: doc.lua:72 msgid "" "The dried blades of a quarry bush add a welcome zing to recipes containing " "otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten " "on their own." msgstr "" -#: doc.lua:55 +#: doc.lua:73 msgid "Quarry bush leaves can be used as an ingredient in foodstuffs." msgstr "" -#: doc.lua:57 +#: doc.lua:75 msgid "" "Sweet pods grow in rich soil, and once they reach maturity they draw that " "supply of nutrients up to concentrate it in their fruiting bodies. They turn " @@ -210,52 +284,52 @@ msgid "" "the sugars they contain." msgstr "" -#: doc.lua:60 +#: doc.lua:78 msgid "When milled, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:62 +#: doc.lua:80 msgid "When dried in an oven, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:64 +#: doc.lua:82 msgid "Crushing them in a bucket squeezes out a flavorful syrup." msgstr "" -#: doc.lua:66 +#: doc.lua:84 msgid "Sweet pod sugar has a pink tint to it." msgstr "" -#: doc.lua:67 +#: doc.lua:85 msgid "" "Too sweet to be eaten directly, it makes an excellent ingredient in food " "recipes." msgstr "" -#: doc.lua:68 +#: doc.lua:86 msgid "Sweet pod syrup is thick and flavorful." msgstr "" -#: doc.lua:69 +#: doc.lua:87 msgid "" "Too strong and thick to drink straight, sweet pod syrup is useful in food " "recipes." msgstr "" -#: doc.lua:72 +#: doc.lua:90 msgid "" "The dense black wood of these mushrooms is heavy and hard to work with, and " "has few remarkable properties." msgstr "" -#: doc.lua:73 +#: doc.lua:91 msgid "" "Aside from the artistic applications of its particularly dark color, black " "cap wood is a long-burning fuel source that's as good as coal for some " -"applications." +"applications. Black cap gills are oily and make for excellent torch fuel." msgstr "" -#: doc.lua:75 +#: doc.lua:93 msgid "" "Blood thorns are the most vicious of underground flora, as befits their " "harsh environments. Found only in hot, dry caverns with sandy soil far from " @@ -264,14 +338,14 @@ msgid "" "fluids from whatever stray plant or creature they might impale." msgstr "" -#: doc.lua:76 +#: doc.lua:94 msgid "" "When harvested, the central stalk of a blood thorn can be cut into planks " "and used as wood. It has a purple-red hue that may or may not appeal, " "depending on one's artistic tastes." msgstr "" -#: doc.lua:77 +#: doc.lua:95 msgid "" "The spikes of a blood thorn can actually remain living long after they're " "severed from their parent stalk, a testament to their tenacity. As long as " @@ -279,39 +353,39 @@ msgid "" "puncture, though they don't grow." msgstr "" -#: doc.lua:78 +#: doc.lua:96 msgid "" "Living blood thorn spikes remain harmful to creatures that touch them. If " "killed by bright light, they cause only passive damage to creatures that " "fall on them (as one would expect from an enormous spike)." msgstr "" -#: doc.lua:80 +#: doc.lua:98 msgid "" "Thin, irregular layers of spore-producing 'shelves' surround the strong " "central stalk of the mighty Fungiwood." msgstr "" -#: doc.lua:81 +#: doc.lua:99 msgid "" "Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted " "lumber when cut. Fungiwood shelf is too fragile to be much use as anything " "other than fuel." msgstr "" -#: doc.lua:83 +#: doc.lua:101 msgid "" "Massive but squat, mature goblin cap mushrooms are the size of small " "cottages." msgstr "" -#: doc.lua:84 +#: doc.lua:102 msgid "" "Goblin cap stem and cap material can be cut into wood of two different hues, " "a subdued cream and a bright orange-red." msgstr "" -#: doc.lua:86 +#: doc.lua:104 msgid "" "Nether caps have an unusual biochemistry that allows them to somehow subsist " "on ambient heat, in violation of all known laws of thermodynamics. They grow " @@ -319,40 +393,40 @@ msgid "" "volcanic." msgstr "" -#: doc.lua:87 +#: doc.lua:105 msgid "" "Nether cap wood, in addition to being a beautiful blue hue, retains the odd " "heat-draining ability of living nether caps and is able to quickly freeze " "nearby water solid." msgstr "" -#: doc.lua:89 +#: doc.lua:107 msgid "" "Spore trees have a sturdy 'trunk' that supports a large spongy mesh of " "branching fibers, with embedded fruiting bodies that produce a copious " "amount of spores that gently rain down around the spore tree's base." msgstr "" -#: doc.lua:90 +#: doc.lua:108 msgid "" "Spore tree trunks can be cut into pale woody planks. The branching fibers " "and fruiting bodies are only useful as fuel." msgstr "" -#: doc.lua:92 +#: doc.lua:110 msgid "The king of the fungi, tower cap mushrooms grow to immense proportions." msgstr "" -#: doc.lua:93 +#: doc.lua:111 msgid "Tower caps are an excellent source of wood." msgstr "" -#: doc.lua:95 +#: doc.lua:113 msgid "" "Tunnel tubes are hollow, curved fungal growths that support a fruiting body." msgstr "" -#: doc.lua:97 +#: doc.lua:115 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material. The fruiting body accumulates high-energy compounds that, when " @@ -360,7 +434,7 @@ msgid "" "tunnel tube spawn through the still cavern air." msgstr "" -#: doc.lua:99 +#: doc.lua:117 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material." @@ -375,19 +449,22 @@ msgid "Cavern Fungi" msgstr "Funghi di caverna" #: features\flowstone_nodes.lua:19 -#: features\flowstone_nodes.lua:39 msgid "Dry Dripstone" msgstr "" -#: features\flowstone_nodes.lua:28 +#: features\flowstone_nodes.lua:30 msgid "Dry Flowstone" msgstr "" -#: features\flowstone_nodes.lua:49 +#: features\flowstone_nodes.lua:43 +msgid "Wet Dripstone" +msgstr "" + +#: features\flowstone_nodes.lua:55 msgid "Wet Flowstone" msgstr "" -#: features\flowstone_nodes.lua:60 +#: features\flowstone_nodes.lua:68 msgid "Icicle" msgstr "" @@ -395,19 +472,19 @@ msgstr "" msgid "Flawless Mese Block" msgstr "" -#: features\glow_crystals.lua:27 +#: features\glow_crystals.lua:29 msgid "Crystal Vein" msgstr "" -#: features\glow_crystals.lua:36 -#: features\glow_crystals.lua:89 -#: features\glow_crystals.lua:159 +#: features\glow_crystals.lua:40 +#: features\glow_crystals.lua:95 +#: features\glow_crystals.lua:182 msgid "Giant Crystal" msgstr "" -#: features\glow_crystals.lua:62 -#: features\glow_crystals.lua:124 -#: features\glow_crystals.lua:195 +#: features\glow_crystals.lua:67 +#: features\glow_crystals.lua:146 +#: features\glow_crystals.lua:219 msgid "Big Crystal" msgstr "" @@ -574,11 +651,11 @@ msgstr "Cappello nero" msgid "Black Cap Gills" msgstr "Lamelle di cappello nero" -#: trees\black_cap.lua:77 +#: trees\black_cap.lua:85 msgid "Black Cap Planks" msgstr "Assi di cappello nero" -#: trees\black_cap.lua:116 +#: trees\black_cap.lua:124 msgid "Black Cap Spawn" msgstr "Prole di cappello nero" @@ -703,19 +780,22 @@ msgid "Tower Cap Spawn" msgstr "Prole di cappello a torre" #: trees\tunnel_tube.lua:16 +#: trees\tunnel_tube.lua:39 +#: trees\tunnel_tube.lua:69 +#: trees\tunnel_tube.lua:98 msgid "Tunnel Tube" msgstr "Tubo di galleria" -#: trees\tunnel_tube.lua:47 +#: trees\tunnel_tube.lua:135 msgid "Tunnel Tube Plies" msgstr "Strati di tubo di galleria" -#: trees\tunnel_tube.lua:82 -#: trees\tunnel_tube.lua:138 -#: trees\tunnel_tube.lua:158 +#: trees\tunnel_tube.lua:170 +#: trees\tunnel_tube.lua:226 +#: trees\tunnel_tube.lua:246 msgid "Tunnel Tube Fruiting Body" msgstr "Corpo fruttifero del tubo di galleria" -#: trees\tunnel_tube.lua:189 +#: trees\tunnel_tube.lua:277 msgid "Tunnel Tube Spawn" msgstr "Prole di tubo di galleria" diff --git a/locale/template.pot b/locale/template.pot index 863d7cd..1cc21dc 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-20 00:42-0600\n" +"POT-Creation-Date: 2018-05-21 13:21-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -44,7 +44,8 @@ msgstr "" #: doc.lua:19 msgid "" -"Cave moss has no known uses. It dies when exposed to bright light sources." +"Cave moss has no known uses aside from the faint glow it emits. It dies when " +"exposed to bright light sources such as the Sun." msgstr "" #: doc.lua:20 @@ -77,106 +78,179 @@ msgid "" "a modest amount of growth, allowing it to be divided and propagated." msgstr "" +#: doc.lua:27 +msgid "" +"Flowstone is a carbonate-rich rock formation deposited by flowing water. It " +"consists of minerals that the water dissolved earlier as it widens cracks " +"and fissures into caves." +msgstr "" + #: doc.lua:28 -msgid "Whatever this fungus was in life, it is now dead." +msgid "" +"Aside from the aesthetic beauty of its formations flowstone has no special " +"properties or uses." msgstr "" #: doc.lua:29 msgid "" +"The iconic stalactites and stalagmites found in caverns are composed of " +"flowstone (or 'dripstone' in the case of these formations). Moist dripstone " +"is still undergoing growth, whereas dry dripstone is found in 'dead' caverns " +"once the source of water that created them ceases." +msgstr "" + +#: doc.lua:30 +msgid "" +"Although stalagmites are blunter than the stalactites above them, they can " +"cause extra damage to the unwary caver who falls on them." +msgstr "" + +#: doc.lua:31 +msgid "" +"Ice formed by water dripping slowly into a cold environment, icicles tend to " +"be exceptionally pure and clear." +msgstr "" + +#: doc.lua:32 +msgid "Falling onto an icicle is particularly damaging." +msgstr "" + +#: doc.lua:35 +msgid "" +"Deep in the infernal conditions of the magma sea, over the course of " +"millions of years, mese crystals grow into flawless blocks that glow bright " +"with strange energies." +msgstr "" + +#: doc.lua:36 +msgid "" +"These blocks can be broken down into a large number of mese crystals, but " +"cannot be artificially reassembled." +msgstr "" + +#: doc.lua:38 +msgid "" +"Large, dry caverns deep underground are well suited to aeons-long processes " +"that concentrate crystalline substances in their walls. This rock is riddled " +"with veins of the stuff." +msgstr "" + +#: doc.lua:39 +msgid "Aside from its aesthetic value this rock has no particular use." +msgstr "" + +#: doc.lua:41 +msgid "" +"Monolithic crystals of this size form only over extremely long periods deep " +"underground, in large long-lived cavities that allow them room to grow. " +"Water and the life it hosts tend to disrupt the formation process of these " +"crystals so they're only found in dry environments." +msgstr "" + +#: doc.lua:42 +msgid "Aside from its aesthetic value this crystal has no particular use." +msgstr "" + +#: doc.lua:46 +msgid "Whatever this fungus was in life, it is now dead." +msgstr "" + +#: doc.lua:47 +msgid "" "Dead fungus quickly decays into an unrecognizable mess. It can be used as " "weak fuel or terrible decor." msgstr "" -#: doc.lua:31 +#: doc.lua:49 msgid "" "A species of lavender mushroom ubiquitous in caves that is most notable for " "the soft bioluminescence it produces." msgstr "" -#: doc.lua:32 +#: doc.lua:50 msgid "" "This mushroom is inedible but continues producing modest levels of light " "long after it's picked." msgstr "" -#: doc.lua:34 +#: doc.lua:52 msgid "" "Cave wheat is literally a breed of grain-producing grass that somehow lost " "its ability to photosynthesize and adapted to a more fungal style of life." msgstr "" -#: doc.lua:35 +#: doc.lua:53 msgid "" "Like its surface cousin, cave wheat produces grain that can be ground into a " "form of flour." msgstr "" -#: doc.lua:36 +#: doc.lua:54 msgid "Cave wheat seed ground into a powder suitable for cooking." msgstr "" -#: doc.lua:37 +#: doc.lua:55 msgid "" "When baked alone it forms an edible bread, but it combines well with other " "more flavorful ingredients." msgstr "" -#: doc.lua:38 +#: doc.lua:56 msgid "" "Bread baked from cave wheat flour is tough and durable. A useful ration for " "long expeditions." msgstr "" -#: doc.lua:39 +#: doc.lua:57 msgid "It's not tasty, but it keeps you going." msgstr "" -#: doc.lua:41 +#: doc.lua:59 msgid "" "The distinctive midnight-blue caps of these mushrooms are inverted, exposing " "their gills to any breeze that might pass, and have dimpled edges that give " "them their name." msgstr "" -#: doc.lua:42 +#: doc.lua:60 msgid "" "Dimple cups can be dried, ground, and processed to extract a deep blue dye." msgstr "" -#: doc.lua:44 +#: doc.lua:62 msgid "" "Pig tails are a fibrous fungal growth that's most notable for its twisting " "stalks. In a mature stand of pig tails the helical stalks intertwine into a " "dense mesh." msgstr "" -#: doc.lua:45 +#: doc.lua:63 msgid "Pig tail stalks can be processed to extract fibers useful as thread." msgstr "" -#: doc.lua:46 +#: doc.lua:64 msgid "Threads of pig tail fiber." msgstr "" -#: doc.lua:47 +#: doc.lua:65 msgid "" "A crafting item that can be woven into textiles and other similar items." msgstr "" -#: doc.lua:49 +#: doc.lua:67 msgid "" "Plump helmets are a thick, fleshy mushroom that's edible picked straight " "from the ground. They form a staple diet for both lost cave explorers and " "the fauna that preys on them." msgstr "" -#: doc.lua:50 +#: doc.lua:68 msgid "" "While they can be eaten fresh, they can be monotonous fare and are perhaps " "better appreciated as part of a more complex prepared dish." msgstr "" -#: doc.lua:52 +#: doc.lua:70 msgid "" "A rare breed of fungus from deep underground that produces a bushy cluster " "of rumpled gray 'blades'. The biological function of these blades is not " @@ -184,24 +258,24 @@ msgid "" "the blade's base." msgstr "" -#: doc.lua:53 +#: doc.lua:71 msgid "" "Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are " "edible with processing." msgstr "" -#: doc.lua:54 +#: doc.lua:72 msgid "" "The dried blades of a quarry bush add a welcome zing to recipes containing " "otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten " "on their own." msgstr "" -#: doc.lua:55 +#: doc.lua:73 msgid "Quarry bush leaves can be used as an ingredient in foodstuffs." msgstr "" -#: doc.lua:57 +#: doc.lua:75 msgid "" "Sweet pods grow in rich soil, and once they reach maturity they draw that " "supply of nutrients up to concentrate it in their fruiting bodies. They turn " @@ -209,52 +283,52 @@ msgid "" "the sugars they contain." msgstr "" -#: doc.lua:60 +#: doc.lua:78 msgid "When milled, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:62 +#: doc.lua:80 msgid "When dried in an oven, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:64 +#: doc.lua:82 msgid "Crushing them in a bucket squeezes out a flavorful syrup." msgstr "" -#: doc.lua:66 +#: doc.lua:84 msgid "Sweet pod sugar has a pink tint to it." msgstr "" -#: doc.lua:67 +#: doc.lua:85 msgid "" "Too sweet to be eaten directly, it makes an excellent ingredient in food " "recipes." msgstr "" -#: doc.lua:68 +#: doc.lua:86 msgid "Sweet pod syrup is thick and flavorful." msgstr "" -#: doc.lua:69 +#: doc.lua:87 msgid "" "Too strong and thick to drink straight, sweet pod syrup is useful in food " "recipes." msgstr "" -#: doc.lua:72 +#: doc.lua:90 msgid "" "The dense black wood of these mushrooms is heavy and hard to work with, and " "has few remarkable properties." msgstr "" -#: doc.lua:73 +#: doc.lua:91 msgid "" "Aside from the artistic applications of its particularly dark color, black " "cap wood is a long-burning fuel source that's as good as coal for some " -"applications." +"applications. Black cap gills are oily and make for excellent torch fuel." msgstr "" -#: doc.lua:75 +#: doc.lua:93 msgid "" "Blood thorns are the most vicious of underground flora, as befits their " "harsh environments. Found only in hot, dry caverns with sandy soil far from " @@ -263,14 +337,14 @@ msgid "" "fluids from whatever stray plant or creature they might impale." msgstr "" -#: doc.lua:76 +#: doc.lua:94 msgid "" "When harvested, the central stalk of a blood thorn can be cut into planks " "and used as wood. It has a purple-red hue that may or may not appeal, " "depending on one's artistic tastes." msgstr "" -#: doc.lua:77 +#: doc.lua:95 msgid "" "The spikes of a blood thorn can actually remain living long after they're " "severed from their parent stalk, a testament to their tenacity. As long as " @@ -278,39 +352,39 @@ msgid "" "puncture, though they don't grow." msgstr "" -#: doc.lua:78 +#: doc.lua:96 msgid "" "Living blood thorn spikes remain harmful to creatures that touch them. If " "killed by bright light, they cause only passive damage to creatures that " "fall on them (as one would expect from an enormous spike)." msgstr "" -#: doc.lua:80 +#: doc.lua:98 msgid "" "Thin, irregular layers of spore-producing 'shelves' surround the strong " "central stalk of the mighty Fungiwood." msgstr "" -#: doc.lua:81 +#: doc.lua:99 msgid "" "Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted " "lumber when cut. Fungiwood shelf is too fragile to be much use as anything " "other than fuel." msgstr "" -#: doc.lua:83 +#: doc.lua:101 msgid "" "Massive but squat, mature goblin cap mushrooms are the size of small " "cottages." msgstr "" -#: doc.lua:84 +#: doc.lua:102 msgid "" "Goblin cap stem and cap material can be cut into wood of two different hues, " "a subdued cream and a bright orange-red." msgstr "" -#: doc.lua:86 +#: doc.lua:104 msgid "" "Nether caps have an unusual biochemistry that allows them to somehow subsist " "on ambient heat, in violation of all known laws of thermodynamics. They grow " @@ -318,40 +392,40 @@ msgid "" "volcanic." msgstr "" -#: doc.lua:87 +#: doc.lua:105 msgid "" "Nether cap wood, in addition to being a beautiful blue hue, retains the odd " "heat-draining ability of living nether caps and is able to quickly freeze " "nearby water solid." msgstr "" -#: doc.lua:89 +#: doc.lua:107 msgid "" "Spore trees have a sturdy 'trunk' that supports a large spongy mesh of " "branching fibers, with embedded fruiting bodies that produce a copious " "amount of spores that gently rain down around the spore tree's base." msgstr "" -#: doc.lua:90 +#: doc.lua:108 msgid "" "Spore tree trunks can be cut into pale woody planks. The branching fibers " "and fruiting bodies are only useful as fuel." msgstr "" -#: doc.lua:92 +#: doc.lua:110 msgid "The king of the fungi, tower cap mushrooms grow to immense proportions." msgstr "" -#: doc.lua:93 +#: doc.lua:111 msgid "Tower caps are an excellent source of wood." msgstr "" -#: doc.lua:95 +#: doc.lua:113 msgid "" "Tunnel tubes are hollow, curved fungal growths that support a fruiting body." msgstr "" -#: doc.lua:97 +#: doc.lua:115 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material. The fruiting body accumulates high-energy compounds that, when " @@ -359,7 +433,7 @@ msgid "" "tunnel tube spawn through the still cavern air." msgstr "" -#: doc.lua:99 +#: doc.lua:117 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material." @@ -374,19 +448,22 @@ msgid "Cavern Fungi" msgstr "" #: features\flowstone_nodes.lua:19 -#: features\flowstone_nodes.lua:39 msgid "Dry Dripstone" msgstr "" -#: features\flowstone_nodes.lua:28 +#: features\flowstone_nodes.lua:30 msgid "Dry Flowstone" msgstr "" -#: features\flowstone_nodes.lua:49 +#: features\flowstone_nodes.lua:43 +msgid "Wet Dripstone" +msgstr "" + +#: features\flowstone_nodes.lua:55 msgid "Wet Flowstone" msgstr "" -#: features\flowstone_nodes.lua:60 +#: features\flowstone_nodes.lua:68 msgid "Icicle" msgstr "" @@ -394,19 +471,19 @@ msgstr "" msgid "Flawless Mese Block" msgstr "" -#: features\glow_crystals.lua:27 +#: features\glow_crystals.lua:29 msgid "Crystal Vein" msgstr "" -#: features\glow_crystals.lua:36 -#: features\glow_crystals.lua:89 -#: features\glow_crystals.lua:159 +#: features\glow_crystals.lua:40 +#: features\glow_crystals.lua:95 +#: features\glow_crystals.lua:182 msgid "Giant Crystal" msgstr "" -#: features\glow_crystals.lua:62 -#: features\glow_crystals.lua:124 -#: features\glow_crystals.lua:195 +#: features\glow_crystals.lua:67 +#: features\glow_crystals.lua:146 +#: features\glow_crystals.lua:219 msgid "Big Crystal" msgstr "" @@ -573,11 +650,11 @@ msgstr "" msgid "Black Cap Gills" msgstr "" -#: trees\black_cap.lua:77 +#: trees\black_cap.lua:85 msgid "Black Cap Planks" msgstr "" -#: trees\black_cap.lua:116 +#: trees\black_cap.lua:124 msgid "Black Cap Spawn" msgstr "" @@ -702,19 +779,22 @@ msgid "Tower Cap Spawn" msgstr "" #: trees\tunnel_tube.lua:16 +#: trees\tunnel_tube.lua:39 +#: trees\tunnel_tube.lua:69 +#: trees\tunnel_tube.lua:98 msgid "Tunnel Tube" msgstr "" -#: trees\tunnel_tube.lua:47 +#: trees\tunnel_tube.lua:135 msgid "Tunnel Tube Plies" msgstr "" -#: trees\tunnel_tube.lua:82 -#: trees\tunnel_tube.lua:138 -#: trees\tunnel_tube.lua:158 +#: trees\tunnel_tube.lua:170 +#: trees\tunnel_tube.lua:226 +#: trees\tunnel_tube.lua:246 msgid "Tunnel Tube Fruiting Body" msgstr "" -#: trees\tunnel_tube.lua:189 +#: trees\tunnel_tube.lua:277 msgid "Tunnel Tube Spawn" msgstr "" diff --git a/trees/black_cap.lua b/trees/black_cap.lua index 2d4640f..419969b 100644 --- a/trees/black_cap.lua +++ b/trees/black_cap.lua @@ -39,7 +39,7 @@ minetest.register_node("dfcaverns:black_cap_gills", { max_items = 1, items = { { - items = {'dfcaverns:black_cap_sapling'}, + items = {'dfcaverns:black_cap_sapling', 'dfcaverns:black_cap_gills'}, rarity = 5, }, { @@ -73,6 +73,14 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:torch 8', + recipe = { + {'dfcaverns:black_cap_gills'}, + {'group:stick'}, + } +}) + minetest.register_node("dfcaverns:black_cap_wood", { description = S("Black Cap Planks"), _doc_items_longdesc = dfcaverns.doc.black_cap_desc, From e756d801346056b8944277dc3103025d81ec5873 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Wed, 23 May 2018 02:32:06 -0600 Subject: [PATCH 12/25] remove mese water, add cave coral and snareweed to sunless sea --- biomes/level3.lua | 14 +- biomes/sunless_sea.lua | 86 +++++++++--- doc.lua | 5 + features/cave_coral.lua | 113 +++++++++++++++ features/glow_water.lua | 166 ---------------------- features/snareweed.lua | 49 +++++++ init.lua | 5 +- locale/it.po | 168 +++++++++++++---------- locale/template.pot | 167 ++++++++++++---------- textures/dfcaverns_bucket_glow_water.png | Bin 613 -> 0 bytes textures/dfcaverns_cave_coral.png | Bin 0 -> 848 bytes textures/dfcaverns_cave_coral_end.png | Bin 0 -> 858 bytes textures/dfcaverns_snareweed.png | Bin 0 -> 288 bytes textures/dfcaverns_snareweed_roots.png | Bin 0 -> 710 bytes textures/dfcaverns_spark.png | Bin 185 -> 0 bytes 15 files changed, 432 insertions(+), 341 deletions(-) create mode 100644 features/cave_coral.lua delete mode 100644 features/glow_water.lua create mode 100644 features/snareweed.lua delete mode 100644 textures/dfcaverns_bucket_glow_water.png create mode 100644 textures/dfcaverns_cave_coral.png create mode 100644 textures/dfcaverns_cave_coral_end.png create mode 100644 textures/dfcaverns_snareweed.png create mode 100644 textures/dfcaverns_snareweed_roots.png delete mode 100644 textures/dfcaverns_spark.png diff --git a/biomes/level3.lua b/biomes/level3.lua index 7fea466..cd8c213 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -412,7 +412,7 @@ minetest.register_biome({ _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, - _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea_coral", _subterrane_mitigate_lava = true, }) @@ -444,7 +444,7 @@ minetest.register_biome({ _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, - _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea_snareweed", _subterrane_mitigate_lava = true, }) @@ -475,7 +475,7 @@ minetest.register_biome({ _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, - _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea_coral", _subterrane_mitigate_lava = true, }) @@ -505,7 +505,7 @@ minetest.register_biome({ _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, - _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea_snareweed", _subterrane_mitigate_lava = true, }) @@ -535,7 +535,7 @@ minetest.register_biome({ _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, - _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea_snareweed", _subterrane_mitigate_lava = true, }) @@ -566,7 +566,7 @@ minetest.register_biome({ _subterrane_cave_floor_decor = level_3_cave_floor, _subterrane_cave_ceiling_decor = level_3_cave_ceiling, _subterrane_override_sea_level = dfcaverns.config.sunless_sea_level, - _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea", + _subterrane_override_under_sea_biome = "dfcaverns_sunless_sea_barren", _subterrane_mitigate_lava = true, }) @@ -596,7 +596,7 @@ minetest.register_biome({ _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_override_under_sea_biome = "dfcaverns_sunless_sea_barren", _subterrane_mitigate_lava = false, }) diff --git a/biomes/sunless_sea.lua b/biomes/sunless_sea.lua index c92e03e..d1efba1 100644 --- a/biomes/sunless_sea.lua +++ b/biomes/sunless_sea.lua @@ -1,45 +1,91 @@ local c_water = minetest.get_content_id("default:water_source") local c_air = minetest.get_content_id("air") local c_stone = minetest.get_content_id("default:stone") -local c_cobble = minetest.get_content_id("default:cobble") local c_dirt = minetest.get_content_id("default:dirt") local c_sand = minetest.get_content_id("default:sand") -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_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") - ------------------------------------------------------------------------------------------- -local sunless_sea_underwater_floor = function(area, data, ai, vi, bi, param2_data) +local sea_level = dfcaverns.config.sunless_sea_level + +local sunless_sea_barren_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return end - data[bi] = c_dirt - if math.random() < 0.001 then - data[vi] = c_glow_water + data[bi] = c_sand +end + +local sunless_sea_snareweed_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + if math.random() < 0.005 then + dfcaverns.place_snareweed_patch(area, data, bi, param2_data, 6) + else + data[bi] = c_dirt end end -local sunless_sea_biome_def = { - name = "dfcaverns_sunless_sea", +local sunless_sea_coral_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + local coral_rand = subterrane:vertically_consistent_random(vi, area) + if coral_rand < 0.01 then + local iterations = math.ceil(coral_rand / 0.01 * 6) + dfcaverns.spawn_cave_coral(area, data, vi, iterations) + end +end + +local sunless_sea_coral_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + local coral_rand = subterrane:vertically_consistent_random(vi, area) + if coral_rand < 0.01 then + local iterations = math.ceil(coral_rand / 0.01 * 6) + dfcaverns.spawn_coral_pile(area, data, vi, iterations) + end +end + +minetest.register_biome({ + name = "dfcaverns_sunless_sea_barren", y_min = dfcaverns.config.sunless_sea_min, y_max = dfcaverns.config.sunless_sea_level, - heat_point = 50, + heat_point = 80, + humidity_point = 10, + _subterrane_fill_node = c_water, + _subterrane_cave_fill_node = c_air, + _subterrane_mitigate_lava = true, + _subterrane_floor_decor = sunless_sea_barren_floor, +}) + +minetest.register_biome({ + name = "dfcaverns_sunless_sea_snareweed", + y_min = dfcaverns.config.sunless_sea_min, + y_max = dfcaverns.config.sunless_sea_level, + heat_point = 80, + humidity_point = 90, + _subterrane_fill_node = c_water, + _subterrane_cave_fill_node = c_water, + _subterrane_mitigate_lava = true, + _subterrane_floor_decor = sunless_sea_snareweed_floor, +}) + +minetest.register_biome({ + name = "dfcaverns_sunless_sea_coral", + y_min = dfcaverns.config.sunless_sea_min, + y_max = dfcaverns.config.sunless_sea_level, + heat_point = 0, humidity_point = 50, _subterrane_fill_node = c_water, _subterrane_cave_fill_node = c_water, _subterrane_mitigate_lava = true, - _subterrane_floor_decor = sunless_sea_underwater_floor, -} - -minetest.register_biome(sunless_sea_biome_def) + _subterrane_floor_decor = sunless_sea_coral_floor, + _subterrane_ceiling_decor = sunless_sea_coral_ceiling, +}) local data = {} - minetest.register_on_generated(function(minp, maxp, seed) --if out of range of cave definition limits, abort if minp.y > dfcaverns.config.sunless_sea_level or maxp.y < dfcaverns.config.sunless_sea_min then diff --git a/doc.lua b/doc.lua index 748f245..8e444e2 100644 --- a/doc.lua +++ b/doc.lua @@ -23,6 +23,11 @@ dfcaverns.doc.floor_fungus_usage = S("Floor fungus has no known uses. It can pen dfcaverns.doc.glow_worms_desc = S("Glistening strings of silk hang from the ceilings of some of the larger caverns, lit by the millions of tiny bioluminescent worms that spun them. Glow worms prey on the insects they lure and entangle with their faux starry sky - and sometimes the occasional bat or other larger flying beast.") dfcaverns.doc.glow_worms_usage = S("Glow worms can be harvested and used as a source of light but they die when exposed to light significantly brighter than themselves or when immersed in water. A colony of glow worms hung in a hospitable environment will undergo a modest amount of growth, allowing it to be divided and propagated.") +dfcaverns.doc.snareweed_desc = S("A nasty kelp-like plant that grows in patches on the floor of the Sunless Sea. Its reflective patches draw in the unwary and then its prickly barbs catch and hold small creatures.") +dfcaverns.doc.snareweed_usage = S("Snareweed has no practical use, its fibers disintegrate when they dry.") + +dfcaverns.doc.cave_coral_desc = S("A rare form of coral found only deep underground in the Sunless Sea, cave coral grows hanging from the ceilings of flooded caverns.") +dfcaverns.doc.cave_coral_usage = S("Aside from their aesthetic beauty, cave corals can be harvested for simple building materials.") dfcaverns.doc.flowstone_desc = S("Flowstone is a carbonate-rich rock formation deposited by flowing water. It consists of minerals that the water dissolved earlier as it widens cracks and fissures into caves.") dfcaverns.doc.flowstone_usage = S("Aside from the aesthetic beauty of its formations flowstone has no special properties or uses.") diff --git a/features/cave_coral.lua b/features/cave_coral.lua new file mode 100644 index 0000000..81de834 --- /dev/null +++ b/features/cave_coral.lua @@ -0,0 +1,113 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +minetest.register_node("dfcaverns:cave_coral_3", { + description = S("Cave Coral"), + _doc_items_longdesc = dfcaverns.doc.cave_coral_desc, + _doc_items_usagehelp = dfcaverns.doc.cave_coral_usage, + tiles = {"dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral.png"}, + is_ground_content = true, + drop = "default:coral_skeleton", + light_source = 3, + groups = {cracky = 3, dfcaverns_cave_coral = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("dfcaverns:cave_coral_2", { + description = S("Cave Coral"), + _doc_items_longdesc = dfcaverns.doc.cave_coral_desc, + _doc_items_usagehelp = dfcaverns.doc.cave_coral_usage, + tiles = {"dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral.png"}, + is_ground_content = true, + drop = "default:coral_skeleton", + light_source = 2, + groups = {cracky = 3, dfcaverns_cave_coral = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("dfcaverns:cave_coral_1", { + description = S("Cave Coral"), + _doc_items_longdesc = dfcaverns.doc.cave_coral_desc, + _doc_items_usagehelp = dfcaverns.doc.cave_coral_usage, + tiles = {"dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral_end.png", "dfcaverns_cave_coral.png"}, + is_ground_content = true, + drop = "default:coral_skeleton", + light_source = 1, + groups = {cracky = 3, dfcaverns_cave_coral = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +local coral_names = {"dfcaverns:cave_coral_1", "dfcaverns:cave_coral_2", "dfcaverns:cave_coral_3"} +minetest.register_abm{ + label = "dfcaverns:shifting_coral", + nodenames = {"group:dfcaverns_cave_coral"}, + interval = 2, + chance = 10, + action = function(pos) + minetest.swap_node(pos, {name=coral_names[math.random(1,3)]}) + end, +} + +local c_coral_1 = minetest.get_content_id("dfcaverns:cave_coral_1") +local c_coral_2 = minetest.get_content_id("dfcaverns:cave_coral_2") +local c_coral_3 = minetest.get_content_id("dfcaverns:cave_coral_3") +local c_coral_skeleton = minetest.get_content_id("default:coral_skeleton") +local c_dirt = minetest.get_content_id("default:dirt") +local c_stone = minetest.get_content_id("default:stone") + +local corals = {c_coral_1, c_coral_2, c_coral_3} +local get_coral = function() + return corals[math.random(1,3)] +end + +dfcaverns.spawn_cave_coral = function(area, data, vi, iterations) + local run = math.random(2,4) + local index = vi + local zstride = area.zstride + local ystride = area.ystride + while run > 0 do + if math.random() > 0.95 or data[index] == c_stone or not area:containsi(index) then return end + data[index] = get_coral() + if iterations > 2 then + data[index + 1] = get_coral() + data[index - 1] = get_coral() + data[index + zstride] = get_coral() + data[index - zstride] = get_coral() + end + if iterations > 3 then + data[index + 2] = get_coral() + data[index - 2] = get_coral() + data[index + zstride * 2] = get_coral() + data[index - zstride * 2] = get_coral() + data[index + 1 + zstride] = get_coral() + data[index - 1 + zstride] = get_coral() + data[index + 1 - zstride] = get_coral() + data[index - 1 - zstride] = get_coral() + end + index = index - ystride + run = run - 1 + end + + local newiterations = iterations - 1 + if newiterations == 0 then return end + + if math.random() > 0.5 then + dfcaverns.spawn_cave_coral(area, data, index + 1 + ystride, newiterations) + dfcaverns.spawn_cave_coral(area, data, index - 1 + ystride, newiterations) + else + dfcaverns.spawn_cave_coral(area, data, index + zstride + ystride, newiterations) + dfcaverns.spawn_cave_coral(area, data, index - zstride + ystride, newiterations) + end +end + +dfcaverns.spawn_coral_pile = function(area, data, vi, radius) + local pos = area:position(vi) + for li in area:iterp(vector.add(pos, -radius), vector.add(pos, radius)) do + local adjacent = li + area.ystride + local node_type = data[li] + if math.random() < 0.2 and (node_type == c_stone or node_type == c_dirt) and data[adjacent] == c_water then + data[adjacent] = c_coral_skeleton + end + end +end diff --git a/features/glow_water.lua b/features/glow_water.lua deleted file mode 100644 index 78b7afe..0000000 --- a/features/glow_water.lua +++ /dev/null @@ -1,166 +0,0 @@ --- 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_glow_water.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 \ No newline at end of file diff --git a/features/snareweed.lua b/features/snareweed.lua new file mode 100644 index 0000000..6125d93 --- /dev/null +++ b/features/snareweed.lua @@ -0,0 +1,49 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +minetest.register_node("dfcaverns:snareweed", { + description = S("Snareweed"), + _doc_items_longdesc = dfcaverns.doc.snareweed_desc, + _doc_items_usagehelp = dfcaverns.doc.snareweed_usage, + tiles = {"default_dirt.png^dfcaverns_snareweed_roots.png", "default_dirt.png"}, + drawtype="plantlike_rooted", +-- paramtype = "light", + paramtype2 = "leveled", + special_tiles = {{name = "dfcaverns_snareweed.png", tileable_vertical = true}}, + is_ground_content = true, + drop = 'default:dirt', + light_source = 6, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +local c_water = minetest.get_content_id("default:water_source") +local c_dirt = minetest.get_content_id("default:dirt") +local c_snareweed = minetest.get_content_id("dfcaverns:snareweed") + +dfcaverns.place_snareweed = function(area, data, bi, param2_data) + local max_height = 0 + local index = bi + area.ystride + while area:containsi(index) and data[index] == c_water and max_height <= 8*16 do + index = index + area.ystride + max_height = max_height + 16 + end + if max_height > 0 then + data[bi] = c_snareweed + param2_data[bi] = math.min(math.random(3*16, 8*16), max_height) + else + data[bi] = c_dirt + end +end + +dfcaverns.place_snareweed_patch = function(area, data, bi, param2_data, radius) + local pos = area:position(bi) + for li in area:iterp(vector.add(pos, -radius), vector.add(pos, radius)) do + local adjacent = li + area.ystride + local node_type = data[li] + if math.random() < 0.1 and (node_type == c_stone or node_type == c_dirt) and data[adjacent] == c_water then + dfcaverns.place_snareweed(area, data, li, param2_data) + end + end +end \ No newline at end of file diff --git a/init.lua b/init.lua index 436f293..ba7f505 100644 --- a/init.lua +++ b/init.lua @@ -10,10 +10,11 @@ dofile(modpath.."/doc.lua") dofile(modpath.."/features/ground_cover.lua") dofile(modpath.."/features/glow_worms.lua") dofile(modpath.."/features/flowstone_nodes.lua") -dofile(modpath.."/features/glow_water.lua") dofile(modpath.."/features/glow_crystals.lua") +dofile(modpath.."/features/snareweed.lua") +dofile(modpath.."/features/cave_coral.lua") --- Plants +-- Farmable Plants dofile(modpath.."/plants.lua") -- general functions dofile(modpath.."/plants/cave_wheat.lua") dofile(modpath.."/plants/dimple_cup.lua") diff --git a/locale/it.po b/locale/it.po index 3a41ba3..906ed47 100644 --- a/locale/it.po +++ b/locale/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: dfcaverns module's Italian locale\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-21 13:21-0600\n" +"POT-Creation-Date: 2018-05-23 02:30-0600\n" "PO-Revision-Date: 2017-08-17 23:01+0100\n" "Last-Translator: H4mlet \n" "Language-Team: ITALIANO\n" @@ -79,20 +79,43 @@ msgid "" "a modest amount of growth, allowing it to be divided and propagated." msgstr "" +#: doc.lua:26 +msgid "" +"A nasty kelp-like plant that grows in patches on the floor of the Sunless " +"Sea. Its reflective patches draw in the unwary and then its prickly barbs " +"catch and hold small creatures." +msgstr "" + #: doc.lua:27 +msgid "Snareweed has no practical use, its fibers disintegrate when they dry." +msgstr "" + +#: doc.lua:29 +msgid "" +"A rare form of coral found only deep underground in the Sunless Sea, cave " +"coral grows hanging from the ceilings of flooded caverns." +msgstr "" + +#: doc.lua:30 +msgid "" +"Aside from their aesthetic beauty, cave corals can be harvested for simple " +"building materials." +msgstr "" + +#: doc.lua:32 msgid "" "Flowstone is a carbonate-rich rock formation deposited by flowing water. It " "consists of minerals that the water dissolved earlier as it widens cracks " "and fissures into caves." msgstr "" -#: doc.lua:28 +#: doc.lua:33 msgid "" "Aside from the aesthetic beauty of its formations flowstone has no special " "properties or uses." msgstr "" -#: doc.lua:29 +#: doc.lua:34 msgid "" "The iconic stalactites and stalagmites found in caverns are composed of " "flowstone (or 'dripstone' in the case of these formations). Moist dripstone " @@ -100,47 +123,47 @@ msgid "" "once the source of water that created them ceases." msgstr "" -#: doc.lua:30 +#: doc.lua:35 msgid "" "Although stalagmites are blunter than the stalactites above them, they can " "cause extra damage to the unwary caver who falls on them." msgstr "" -#: doc.lua:31 +#: doc.lua:36 msgid "" "Ice formed by water dripping slowly into a cold environment, icicles tend to " "be exceptionally pure and clear." msgstr "" -#: doc.lua:32 +#: doc.lua:37 msgid "Falling onto an icicle is particularly damaging." msgstr "" -#: doc.lua:35 +#: doc.lua:40 msgid "" "Deep in the infernal conditions of the magma sea, over the course of " "millions of years, mese crystals grow into flawless blocks that glow bright " "with strange energies." msgstr "" -#: doc.lua:36 +#: doc.lua:41 msgid "" "These blocks can be broken down into a large number of mese crystals, but " "cannot be artificially reassembled." msgstr "" -#: doc.lua:38 +#: doc.lua:43 msgid "" "Large, dry caverns deep underground are well suited to aeons-long processes " "that concentrate crystalline substances in their walls. This rock is riddled " "with veins of the stuff." msgstr "" -#: doc.lua:39 +#: doc.lua:44 msgid "Aside from its aesthetic value this rock has no particular use." msgstr "" -#: doc.lua:41 +#: doc.lua:46 msgid "" "Monolithic crystals of this size form only over extremely long periods deep " "underground, in large long-lived cavities that allow them room to grow. " @@ -148,110 +171,110 @@ msgid "" "crystals so they're only found in dry environments." msgstr "" -#: doc.lua:42 +#: doc.lua:47 msgid "Aside from its aesthetic value this crystal has no particular use." msgstr "" -#: doc.lua:46 +#: doc.lua:51 msgid "Whatever this fungus was in life, it is now dead." msgstr "" -#: doc.lua:47 +#: doc.lua:52 msgid "" "Dead fungus quickly decays into an unrecognizable mess. It can be used as " "weak fuel or terrible decor." msgstr "" -#: doc.lua:49 +#: doc.lua:54 msgid "" "A species of lavender mushroom ubiquitous in caves that is most notable for " "the soft bioluminescence it produces." msgstr "" -#: doc.lua:50 +#: doc.lua:55 msgid "" "This mushroom is inedible but continues producing modest levels of light " "long after it's picked." msgstr "" -#: doc.lua:52 +#: doc.lua:57 msgid "" "Cave wheat is literally a breed of grain-producing grass that somehow lost " "its ability to photosynthesize and adapted to a more fungal style of life." msgstr "" -#: doc.lua:53 +#: doc.lua:58 msgid "" "Like its surface cousin, cave wheat produces grain that can be ground into a " "form of flour." msgstr "" -#: doc.lua:54 +#: doc.lua:59 msgid "Cave wheat seed ground into a powder suitable for cooking." msgstr "" -#: doc.lua:55 +#: doc.lua:60 msgid "" "When baked alone it forms an edible bread, but it combines well with other " "more flavorful ingredients." msgstr "" -#: doc.lua:56 +#: doc.lua:61 msgid "" "Bread baked from cave wheat flour is tough and durable. A useful ration for " "long expeditions." msgstr "" -#: doc.lua:57 +#: doc.lua:62 msgid "It's not tasty, but it keeps you going." msgstr "" -#: doc.lua:59 +#: doc.lua:64 msgid "" "The distinctive midnight-blue caps of these mushrooms are inverted, exposing " "their gills to any breeze that might pass, and have dimpled edges that give " "them their name." msgstr "" -#: doc.lua:60 +#: doc.lua:65 msgid "" "Dimple cups can be dried, ground, and processed to extract a deep blue dye." msgstr "" -#: doc.lua:62 +#: doc.lua:67 msgid "" "Pig tails are a fibrous fungal growth that's most notable for its twisting " "stalks. In a mature stand of pig tails the helical stalks intertwine into a " "dense mesh." msgstr "" -#: doc.lua:63 +#: doc.lua:68 msgid "Pig tail stalks can be processed to extract fibers useful as thread." msgstr "" -#: doc.lua:64 +#: doc.lua:69 msgid "Threads of pig tail fiber." msgstr "" -#: doc.lua:65 +#: doc.lua:70 msgid "" "A crafting item that can be woven into textiles and other similar items." msgstr "" -#: doc.lua:67 +#: doc.lua:72 msgid "" "Plump helmets are a thick, fleshy mushroom that's edible picked straight " "from the ground. They form a staple diet for both lost cave explorers and " "the fauna that preys on them." msgstr "" -#: doc.lua:68 +#: doc.lua:73 msgid "" "While they can be eaten fresh, they can be monotonous fare and are perhaps " "better appreciated as part of a more complex prepared dish." msgstr "" -#: doc.lua:70 +#: doc.lua:75 msgid "" "A rare breed of fungus from deep underground that produces a bushy cluster " "of rumpled gray 'blades'. The biological function of these blades is not " @@ -259,24 +282,24 @@ msgid "" "the blade's base." msgstr "" -#: doc.lua:71 +#: doc.lua:76 msgid "" "Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are " "edible with processing." msgstr "" -#: doc.lua:72 +#: doc.lua:77 msgid "" "The dried blades of a quarry bush add a welcome zing to recipes containing " "otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten " "on their own." msgstr "" -#: doc.lua:73 +#: doc.lua:78 msgid "Quarry bush leaves can be used as an ingredient in foodstuffs." msgstr "" -#: doc.lua:75 +#: doc.lua:80 msgid "" "Sweet pods grow in rich soil, and once they reach maturity they draw that " "supply of nutrients up to concentrate it in their fruiting bodies. They turn " @@ -284,52 +307,52 @@ msgid "" "the sugars they contain." msgstr "" -#: doc.lua:78 +#: doc.lua:83 msgid "When milled, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:80 +#: doc.lua:85 msgid "When dried in an oven, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:82 +#: doc.lua:87 msgid "Crushing them in a bucket squeezes out a flavorful syrup." msgstr "" -#: doc.lua:84 +#: doc.lua:89 msgid "Sweet pod sugar has a pink tint to it." msgstr "" -#: doc.lua:85 +#: doc.lua:90 msgid "" "Too sweet to be eaten directly, it makes an excellent ingredient in food " "recipes." msgstr "" -#: doc.lua:86 +#: doc.lua:91 msgid "Sweet pod syrup is thick and flavorful." msgstr "" -#: doc.lua:87 +#: doc.lua:92 msgid "" "Too strong and thick to drink straight, sweet pod syrup is useful in food " "recipes." msgstr "" -#: doc.lua:90 +#: doc.lua:95 msgid "" "The dense black wood of these mushrooms is heavy and hard to work with, and " "has few remarkable properties." msgstr "" -#: doc.lua:91 +#: doc.lua:96 msgid "" "Aside from the artistic applications of its particularly dark color, black " "cap wood is a long-burning fuel source that's as good as coal for some " "applications. Black cap gills are oily and make for excellent torch fuel." msgstr "" -#: doc.lua:93 +#: doc.lua:98 msgid "" "Blood thorns are the most vicious of underground flora, as befits their " "harsh environments. Found only in hot, dry caverns with sandy soil far from " @@ -338,14 +361,14 @@ msgid "" "fluids from whatever stray plant or creature they might impale." msgstr "" -#: doc.lua:94 +#: doc.lua:99 msgid "" "When harvested, the central stalk of a blood thorn can be cut into planks " "and used as wood. It has a purple-red hue that may or may not appeal, " "depending on one's artistic tastes." msgstr "" -#: doc.lua:95 +#: doc.lua:100 msgid "" "The spikes of a blood thorn can actually remain living long after they're " "severed from their parent stalk, a testament to their tenacity. As long as " @@ -353,39 +376,39 @@ msgid "" "puncture, though they don't grow." msgstr "" -#: doc.lua:96 +#: doc.lua:101 msgid "" "Living blood thorn spikes remain harmful to creatures that touch them. If " "killed by bright light, they cause only passive damage to creatures that " "fall on them (as one would expect from an enormous spike)." msgstr "" -#: doc.lua:98 +#: doc.lua:103 msgid "" "Thin, irregular layers of spore-producing 'shelves' surround the strong " "central stalk of the mighty Fungiwood." msgstr "" -#: doc.lua:99 +#: doc.lua:104 msgid "" "Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted " "lumber when cut. Fungiwood shelf is too fragile to be much use as anything " "other than fuel." msgstr "" -#: doc.lua:101 +#: doc.lua:106 msgid "" "Massive but squat, mature goblin cap mushrooms are the size of small " "cottages." msgstr "" -#: doc.lua:102 +#: doc.lua:107 msgid "" "Goblin cap stem and cap material can be cut into wood of two different hues, " "a subdued cream and a bright orange-red." msgstr "" -#: doc.lua:104 +#: doc.lua:109 msgid "" "Nether caps have an unusual biochemistry that allows them to somehow subsist " "on ambient heat, in violation of all known laws of thermodynamics. They grow " @@ -393,40 +416,40 @@ msgid "" "volcanic." msgstr "" -#: doc.lua:105 +#: doc.lua:110 msgid "" "Nether cap wood, in addition to being a beautiful blue hue, retains the odd " "heat-draining ability of living nether caps and is able to quickly freeze " "nearby water solid." msgstr "" -#: doc.lua:107 +#: doc.lua:112 msgid "" "Spore trees have a sturdy 'trunk' that supports a large spongy mesh of " "branching fibers, with embedded fruiting bodies that produce a copious " "amount of spores that gently rain down around the spore tree's base." msgstr "" -#: doc.lua:108 +#: doc.lua:113 msgid "" "Spore tree trunks can be cut into pale woody planks. The branching fibers " "and fruiting bodies are only useful as fuel." msgstr "" -#: doc.lua:110 +#: doc.lua:115 msgid "The king of the fungi, tower cap mushrooms grow to immense proportions." msgstr "" -#: doc.lua:111 +#: doc.lua:116 msgid "Tower caps are an excellent source of wood." msgstr "" -#: doc.lua:113 +#: doc.lua:118 msgid "" "Tunnel tubes are hollow, curved fungal growths that support a fruiting body." msgstr "" -#: doc.lua:115 +#: doc.lua:120 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material. The fruiting body accumulates high-energy compounds that, when " @@ -434,7 +457,7 @@ msgid "" "tunnel tube spawn through the still cavern air." msgstr "" -#: doc.lua:117 +#: doc.lua:122 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material." @@ -448,6 +471,13 @@ msgstr "Fungo morto" msgid "Cavern Fungi" msgstr "Funghi di caverna" +#: features\cave_coral.lua:6 +#: features\cave_coral.lua:18 +#: features\cave_coral.lua:30 +#, fuzzy +msgid "Cave Coral" +msgstr "Grano di caverna" + #: features\flowstone_nodes.lua:19 msgid "Dry Dripstone" msgstr "" @@ -488,18 +518,6 @@ msgstr "" msgid "Big Crystal" msgstr "" -#: features\glow_water.lua:6 -msgid "Mese Water" -msgstr "" - -#: features\glow_water.lua:55 -msgid "Flowing Mese Water" -msgstr "" - -#: features\glow_water.lua:160 -msgid "Glow Water Bucket" -msgstr "" - #: features\glow_worms.lua:6 msgid "Glow Worms" msgstr "Vermi luminosi" @@ -512,6 +530,10 @@ msgstr "Terra con muschio di caverna" msgid "Cobblestone With Floor Fungus" msgstr "Ciottoli con funghi del terreno" +#: features\snareweed.lua:6 +msgid "Snareweed" +msgstr "" + #: plants\cave_wheat.lua:10 #: plants\cave_wheat.lua:69 msgid "Cave Wheat" diff --git a/locale/template.pot b/locale/template.pot index 1cc21dc..6d545c6 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-21 13:21-0600\n" +"POT-Creation-Date: 2018-05-23 02:30-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,20 +78,43 @@ msgid "" "a modest amount of growth, allowing it to be divided and propagated." msgstr "" +#: doc.lua:26 +msgid "" +"A nasty kelp-like plant that grows in patches on the floor of the Sunless " +"Sea. Its reflective patches draw in the unwary and then its prickly barbs " +"catch and hold small creatures." +msgstr "" + #: doc.lua:27 +msgid "Snareweed has no practical use, its fibers disintegrate when they dry." +msgstr "" + +#: doc.lua:29 +msgid "" +"A rare form of coral found only deep underground in the Sunless Sea, cave " +"coral grows hanging from the ceilings of flooded caverns." +msgstr "" + +#: doc.lua:30 +msgid "" +"Aside from their aesthetic beauty, cave corals can be harvested for simple " +"building materials." +msgstr "" + +#: doc.lua:32 msgid "" "Flowstone is a carbonate-rich rock formation deposited by flowing water. It " "consists of minerals that the water dissolved earlier as it widens cracks " "and fissures into caves." msgstr "" -#: doc.lua:28 +#: doc.lua:33 msgid "" "Aside from the aesthetic beauty of its formations flowstone has no special " "properties or uses." msgstr "" -#: doc.lua:29 +#: doc.lua:34 msgid "" "The iconic stalactites and stalagmites found in caverns are composed of " "flowstone (or 'dripstone' in the case of these formations). Moist dripstone " @@ -99,47 +122,47 @@ msgid "" "once the source of water that created them ceases." msgstr "" -#: doc.lua:30 +#: doc.lua:35 msgid "" "Although stalagmites are blunter than the stalactites above them, they can " "cause extra damage to the unwary caver who falls on them." msgstr "" -#: doc.lua:31 +#: doc.lua:36 msgid "" "Ice formed by water dripping slowly into a cold environment, icicles tend to " "be exceptionally pure and clear." msgstr "" -#: doc.lua:32 +#: doc.lua:37 msgid "Falling onto an icicle is particularly damaging." msgstr "" -#: doc.lua:35 +#: doc.lua:40 msgid "" "Deep in the infernal conditions of the magma sea, over the course of " "millions of years, mese crystals grow into flawless blocks that glow bright " "with strange energies." msgstr "" -#: doc.lua:36 +#: doc.lua:41 msgid "" "These blocks can be broken down into a large number of mese crystals, but " "cannot be artificially reassembled." msgstr "" -#: doc.lua:38 +#: doc.lua:43 msgid "" "Large, dry caverns deep underground are well suited to aeons-long processes " "that concentrate crystalline substances in their walls. This rock is riddled " "with veins of the stuff." msgstr "" -#: doc.lua:39 +#: doc.lua:44 msgid "Aside from its aesthetic value this rock has no particular use." msgstr "" -#: doc.lua:41 +#: doc.lua:46 msgid "" "Monolithic crystals of this size form only over extremely long periods deep " "underground, in large long-lived cavities that allow them room to grow. " @@ -147,110 +170,110 @@ msgid "" "crystals so they're only found in dry environments." msgstr "" -#: doc.lua:42 +#: doc.lua:47 msgid "Aside from its aesthetic value this crystal has no particular use." msgstr "" -#: doc.lua:46 +#: doc.lua:51 msgid "Whatever this fungus was in life, it is now dead." msgstr "" -#: doc.lua:47 +#: doc.lua:52 msgid "" "Dead fungus quickly decays into an unrecognizable mess. It can be used as " "weak fuel or terrible decor." msgstr "" -#: doc.lua:49 +#: doc.lua:54 msgid "" "A species of lavender mushroom ubiquitous in caves that is most notable for " "the soft bioluminescence it produces." msgstr "" -#: doc.lua:50 +#: doc.lua:55 msgid "" "This mushroom is inedible but continues producing modest levels of light " "long after it's picked." msgstr "" -#: doc.lua:52 +#: doc.lua:57 msgid "" "Cave wheat is literally a breed of grain-producing grass that somehow lost " "its ability to photosynthesize and adapted to a more fungal style of life." msgstr "" -#: doc.lua:53 +#: doc.lua:58 msgid "" "Like its surface cousin, cave wheat produces grain that can be ground into a " "form of flour." msgstr "" -#: doc.lua:54 +#: doc.lua:59 msgid "Cave wheat seed ground into a powder suitable for cooking." msgstr "" -#: doc.lua:55 +#: doc.lua:60 msgid "" "When baked alone it forms an edible bread, but it combines well with other " "more flavorful ingredients." msgstr "" -#: doc.lua:56 +#: doc.lua:61 msgid "" "Bread baked from cave wheat flour is tough and durable. A useful ration for " "long expeditions." msgstr "" -#: doc.lua:57 +#: doc.lua:62 msgid "It's not tasty, but it keeps you going." msgstr "" -#: doc.lua:59 +#: doc.lua:64 msgid "" "The distinctive midnight-blue caps of these mushrooms are inverted, exposing " "their gills to any breeze that might pass, and have dimpled edges that give " "them their name." msgstr "" -#: doc.lua:60 +#: doc.lua:65 msgid "" "Dimple cups can be dried, ground, and processed to extract a deep blue dye." msgstr "" -#: doc.lua:62 +#: doc.lua:67 msgid "" "Pig tails are a fibrous fungal growth that's most notable for its twisting " "stalks. In a mature stand of pig tails the helical stalks intertwine into a " "dense mesh." msgstr "" -#: doc.lua:63 +#: doc.lua:68 msgid "Pig tail stalks can be processed to extract fibers useful as thread." msgstr "" -#: doc.lua:64 +#: doc.lua:69 msgid "Threads of pig tail fiber." msgstr "" -#: doc.lua:65 +#: doc.lua:70 msgid "" "A crafting item that can be woven into textiles and other similar items." msgstr "" -#: doc.lua:67 +#: doc.lua:72 msgid "" "Plump helmets are a thick, fleshy mushroom that's edible picked straight " "from the ground. They form a staple diet for both lost cave explorers and " "the fauna that preys on them." msgstr "" -#: doc.lua:68 +#: doc.lua:73 msgid "" "While they can be eaten fresh, they can be monotonous fare and are perhaps " "better appreciated as part of a more complex prepared dish." msgstr "" -#: doc.lua:70 +#: doc.lua:75 msgid "" "A rare breed of fungus from deep underground that produces a bushy cluster " "of rumpled gray 'blades'. The biological function of these blades is not " @@ -258,24 +281,24 @@ msgid "" "the blade's base." msgstr "" -#: doc.lua:71 +#: doc.lua:76 msgid "" "Quarry bush leaves and nodules (called 'rock nuts') can be harvested and are " "edible with processing." msgstr "" -#: doc.lua:72 +#: doc.lua:77 msgid "" "The dried blades of a quarry bush add a welcome zing to recipes containing " "otherwise-bland subterranean foodstuffs, but they're too spicy to be eaten " "on their own." msgstr "" -#: doc.lua:73 +#: doc.lua:78 msgid "Quarry bush leaves can be used as an ingredient in foodstuffs." msgstr "" -#: doc.lua:75 +#: doc.lua:80 msgid "" "Sweet pods grow in rich soil, and once they reach maturity they draw that " "supply of nutrients up to concentrate it in their fruiting bodies. They turn " @@ -283,52 +306,52 @@ msgid "" "the sugars they contain." msgstr "" -#: doc.lua:78 +#: doc.lua:83 msgid "When milled, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:80 +#: doc.lua:85 msgid "When dried in an oven, sweet pods produce a granular sugary substance." msgstr "" -#: doc.lua:82 +#: doc.lua:87 msgid "Crushing them in a bucket squeezes out a flavorful syrup." msgstr "" -#: doc.lua:84 +#: doc.lua:89 msgid "Sweet pod sugar has a pink tint to it." msgstr "" -#: doc.lua:85 +#: doc.lua:90 msgid "" "Too sweet to be eaten directly, it makes an excellent ingredient in food " "recipes." msgstr "" -#: doc.lua:86 +#: doc.lua:91 msgid "Sweet pod syrup is thick and flavorful." msgstr "" -#: doc.lua:87 +#: doc.lua:92 msgid "" "Too strong and thick to drink straight, sweet pod syrup is useful in food " "recipes." msgstr "" -#: doc.lua:90 +#: doc.lua:95 msgid "" "The dense black wood of these mushrooms is heavy and hard to work with, and " "has few remarkable properties." msgstr "" -#: doc.lua:91 +#: doc.lua:96 msgid "" "Aside from the artistic applications of its particularly dark color, black " "cap wood is a long-burning fuel source that's as good as coal for some " "applications. Black cap gills are oily and make for excellent torch fuel." msgstr "" -#: doc.lua:93 +#: doc.lua:98 msgid "" "Blood thorns are the most vicious of underground flora, as befits their " "harsh environments. Found only in hot, dry caverns with sandy soil far from " @@ -337,14 +360,14 @@ msgid "" "fluids from whatever stray plant or creature they might impale." msgstr "" -#: doc.lua:94 +#: doc.lua:99 msgid "" "When harvested, the central stalk of a blood thorn can be cut into planks " "and used as wood. It has a purple-red hue that may or may not appeal, " "depending on one's artistic tastes." msgstr "" -#: doc.lua:95 +#: doc.lua:100 msgid "" "The spikes of a blood thorn can actually remain living long after they're " "severed from their parent stalk, a testament to their tenacity. As long as " @@ -352,39 +375,39 @@ msgid "" "puncture, though they don't grow." msgstr "" -#: doc.lua:96 +#: doc.lua:101 msgid "" "Living blood thorn spikes remain harmful to creatures that touch them. If " "killed by bright light, they cause only passive damage to creatures that " "fall on them (as one would expect from an enormous spike)." msgstr "" -#: doc.lua:98 +#: doc.lua:103 msgid "" "Thin, irregular layers of spore-producing 'shelves' surround the strong " "central stalk of the mighty Fungiwood." msgstr "" -#: doc.lua:99 +#: doc.lua:104 msgid "" "Fungiwood stalk is strong and very fine-grained, making smooth yellow-tinted " "lumber when cut. Fungiwood shelf is too fragile to be much use as anything " "other than fuel." msgstr "" -#: doc.lua:101 +#: doc.lua:106 msgid "" "Massive but squat, mature goblin cap mushrooms are the size of small " "cottages." msgstr "" -#: doc.lua:102 +#: doc.lua:107 msgid "" "Goblin cap stem and cap material can be cut into wood of two different hues, " "a subdued cream and a bright orange-red." msgstr "" -#: doc.lua:104 +#: doc.lua:109 msgid "" "Nether caps have an unusual biochemistry that allows them to somehow subsist " "on ambient heat, in violation of all known laws of thermodynamics. They grow " @@ -392,40 +415,40 @@ msgid "" "volcanic." msgstr "" -#: doc.lua:105 +#: doc.lua:110 msgid "" "Nether cap wood, in addition to being a beautiful blue hue, retains the odd " "heat-draining ability of living nether caps and is able to quickly freeze " "nearby water solid." msgstr "" -#: doc.lua:107 +#: doc.lua:112 msgid "" "Spore trees have a sturdy 'trunk' that supports a large spongy mesh of " "branching fibers, with embedded fruiting bodies that produce a copious " "amount of spores that gently rain down around the spore tree's base." msgstr "" -#: doc.lua:108 +#: doc.lua:113 msgid "" "Spore tree trunks can be cut into pale woody planks. The branching fibers " "and fruiting bodies are only useful as fuel." msgstr "" -#: doc.lua:110 +#: doc.lua:115 msgid "The king of the fungi, tower cap mushrooms grow to immense proportions." msgstr "" -#: doc.lua:111 +#: doc.lua:116 msgid "Tower caps are an excellent source of wood." msgstr "" -#: doc.lua:113 +#: doc.lua:118 msgid "" "Tunnel tubes are hollow, curved fungal growths that support a fruiting body." msgstr "" -#: doc.lua:115 +#: doc.lua:120 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material. The fruiting body accumulates high-energy compounds that, when " @@ -433,7 +456,7 @@ msgid "" "tunnel tube spawn through the still cavern air." msgstr "" -#: doc.lua:117 +#: doc.lua:122 msgid "" "The trunk of a tunnel tube can be cut and processed to produce plywood-like " "material." @@ -447,6 +470,12 @@ msgstr "" msgid "Cavern Fungi" msgstr "" +#: features\cave_coral.lua:6 +#: features\cave_coral.lua:18 +#: features\cave_coral.lua:30 +msgid "Cave Coral" +msgstr "" + #: features\flowstone_nodes.lua:19 msgid "Dry Dripstone" msgstr "" @@ -487,18 +516,6 @@ msgstr "" msgid "Big Crystal" msgstr "" -#: features\glow_water.lua:6 -msgid "Mese Water" -msgstr "" - -#: features\glow_water.lua:55 -msgid "Flowing Mese Water" -msgstr "" - -#: features\glow_water.lua:160 -msgid "Glow Water Bucket" -msgstr "" - #: features\glow_worms.lua:6 msgid "Glow Worms" msgstr "" @@ -511,6 +528,10 @@ msgstr "" msgid "Cobblestone With Floor Fungus" msgstr "" +#: features\snareweed.lua:6 +msgid "Snareweed" +msgstr "" + #: plants\cave_wheat.lua:10 #: plants\cave_wheat.lua:69 msgid "Cave Wheat" diff --git a/textures/dfcaverns_bucket_glow_water.png b/textures/dfcaverns_bucket_glow_water.png deleted file mode 100644 index 64a1fec9bf2fa22fa55fdc41c96a21feadb7ce2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7aP)kb+@6r5uc`x@kB(0{&An4idx%YhEcfNBj{A0+`gsM8Q zYS`IH^j)-!<f3$+Mj7O7UN2fFCQEt(CVz1lt--?u20-czYm4(ptw z0;<(2>2&%KKkf+4P-sUwZ0`mE4nP3HFa!iu8CpDam0j1>LZLtyhWNe@KoA6Yo=2%v z>XSd*#2&Nn`vgG%faiIC|CtU{49g#7|1a?ioI~B|bs%Y900000NkvXXu0mjf(_Rbm diff --git a/textures/dfcaverns_cave_coral.png b/textures/dfcaverns_cave_coral.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d7642efcb2cd7bcfcaf1aa97c607083ba5e04f GIT binary patch literal 848 zcmV-W1F!svP)WFU8GbZ8()Nlj2>E@cM*00Oj0L_t(I%RSQFa@#~0 zfZ=z))oNwQPMoBU9a4s-<&YVUxe#W!8E%bRfP+q_JzxeJ(w~^bmSxGS)&6kCa}AIB z^_QRX?aS}^?fvg;Ki#vm73*rjhrT1{k)M9}k+XWq+joDEbL8&T8y=rJKHmSy;(UQr zw&XO9^v4d3qONM{^@i0qYs#WP6y&bQPXV72QEOJ~HCk(wR!CA14lSn8*wRop75m3W z`sW>GQJ}LT6_#>whIgLvbV6B+B*-x$l0n&u93nGoshc_0R+yZTkYMo4L!#YoQKE=_ z&zJWfP+F05Mr>*E&(EaMQ|bbvG|r8nK%@JZZ;^jXPpZ;Z>MnX=w5V-tygF87AF!_;ow`13}Ofk}S zEmA0!w=ZcAJ(A`%cdzfbd~rz(kpzS(Qa3eODRgDIy1n7*#fqFWwz8-g`Evh}Y%~(X zL>xTc2eK%poUu(!3JEcSF^2x+aFau!sBMipJLhtJjVM7>$}CoEip3djaQJ?}&T4FB zNzQ{nRcI<(QksIQsd)PI8P^@CY)N6ph>SbB-3}v)94G#H`wm1q$dp=`FPGS+A^HiW6ovPJi@WbQW1w$$^zMZ8o}m4p;k literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_cave_coral_end.png b/textures/dfcaverns_cave_coral_end.png new file mode 100644 index 0000000000000000000000000000000000000000..3c21aca267fbb82980aae5cd03dc7db66d4e7fde GIT binary patch literal 858 zcmV-g1Eu_lP)603B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00O>AL_t(I%LT#9a^pl8 zfYGo2Zb@xhz9{k7A;VDA3>%(-74JY5RlEz2$ZptBQ;?9`1V^?c%er?r=cwO*{UyXE zMhoDfA4kSS6GWj+gwzdbn&O86V=evA;}wL-@wGT1NfMK0d#a}++OAnLW3$|2nt++$ z{`r+-UUF_c!>J`nHYCAPbdHOgFkZn>mHg??BoBYl6epHt#&oWTW5e-uz4CBOwfKrOODTqWPT4U#P zqHRJ~zoC7=*f_x@3$opwYb_8*w9SR?($Vw{eb=*Iq^wpcacp6lsJj*cwAKg$_1!(v zjub`1SdUcy6)e{oJDc+D^^S$aNHEOOjQTvV`}B!0Ih0bEe;%K>+1^k-d_jz+tQ&?H zhW^5_ICAshJBp`A*5bJP{4XNH>mRRp6%Zq+-+uln_z-Xe0Gx9;QFQ%)4<0o-)~f|Z k8@%^SZbB&qA_N!sAF-Erh|fUtTmS$707*qoM6N<$f+M|v5&!@I literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_snareweed.png b/textures/dfcaverns_snareweed.png new file mode 100644 index 0000000000000000000000000000000000000000..da5377a488abddf5fe3c78141448258b0531cd09 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85p>QL70(Y)*K0-AX}2Ry9>jA5L~c#`DCC7dx@v7EBhl>aTYOk zowpJ4K%ohqE{-7<{>cZ}w@iKdPusimZ+np^b6*-x{hfEYV#Hwv$tAUH zLemv;DsBjHJ8Wx;X_VnRk=P=B;1WaRKlV%|HQojWH;JANCJam!ml<6%8CW=$GqSNU Z=$QK7-#KZ`AE4V9JYD@<);T3K0RXuTT2uf4 literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_snareweed_roots.png b/textures/dfcaverns_snareweed_roots.png new file mode 100644 index 0000000000000000000000000000000000000000..f0425ef0f47da46fb9113e1a761cc8fef306429e GIT binary patch literal 710 zcmV;%0y+JOP)>|F%K4+h?wd3^JJz6T;g;MtYH zvmX-?{^bOoUFg~z0QR>x&9Jd^w&XigI7G>J3MJo}#Q;teth)g2cYOf>^_F_*n&M2< z+wR67v zHkLP^l9aOmeN|C-8$biVmp%eF!>0gz1LNx;r31KBZ>cwKhEFg}tdf*XfK~t;2e1y{ zxfraG3w@4=wn&o86UGaFIJFBfm!#ZdoWEXgM04@@K7wR^^iHSUy1<3dqjp28D6~Ly z42&sFH$LiF>*nBxBG&avr`?$RC5&YNTGaYA4&W95@RIM80XP6=G(Axesmzj!4o;~~ zWJS&0O1xZouwUo8vBovAAD_YyfKLEYJYj5CYa3Spz#mFg!C2pz>&?z(-%6G>BQ*`+ sUayIPXIK8Tae-&g{%te+r2Iel4KhYR?%TtyIsgCw07*qoM6N<$g3ir8@&Et; literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_spark.png b/textures/dfcaverns_spark.png deleted file mode 100644 index a18643a66beeab4339246aab5aa023e734996aab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^%plCc1|-8Yw(bW~Y)RhkEUnfx)>bHL)Z$ zMWH;iBtya7(>EYRFO?mn(9^{+gyXvJ$&H*03>*hG)V=*#D0GL3)9?c0Vta1yeA$DR ScaGl!nc(T_=d#Wzp$P!KpDtej From ac231edaebd6d6f3a13c878df9a4d2cba1730a61 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 24 May 2018 19:37:12 -0600 Subject: [PATCH 13/25] add snareweed "radiant" damage --- depends.txt | 3 ++- features/flowstone_nodes.lua | 24 +++--------------------- features/snareweed.lua | 16 +++++++++++++++- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/depends.txt b/depends.txt index c333993..e03b9dd 100644 --- a/depends.txt +++ b/depends.txt @@ -8,4 +8,5 @@ wool? magma_conduits? intllib? doc? -simplecrafting_lib? \ No newline at end of file +simplecrafting_lib? +radiant_damage? \ No newline at end of file diff --git a/features/flowstone_nodes.lua b/features/flowstone_nodes.lua index a8bbe43..2979e7e 100644 --- a/features/flowstone_nodes.lua +++ b/features/flowstone_nodes.lua @@ -15,7 +15,7 @@ minetest.register_alias("subterrane:dry_flowstone", "dfcaverns:dry_flowstone") ----------------------------------------------- -subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", { +dfcaverns.dry_stalagmite_ids = subterrane.register_stalagmite_nodes("dfcaverns:dry_stal", { description = S("Dry Dripstone"), _doc_items_longdesc = dfcaverns.doc.dripstone_desc, _doc_items_usagehelp = dfcaverns.doc.dripstone_usage, @@ -39,7 +39,7 @@ minetest.register_node("dfcaverns:dry_flowstone", { ----------------------------------------------- -subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", { +dfcaverns.wet_stalagmite_ids = subterrane.register_stalagmite_nodes("dfcaverns:wet_stal", { description = S("Wet Dripstone"), _doc_items_longdesc = dfcaverns.doc.dripstone_desc, _doc_items_usagehelp = dfcaverns.doc.dripstone_usage, @@ -64,7 +64,7 @@ minetest.register_node("dfcaverns:wet_flowstone", { ----------------------------------------------- -subterrane.register_stalagmite_nodes("dfcaverns:icicle", { +dfcaverns.icicle_ids = subterrane.register_stalagmite_nodes("dfcaverns:icicle", { description = S("Icicle"), _doc_items_longdesc = dfcaverns.doc.icicle_desc, _doc_items_usagehelp = dfcaverns.doc.icicle_usage, @@ -74,21 +74,3 @@ subterrane.register_stalagmite_nodes("dfcaverns:icicle", { 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} diff --git a/features/snareweed.lua b/features/snareweed.lua index 6125d93..a1f7ee3 100644 --- a/features/snareweed.lua +++ b/features/snareweed.lua @@ -8,7 +8,6 @@ minetest.register_node("dfcaverns:snareweed", { _doc_items_usagehelp = dfcaverns.doc.snareweed_usage, tiles = {"default_dirt.png^dfcaverns_snareweed_roots.png", "default_dirt.png"}, drawtype="plantlike_rooted", --- paramtype = "light", paramtype2 = "leveled", special_tiles = {{name = "dfcaverns_snareweed.png", tileable_vertical = true}}, is_ground_content = true, @@ -18,6 +17,21 @@ minetest.register_node("dfcaverns:snareweed", { sounds = default.node_sound_dirt_defaults(), }) +if minetest.get_modpath("radiant_damage") then + radiant_damage.register_radiant_damage({ + damage_name = "snareweed", -- a string used in logs to identify the type of damage dealt + interval = 1, -- number of seconds between each damage check + range = 5, -- range of the damage. Can be omitted if inverse_square_falloff is true, in that case it defaults to the range at which 1 point of damage is done. + inverse_square_falloff = false, -- if true, damage falls off with the inverse square of the distance. If false, damage is constant within the range. + damage = 2, -- number of damage points dealt each interval + nodenames = {"dfcaverns:snareweed"}, -- nodes that cause this damage. Same format as the nodenames parameter for minetest.find_nodes_in_area + occlusion = false, -- if true, damaging effect only passes through air. Other nodes will cast "shadows". + above_only = true, -- if true, damage only propagates directly upward. + cumulative = false, -- if true, all nodes within range do damage. If false, only the nearest one does damage. + }) +end + + local c_water = minetest.get_content_id("default:water_source") local c_dirt = minetest.get_content_id("default:dirt") local c_snareweed = minetest.get_content_id("dfcaverns:snareweed") From dbf4cc08c81f3f37f0780364eaff465bca7be46e Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 24 May 2018 20:55:19 -0600 Subject: [PATCH 14/25] add subtle animation to glow worms --- features/glow_worms.lua | 12 +++++++++++- textures/dfcaverns_glow_worm_animated.png | Bin 0 -> 1821 bytes textures/license.txt | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 textures/dfcaverns_glow_worm_animated.png diff --git a/features/glow_worms.lua b/features/glow_worms.lua index bd06624..9f92c0d 100644 --- a/features/glow_worms.lua +++ b/features/glow_worms.lua @@ -6,7 +6,17 @@ minetest.register_node("dfcaverns:glow_worm", { description = S("Glow Worms"), _doc_items_longdesc = dfcaverns.doc.glow_worms_desc, _doc_items_usagehelp = dfcaverns.doc.glow_worms_usage, - tiles = {"dfcaverns_glow_worm.png"}, + tiles = { + { + name = "dfcaverns_glow_worm_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 4.0, + }, + }, + }, inventory_image = "dfcaverns_glow_worm.png", wield_image = "dfcaverns_glow_worm.png", is_ground_content = true, diff --git a/textures/dfcaverns_glow_worm_animated.png b/textures/dfcaverns_glow_worm_animated.png new file mode 100644 index 0000000000000000000000000000000000000000..e16f87000b02aa93040fc0aba69191648a3a70b8 GIT binary patch literal 1821 zcmV+&2jcjNP)EK|00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru;sqH39RQ9&KRy5e2C7L! zK~#9!?VHbw97PnzzqOaB>mlY8^rZd)IRykEpcm1L2XEdyik1T9C;>2AmFw>wW( z@xp3(2mlZ}FQ+803d1TIK4Og7*3Fb;$9XvtD(56~sb}qqvAT_>bz?7oZIfirsc=?m zz-R3!q-QC~F-dnARkM(j9FklBfR~Ihp8$BLWZ8+G1)ps$14!#^5LNV`>;C4mtW;hu zTL6F|$rk~P1Tj4hpsbIWmXkbO=0Re8+_kPW_L!vDvreEA+a!}v9i;sCad&AWjSjjY`p9gz zmYkQXW?_ruwBW(>#+dH_yj!wtG0v8!k&6KObv77O^kB#I<`s$y;=v8UV9O-GambYT zcyKC^%011x@IMdk1rMS?9wc|22kw4gb!I$hH|0Tje-O_f4=y+5!N-9-7|e_ZxsnG- z*_jeytmVp5PyTde?&HCxr#urDV^zE`sM{xIb{Rh^G(xFzD)@rr;$vUD(5<0wxzS)A z3~kT40#t(OyIP}W2X(esuXtgH9TMR@ zG4UudlSGsW=ZP&3OvGWm7s!LI{aBC=HtmUBFQ8}Mt-Vj77s};{CC@3rkX0;5i+JG` zW6W0oUM|5SBl&QROFvd;gH}c56HU$&x7@NZ$%!D%%%19&ec`%qUFa&}g2#KJar-4m7U(8hI7zOmz}oN3ktcXmGa3CYKUScqhLntWrghE%5bV?Tgz z0lev?44?7D3lox)VqtmJ7<0|3oZ2LPuVTEP?sjbyjh-no-*n@J#KuhS7sn)@aE3vW zziW;^PYNmHjZhu5_aeWr9KwV1R^J*PWG)ZdN*-Kl%7bW6c`))s=`-QM8G9(-hzA3W z4th0f<~AOD58(Ac9^^JZcZUbJoyv7QxYd*gQ4=0)HQ~Wu_G-nhd9Xrqttk(Bnsa5J zKCVdT${k^kwBIB1H8__awLHi}&J(Fw7h(_2PI#^qZPP*F7-c3JW6awCUUPgQwP(=5 zvOOlm3qwu5@t6?ybTv9y@szKXdC(_$5WqFZrKcnpJv=Dx@RqapD^k#AfB@K$NeBxyW6SSPt&CEKZujRqAxXxG`IYT?*n zbSij|xH=%oKLC6v+(&Y)J|=lc(_Odxc*vc+x<)%19;Bf>IN;&I%?ekaV;)SJ@?cGK z3@+V282?9jurZ%J_$Yt}6CV$vKpv>_jXoQQi%?$~FXS!{o)ug=w>}~b?~rTws3MQx zbM;y_4mI}=T=GmRc(7xi*tf@C<@tWHf(JJ=JV=DCesF%F_-~0$$bDrWWm+NU%EcXw zNLUxDqM4*BZY-#LvSJ4tHMzGQ%mXP0*Oz!uoG-hTpThRr4k^hOH0OycP4dodO}Mk|2&vB<-uYF4=y+1L9`nlEX^kmCJz=52KOBg%2WFfCuJIBQN`6w00000 LNkvXXu0mjf9+p6* literal 0 HcmV?d00001 diff --git a/textures/license.txt b/textures/license.txt index de3b54d..76b969e 100644 --- a/textures/license.txt +++ b/textures/license.txt @@ -14,6 +14,7 @@ dftrees_tower_cap_gills - from caverealms mushroom gills dftrees_cave_moss and floor_fungus - derived from caverealms algae dfcaverns_fungi - copied from caverealms dfcaverns_glow_worm - copied from caverealms +dfcaverns_glow_worm_animated - glow worm texture overlaid with rippling animation derived from default mod's water texture dftrees_cave_wheat - derived from farming wheat dfcaverns_flour - derived from farming From e8ddd1e4b14da9c20ff29236507613333c50bfa0 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Fri, 25 May 2018 23:52:46 -0600 Subject: [PATCH 15/25] switch stalagmite function call to new name --- biomes.lua | 4 ++-- biomes/level1.lua | 16 ++++++++-------- biomes/level2.lua | 28 ++++++++++++++-------------- biomes/level3.lua | 30 +++++++++++++++--------------- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/biomes.lua b/biomes.lua index 7cdac02..0f968de 100644 --- a/biomes.lua +++ b/biomes.lua @@ -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, dfcaverns.dry_stalagmite_ids) + subterrane:small_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) end end diff --git a/biomes/level1.lua b/biomes/level1.lua index 55ee2e7..6427a51 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids) end end diff --git a/biomes/level2.lua b/biomes/level2.lua index 17028d3..7dfe901 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -50,7 +50,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -74,7 +74,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -98,7 +98,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -124,7 +124,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -150,7 +150,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -176,7 +176,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -193,7 +193,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -220,7 +220,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids) end end @@ -244,7 +244,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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids) end end @@ -256,7 +256,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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) end end @@ -268,7 +268,7 @@ local level_2_black_cap_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) elseif math.random() < 0.25 then data[ai] = c_stone_with_coal end @@ -287,7 +287,7 @@ local level_2_crystal_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) end end @@ -319,7 +319,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids) end end @@ -333,7 +333,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids) end end diff --git a/biomes/level3.lua b/biomes/level3.lua index cd8c213..08e8955 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -45,7 +45,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -71,7 +71,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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids) end end @@ -93,7 +93,7 @@ local level_3_crystal_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.dry_stalagmite_ids) end end @@ -119,7 +119,7 @@ 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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids) end end @@ -140,7 +140,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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) end end @@ -152,7 +152,7 @@ local level_3_black_cap_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) elseif math.random() < 0.25 then data[ai] = c_stone_with_coal end @@ -172,7 +172,7 @@ local level_3_crystal_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, dfcaverns.dry_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.dry_stalagmite_ids) end end @@ -193,7 +193,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, dfcaverns.dry_stalagmite_ids) + subterrane:small_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 @@ -222,7 +222,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, dfcaverns.icicle_ids) + subterrane:small_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 @@ -247,7 +247,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -273,7 +273,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -299,7 +299,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, dfcaverns.dry_stalagmite_ids) + subterrane:small_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 @@ -323,7 +323,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_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 @@ -353,7 +353,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, dfcaverns.wet_stalagmite_ids) end end @@ -367,7 +367,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, dfcaverns.wet_stalagmite_ids) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, dfcaverns.wet_stalagmite_ids) end end From bf2c15258f5a31c1ed7875056eb801f2dc9d9340 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sat, 26 May 2018 00:46:23 -0600 Subject: [PATCH 16/25] add a config setting to greatly reduce flooded caves --- biomes/level1.lua | 35 ++++++++++++++++++--------- biomes/level2.lua | 28 ++++++++++++++++----- biomes/level3.lua | 24 +++++++++++++++--- config.lua | 2 ++ settingtypes.txt | 5 +++- textures/dfcaverns_glow_ruby_ore.png | Bin 329 -> 691 bytes 6 files changed, 73 insertions(+), 21 deletions(-) diff --git a/biomes/level1.lua b/biomes/level1.lua index 6427a51..26a8ed2 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -11,8 +11,6 @@ local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fun 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 - 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 local c_plump_helmet = minetest.get_content_id("dfcaverns:plump_helmet_4") -- param2 = 0-3 @@ -22,6 +20,9 @@ local c_cave_wheat = minetest.get_content_id("dfcaverns:cave_wheat_8") -- param2 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 subsea_level = (dfcaverns.config.ymax - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level1_min +local flooded_biomes = dfcaverns.config.flooded_biomes + local level_1_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return @@ -161,11 +162,17 @@ local level_1_underwater_floor = function(area, data, ai, vi, bi, param2_data) else data[bi] = c_dirt end - if data[vi] == c_air then - data[vi] = c_water - end - if data[ai] == c_air then - data[ai] = c_water + if flooded_biomes then + if data[vi] == c_air then + data[vi] = c_water + end + if data[ai] == c_air then + data[ai] = c_water + end + elseif math.random() < 0.01 then + if data[vi] == c_air then + data[vi] = c_water + end end end @@ -209,6 +216,12 @@ end ------------------------------------------------------------------------------------------- +local c_flood_fill +if flooded_biomes then + c_flood_fill = c_water +else + c_flood_fill = c_air +end minetest.register_biome({ name = "dfcaverns_level1_flooded_biome_lower", @@ -217,7 +230,7 @@ minetest.register_biome({ heat_point = 50, humidity_point = 100, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_1_underwater_floor, _subterrane_mitigate_lava = true, }) @@ -231,7 +244,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_1_moist_ceiling, _subterrane_floor_decor = level_1_wet_floor, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_mitigate_lava = true, }) @@ -298,7 +311,7 @@ minetest.register_biome({ heat_point = 20, humidity_point = 80, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_1_underwater_floor, _subterrane_mitigate_lava = true, }) @@ -325,7 +338,7 @@ minetest.register_biome({ heat_point = 80, humidity_point = 80, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_1_underwater_floor, _subterrane_mitigate_lava = true, }) diff --git a/biomes/level2.lua b/biomes/level2.lua index 7dfe901..efdf42d 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -18,7 +18,6 @@ local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fun 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 local c_plump_helmet = minetest.get_content_id("dfcaverns:plump_helmet_4") -- param2 = 0-3 @@ -29,7 +28,7 @@ local c_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0 local subsea_level = (dfcaverns.config.level1_min - dfcaverns.config.level2_min) * 0.3 + dfcaverns.config.level2_min - +local flooded_biomes = dfcaverns.config.flooded_biomes local level_2_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then @@ -296,8 +295,19 @@ local level_2_underwater_floor = function(area, data, ai, vi, bi, param2_data) return end data[bi] = c_dirt - if data[vi] == c_air then data[vi] = c_water end - if data[ai] == c_air then data[ai] = c_water end + + if flooded_biomes then + if data[vi] == c_air then + data[vi] = c_water + end + if data[ai] == c_air then + data[ai] = c_water + end + elseif math.random() < 0.01 then + if data[vi] == c_air then + data[vi] = c_water + end + end end local level_2_cave_floor = function(area, data, ai, vi, bi, param2_data) @@ -339,6 +349,12 @@ end ------------------------------------------------------------------------------------------- +local c_flood_fill +if flooded_biomes then + c_flood_fill = c_water +else + c_flood_fill = c_air +end minetest.register_biome({ name = "dfcaverns_level2_flooded_biome_lower", @@ -347,7 +363,7 @@ minetest.register_biome({ heat_point = 50, humidity_point = 90, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_2_underwater_floor, _subterrane_mitigate_lava = false, }) @@ -361,7 +377,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_2_moist_ceiling, _subterrane_floor_decor = level_2_wet_floor, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_mitigate_lava = true, }) diff --git a/biomes/level3.lua b/biomes/level3.lua index 08e8955..68694f0 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -34,6 +34,7 @@ local c_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0 local subsea_level = (dfcaverns.config.level2_min - dfcaverns.config.level3_min) * 0.3 + dfcaverns.config.level3_min +local flooded_biomes = dfcaverns.config.flooded_biomes local level_3_moist_ceiling = function(area, data, ai, vi, bi, param2_data) if data[ai] ~= c_stone then @@ -128,8 +129,19 @@ local level_3_underwater_floor = function(area, data, ai, vi, bi, param2_data) return end data[bi] = c_dirt - if data[vi] == c_air then data[vi] = c_water end - if data[ai] == c_air then data[ai] = c_water end + + if flooded_biomes then + if data[vi] == c_air then + data[vi] = c_water + end + if data[ai] == c_air then + data[ai] = c_water + end + elseif math.random() < 0.01 then + if data[vi] == c_air then + data[vi] = c_water + end + end end local level_3_dry_ceiling = function(area, data, ai, vi, bi, param2_data) @@ -373,6 +385,12 @@ end ------------------------------------------------------------------------------------------- +local c_flood_fill +if flooded_biomes then + c_flood_fill = c_water +else + c_flood_fill = c_air +end minetest.register_biome({ name = "dfcaverns_level3_flooded_biome_lower", @@ -394,7 +412,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_3_moist_ceiling, _subterrane_floor_decor = level_3_wet_floor, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_mitigate_lava = true, }) diff --git a/config.lua b/config.lua index ba1febe..79b5544 100644 --- a/config.lua +++ b/config.lua @@ -83,6 +83,8 @@ setting("int", "lava_sea_min", -3500, "Lower limit of the lava sea") setting("float", "lava_sea_threshold", 0.2, "Cavern threshold for sunless and magma seas (higher number means sparser magma)") setting("bool", "enable_lava_sea", true, "Enable magma sea level") +setting("bool", "flooded_biomes", true, "Add a lot of water to the most humid cavern biomes") + if minetest.get_modpath("tnt") then dfcaverns.config.enable_tnt = minetest.settings:get_bool("enable_tnt") if dfcaverns.config.enable_tnt == nil then diff --git a/settingtypes.txt b/settingtypes.txt index 189a79c..2390f0b 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -48,4 +48,7 @@ dfcaverns_lava_sea_min (Lower limit of the lava sea) int -3500 #Determines threshold for lower sea cave generation. Higher number means sparser cavern dfcaverns_lava_sea_threshold (Cavern threshold for magma sea) float 0.2 0.0 1.0 #When true, the lava sea level is generated -dfcaverns_enable_lava_sea (Lower sea is lava) bool true \ No newline at end of file +dfcaverns_enable_lava_sea (Lower sea is lava) bool true +#When true cavern biomes at the most extreme humidity range will be flooded +#with water, providing significant challenges in those areas. +dfcaverns_flooded_biomes (Add a lot of water to the most humid cavern biomes) bool true \ No newline at end of file diff --git a/textures/dfcaverns_glow_ruby_ore.png b/textures/dfcaverns_glow_ruby_ore.png index 31ecb63b8ae91edf1889ef9936b582e70608f681..d63a4ba9a83d122a189f65b9887c344a2c6d1519 100644 GIT binary patch delta 678 zcmV;X0$KgZ0<#5>8Gix*005AYXf^-<00v@9M??Vs0RI60puMM)00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-*q8U`W$@Pfrt36vfZ&JeYPy zrP96*5sFCC71D)KED;ikajA(5;!2F}aOXm56>2O9V%)g#JAb(G3%D>*kVbYC6L-=E z3FX-mLg#gAnRzY-o0@o*_vUx*U%EGShlq#>fKtlyJf##t0jSy1G)({j0ssOjBJF+r z!steErLQZUFRc&qM_;y9dQSq#tnXYC&iKyZRX6x4%$}bZ96vZ3|9QwBLLgzj%9pZ9 zj{W_P#6V_!3x92TF%Trc6(U0wSYS%2P$;BXMs7m@XreMZbQ%B=&2Lr#NGSniAfeD` zH0bu^ zRQ%l2n1@)zaU1};uFr2)=gxPVL~LfQs98J^i)fs?LVq-I4CMZj05r>R0n;>zh%Kl3 z)AyO zQ~dyDZDYZd0BqYf48w1aZr!}0cj}7B2nAb<_aDFAmi5-x_<)r15Ay#6tEc=k!Tw^ zR8v+{Qdd+{S5;M4R#jM3R9ID1UtC*YTv}jVTwz^XVP0KgU0h;cUSnWiWnf=uWn^z` zYj19CaBXbJI9AO~XwX`7(P4Pjbc_H0|Fs^15&!@Ip-DtRRDT#5CBXqg!Y~X#(O49l zDBH*~MSo~}|5IA*p_vDTbAo}cexXMv#vmHeWa9v>757nW+pG1!1-K3r<0hO zDkM+t()-{cdD`XpFntG9OQ}>Bvh~5g#6yCtwG=rikd8QH>qD7T?IPP&OHm!%Cis$? zK(wEms)Aj_Ju-l7{TGsOAuxk9Gp1c4At9ngsJqMSr}-3NX6mkgtq~L+#fjGH00000 LNkvXXu0mjflc$7c From 11f566fc1fc5ebb9faad3454784e24451c5993d2 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sat, 26 May 2018 22:14:09 -0600 Subject: [PATCH 17/25] import radiant_damage code to handle different height snareweed nodes --- config.lua | 2 ++ depends.txt | 3 +-- features/snareweed.lua | 35 +++++++++++++++++++++++------------ settingtypes.txt | 1 + 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/config.lua b/config.lua index 79b5544..83f6bee 100644 --- a/config.lua +++ b/config.lua @@ -65,6 +65,8 @@ end setting("float", "glow_worm_delay_multiplier", 10.0, "glow worm growth delay multiplier") setting("bool", "light_kills_fungus", true, "Light kills fungus") +setting("bool", "snareweed_damage", true, "Snareweed causes damage to players") + --Caverns setting("float", "vertical_cavern_scale", 256, "Vertical cavern dimension scale") diff --git a/depends.txt b/depends.txt index e03b9dd..c333993 100644 --- a/depends.txt +++ b/depends.txt @@ -8,5 +8,4 @@ wool? magma_conduits? intllib? doc? -simplecrafting_lib? -radiant_damage? \ No newline at end of file +simplecrafting_lib? \ No newline at end of file diff --git a/features/snareweed.lua b/features/snareweed.lua index a1f7ee3..799ba84 100644 --- a/features/snareweed.lua +++ b/features/snareweed.lua @@ -17,18 +17,29 @@ minetest.register_node("dfcaverns:snareweed", { sounds = default.node_sound_dirt_defaults(), }) -if minetest.get_modpath("radiant_damage") then - radiant_damage.register_radiant_damage({ - damage_name = "snareweed", -- a string used in logs to identify the type of damage dealt - interval = 1, -- number of seconds between each damage check - range = 5, -- range of the damage. Can be omitted if inverse_square_falloff is true, in that case it defaults to the range at which 1 point of damage is done. - inverse_square_falloff = false, -- if true, damage falls off with the inverse square of the distance. If false, damage is constant within the range. - damage = 2, -- number of damage points dealt each interval - nodenames = {"dfcaverns:snareweed"}, -- nodes that cause this damage. Same format as the nodenames parameter for minetest.find_nodes_in_area - occlusion = false, -- if true, damaging effect only passes through air. Other nodes will cast "shadows". - above_only = true, -- if true, damage only propagates directly upward. - cumulative = false, -- if true, all nodes within range do damage. If false, only the nearest one does damage. - }) +if dfcaverns.config.snareweed_damage then + local timer = 0 + + minetest.register_globalstep(function(dtime) + timer = timer + dtime + if timer >= 1 then + timer = timer - 1 + for _, player in pairs(minetest.get_connected_players()) do + local player_pos = player:getpos() -- node player's feet are in this location. + local rounded_pos = vector.round(player_pos) + nearby_nodes = minetest.find_nodes_in_area(vector.add(rounded_pos, {x=0, y= -8, z=0}), rounded_pos, {"dfcaverns:snareweed"}) + for _, node_pos in ipairs(nearby_nodes) do + local node = minetest.get_node(node_pos) + local distance = player_pos.y - node_pos.y + if distance <= node.param2/16 then + minetest.log("action", player:get_player_name() .. " takes 2 damage from snareweed") + player:set_hp(player:get_hp() - 2) + break + end + end + end + end + end) end diff --git a/settingtypes.txt b/settingtypes.txt index 2390f0b..46968c9 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -22,6 +22,7 @@ dfcaverns_sweet_pod_delay_multiplier (sweet_pod growth delay multiplier) float 2 #To disable glow worm growth, set this to 0. dfcaverns_glow_worm_delay_multiplier (glow worm growth delay multiplier) float 10 dfcaverns_light_kills_fungus (Light kills fungus) bool true +dfcaverns_snareweed_damage (Snareweed causes damage to player) bool true [Cavern dimensions] #Note that this doesn't guarantee caverns of this setting's size. This setting From 781e08393b88162bf85119c8551fadc0ccb460f4 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sat, 26 May 2018 22:18:41 -0600 Subject: [PATCH 18/25] fix name of enable_lava_sea option, add pos to snareweed log string --- features/snareweed.lua | 2 +- settingtypes.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/snareweed.lua b/features/snareweed.lua index 799ba84..ad1a69a 100644 --- a/features/snareweed.lua +++ b/features/snareweed.lua @@ -32,7 +32,7 @@ if dfcaverns.config.snareweed_damage then local node = minetest.get_node(node_pos) local distance = player_pos.y - node_pos.y if distance <= node.param2/16 then - minetest.log("action", player:get_player_name() .. " takes 2 damage from snareweed") + minetest.log("action", player:get_player_name() .. " takes 2 damage from snareweed at " .. minetest.pos_to_string(node_pos)) player:set_hp(player:get_hp() - 2) break end diff --git a/settingtypes.txt b/settingtypes.txt index 46968c9..aa6fece 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -49,7 +49,7 @@ dfcaverns_lava_sea_min (Lower limit of the lava sea) int -3500 #Determines threshold for lower sea cave generation. Higher number means sparser cavern dfcaverns_lava_sea_threshold (Cavern threshold for magma sea) float 0.2 0.0 1.0 #When true, the lava sea level is generated -dfcaverns_enable_lava_sea (Lower sea is lava) bool true +dfcaverns_enable_lava_sea (Generate magma sea) bool true #When true cavern biomes at the most extreme humidity range will be flooded #with water, providing significant challenges in those areas. dfcaverns_flooded_biomes (Add a lot of water to the most humid cavern biomes) bool true \ No newline at end of file From b29865264657972d1cf4379df556b7a879441b9a Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 27 May 2018 10:53:46 -0600 Subject: [PATCH 19/25] Adding readme --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..072cc34 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +Inspired by the world of Dwarf Fortress, this mod adds a series of vast cavern layers to the depths of Minetest with a variety of biomes that are populated with the flora of Dwarf Fortress. + +## Cavern Layers + +The underworld is divided into a number of cavern "layers" with a variety of biomes and other features distributed throughout. As one goes deeper one will find increasingly bizzare flora and exotic environments that provide new challenges and opportunities for players. + +The uppermost layer has "flooded" and "dry" caverns, as well as caverns containing the massive tree-like fungal growths of Fungiwood and Tower-Cap mushrooms. These provide a source of underground wood. Also found in this region are plump helmets (an edible farmable mushroom), pig tails (a fibrous fungus that can be grown and harvested for thread), and cave wheat (a pale grass-like growth whose seeds can be ground for flour). + +Fungiwood and Tower Caps can still be found the next layer down, though in smaller ranges as they are crowded by several new types of giant fungi. Here you can find Goblin Cap mushrooms, the squatter cousins of the Tower Caps. Spore Trees sprout in the warmer and wetter corners of the caverns, raising a climbable three-dimensional mesh or hyphyae above the ground that emits a gentle rain of spore powder. Tunnel Tubes grow in the hottest regions - tall, curved stalks with fruiting bodies at the tips that burst violently when ripe. And in the dryest regions are the pitch-black caverns of the Black Cap forests, rich with carbonaceous deposits that have accumulated over millions of years. Smaller plants that can be found here include quarry bushes (farmable for their spicy leaves) and dimple cups (whose eponymous parts can be ground to produce a brilliant blue dye). + +The third cavern layer no longer supports Fungiwood or Tower Caps, with strange new growths crowding them out. The frigid Nethercap caverns can be found here, the blue-tinted mushrooms leaching heat out of their environment in ways that shouldn't be thermodynamically possible. In the hotter areas the vicious Bloodthorn grows, with wicked spines that suck moisture from anything they can pierce. In caves too dry to support biological life enormous glowing crystals grow instead. Sweet pods can be found down here, a fungus whose fruiting bodies are rich in sugary substances. + +The third layer stops on the shores of the Sunless Sea, the ultimate destination of all water that flows downward through the twisty caves of Minetest. The caverns of the Sunless Sea are vast in extent but are flooded with water, and below the surface grows treacherous Snareweed and the rare hanging forests of softly-glowing Cave Coral. + +Below the Sunless Sea is a sea of a more dangerous sort: the Magma Ocean. These caverns are filled with dangerous molten rock, though there are riches to be had as well; mineral growths fed by the heat and pressure. + +By default, caverns belonging to the first cavern layer can be found between -300 and -900, the second cavern layer between -900 and -1500, and the third cavern layer between -1500 and -2100. The surface level of the Sunless Sea is at -2300 and the magma sea's surface is at -3150. + +## Other features + +The giant caverns generated by this mod differ slightly from the default giant caverns found in some mapgens, they use an additional source of noise to generate more ledges and horizontal floors. They also contain stalactites and stalagmites of various sizes - from single-node spikes decorating the default twisty tunnels to mountainous behemoths in the main caverns that can reach tens of meters in diameter and hundreds of meters in height. + +The trees and plants mentioned above are all farmable, but in contrast to the usual farmable plants and trees they only grow in the *absence* of bright light; attempting to plant them in sunlight will kill them. A set of recipes is added for cooking the edible ones into a variety of biscuits, stews, and roasts, and sweet pods can be refined into syrup. + +Some of the other cave decorations provide dim bioluminescent lighting in some caverns. Cave moss and hanging glow-worms are most common. There is also non-glowing floor fungus found coating the stone in less hospitable biomes, capable of spreading to adjacent cobblestone structures like a slow-creeping infection. + +## Dependencies and synergies with other mods + +This mod depends on the utility mod "subterrane", which was derived from Caverealms code which in turn was derived from Paramat's subterrain. + +"dynamic liquid" is also recommended to provide Dwarf Fortress-like fluid dynamics. "magma conduits" is recommended for a Dwarf Fortress like magmatic landscape. + +The "doc" mod is supported to provide in-game documentation for all of the new items and nodes this mod adds. \ No newline at end of file From 9ac703dd683690cdd01fa3892178aaf15dca78c8 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 27 May 2018 21:09:46 -0600 Subject: [PATCH 20/25] local variable --- features/snareweed.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/snareweed.lua b/features/snareweed.lua index ad1a69a..9fab27c 100644 --- a/features/snareweed.lua +++ b/features/snareweed.lua @@ -27,7 +27,7 @@ if dfcaverns.config.snareweed_damage then for _, player in pairs(minetest.get_connected_players()) do local player_pos = player:getpos() -- node player's feet are in this location. local rounded_pos = vector.round(player_pos) - nearby_nodes = minetest.find_nodes_in_area(vector.add(rounded_pos, {x=0, y= -8, z=0}), rounded_pos, {"dfcaverns:snareweed"}) + local nearby_nodes = minetest.find_nodes_in_area(vector.add(rounded_pos, {x=0, y= -8, z=0}), rounded_pos, {"dfcaverns:snareweed"}) for _, node_pos in ipairs(nearby_nodes) do local node = minetest.get_node(node_pos) local distance = player_pos.y - node_pos.y From 47b2b5084e219bb6a91e2a9bb14a6857976a00d3 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Tue, 29 May 2018 20:50:32 -0600 Subject: [PATCH 21/25] trim back the flooding a bit more when not using dynamic_liquid even a little water spreads a lot. --- biomes/level1.lua | 2 +- biomes/level2.lua | 2 +- biomes/level3.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/biomes/level1.lua b/biomes/level1.lua index 26a8ed2..e0f0027 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -169,7 +169,7 @@ local level_1_underwater_floor = function(area, data, ai, vi, bi, param2_data) if data[ai] == c_air then data[ai] = c_water end - elseif math.random() < 0.01 then + elseif math.random() < 0.001 then if data[vi] == c_air then data[vi] = c_water end diff --git a/biomes/level2.lua b/biomes/level2.lua index efdf42d..82e55ac 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -303,7 +303,7 @@ local level_2_underwater_floor = function(area, data, ai, vi, bi, param2_data) if data[ai] == c_air then data[ai] = c_water end - elseif math.random() < 0.01 then + elseif math.random() < 0.001 then if data[vi] == c_air then data[vi] = c_water end diff --git a/biomes/level3.lua b/biomes/level3.lua index 68694f0..ae2479c 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -137,7 +137,7 @@ local level_3_underwater_floor = function(area, data, ai, vi, bi, param2_data) if data[ai] == c_air then data[ai] = c_water end - elseif math.random() < 0.01 then + elseif math.random() < 0.001 then if data[vi] == c_air then data[vi] = c_water end From a3c8911df454742b5f9fcb5a3c5bfdd2e0285539 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Wed, 30 May 2018 00:40:03 -0600 Subject: [PATCH 22/25] add support for my fork of handholds, make floor fungus grosser --- depends.txt | 3 ++- features/flowstone_nodes.lua | 5 +++++ features/ground_cover.lua | 2 +- textures/dfcaverns_floor_fungus.png | Bin 888 -> 909 bytes 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/depends.txt b/depends.txt index c333993..f970689 100644 --- a/depends.txt +++ b/depends.txt @@ -8,4 +8,5 @@ wool? magma_conduits? intllib? doc? -simplecrafting_lib? \ No newline at end of file +simplecrafting_lib? +handholds? \ No newline at end of file diff --git a/features/flowstone_nodes.lua b/features/flowstone_nodes.lua index 2979e7e..285faa2 100644 --- a/features/flowstone_nodes.lua +++ b/features/flowstone_nodes.lua @@ -74,3 +74,8 @@ dfcaverns.icicle_ids = subterrane.register_stalagmite_nodes("dfcaverns:icicle", groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3}, sounds = default.node_sound_glass_defaults(), }) + +if minetest.get_modpath("handholds") and handholds ~= nil and handholds.register_handholds_node ~= nil then + handholds.register_handholds_node("dfcaverns:dry_flowstone", "dfcaverns:dry_flowstone_handholds", {description = S("Dry Flowstone Handholds")}) + handholds.register_handholds_node("dfcaverns:wet_flowstone", "dfcaverns:wet_flowstone_handholds", {description = S("Wet Flowstone Handholds")}) +end diff --git a/features/ground_cover.lua b/features/ground_cover.lua index 49ea16f..28e5c3a 100644 --- a/features/ground_cover.lua +++ b/features/ground_cover.lua @@ -53,7 +53,7 @@ minetest.register_node("dfcaverns:cobble_with_floor_fungus", { description = S("Cobblestone With Floor Fungus"), _doc_items_longdesc = dfcaverns.doc.floor_fungus_desc, _doc_items_usagehelp = dfcaverns.doc.floor_fungus_usage, - tiles = {"default_cobble.png^dfcaverns_floor_fungus.png", "default_cobble.png", "default_cobble.png^dfcaverns_floor_fungus_side.png"}, + tiles = {"default_cobble.png^dfcaverns_floor_fungus.png"}, drops = "default:cobble", is_ground_content = true, groups = {cracky = 3, stone = 2, slippery = 1, light_sensitive_fungus = 11}, diff --git a/textures/dfcaverns_floor_fungus.png b/textures/dfcaverns_floor_fungus.png index 5104ae5feea7e3c601fea8d8e13385522e3cf580..1717c6f94a5d733173edb7a3a3ca7349e5cf3121 100644 GIT binary patch delta 841 zcmV-P1GfD528{=hQGenE9tIu(NVUuk0009TNklPQhB*?}Mw9M}kAVq0jn*Vvopo^$uv zkF}TIhd+G()puH>5GF0c7El9cPHj6s(`wpDY1~_neX47hCx5@nM3_l6K?MI+O3(B( z@lV@3J1;BT^nP>J1AsH8c_0$M1tbdqpCGI{klwUyA4Rekuz!X~-w3D!ZEf=ANIYymYMz?Ht_@`?;DfOjdqE-hz1zn@xD3Y3`ME-u2%X9 zV9nl-FL6$nW`F&5;T-kHk=b~F<)OpVE51IOI&iuQdJb~~^b>=ES zev=d^5V`3pcN$`-piDOa#1^4@x^lHCV2XhLI)v$$!hd6GYD+{Ncu+qs?q zs4%CZV|a3faPOI|^kuR5DPq0!J}riEJu}+6`Fs&_77&P7I2lB!q;SqTh*J3l4FIaL zew0FvuGjw^jl=3tByCyimU`pyxN`0`fD9t|9J6^ZB0MIP zKU@``pQd;v#D3@O?Bd6+vn#~*n3Vghl=RB8i+^>}nZZ;56#xWdw3$MjtCZhvo3v0Q zpX<*2Jgw-?dc>#9L5$IXl&z(x7BHhm2>T-H0}(xxLQbpFYb{%oe|pe%{rNPZL*OIl zX1^*^9s~GW#<;^2Lv2izbl=YwQou{DV>=9KV%GW*l| Ta?`et00000NkvXXu0mjfUn7$_ delta 820 zcmV-41Izr42lxh%QGekB1r{R}s%@k#00098Nkl_ikO|pu*h(3UVAqE#&hzP!c8(+ZZaO2Vka3MlaaicC27XzXqh$8-sQRA4K+}qvN zT~()!3%?IP{_x$;MbHRSF;fH-)2zB$ZT7uH$7IhcORYxgEVzD*20n7!<4 z|I88>fHGeLFfK+vOYIvd;6?-aVp-<5i;ib)Q+c9wn}2iYG!Nt}aarSI2Gb!yWMTy3 zE~YeY#Yv5WT2GX&5za4|#jjQAGGe%)IX(xL!23pPY0gs8qJ$^j_Xq%{nn2?6_a(xk zeO1fGDtra8xfMd{hjHIKsoZ9BQFFFz5KGYnhyYd;a$bNr9|{0KU4_XC0U`H*(0N}Y zVgp3vkbgWO6%@3SMJFOq0dNH%P$`9od3~RV@3HuMS!L&32i>~=r|aYc=H-_#?QIx# zh*X8HJN(Iz{}_jDn!_H7!b6z?p4Hyp1u!$iCso~x5#dil`^4Ar$~?!zCHAZH^WEL` zy7~-pb)DG1R!Ta0wA&}i3RJ`YoD-XuSaHhNSAT7KgURm5+WkIn>6`tC@2f7Ob8<{v z)mFF#%t;WIOJ;n>Oso`I3l|nKn!|$|t9Acqo-rcm6W(_>*_9sv!cFJ=af*v`u1?bT zU1eptY@lVyOEG|A#s=7?FfH4Z6q(z{#re0)(r=Z_T=Zc;z{CPdh?NmL6BZ^?tXyqz ynJvML48WjR0#$36b8Tfj%4u*!1V}}5itrzB#m|$JmR%bF0000 Date: Wed, 30 May 2018 09:48:23 -0600 Subject: [PATCH 23/25] temporarily pull handholds until original author publishes API --- depends.txt | 3 +-- features/flowstone_nodes.lua | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/depends.txt b/depends.txt index f970689..c333993 100644 --- a/depends.txt +++ b/depends.txt @@ -8,5 +8,4 @@ wool? magma_conduits? intllib? doc? -simplecrafting_lib? -handholds? \ No newline at end of file +simplecrafting_lib? \ No newline at end of file diff --git a/features/flowstone_nodes.lua b/features/flowstone_nodes.lua index 285faa2..265a3ee 100644 --- a/features/flowstone_nodes.lua +++ b/features/flowstone_nodes.lua @@ -75,7 +75,3 @@ dfcaverns.icicle_ids = subterrane.register_stalagmite_nodes("dfcaverns:icicle", sounds = default.node_sound_glass_defaults(), }) -if minetest.get_modpath("handholds") and handholds ~= nil and handholds.register_handholds_node ~= nil then - handholds.register_handholds_node("dfcaverns:dry_flowstone", "dfcaverns:dry_flowstone_handholds", {description = S("Dry Flowstone Handholds")}) - handholds.register_handholds_node("dfcaverns:wet_flowstone", "dfcaverns:wet_flowstone_handholds", {description = S("Wet Flowstone Handholds")}) -end From da4ab38b4fa536c096ef905022d7ede2e049e210 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 31 May 2018 01:34:22 -0600 Subject: [PATCH 24/25] add fine floor fungus, variety to the lava sea --- biomes/lava_sea.lua | 92 ++++++++++++++++------- features/ground_cover.lua | 24 ++++++ init.lua | 1 + textures/dfcaverns_floor_fungus_fine.png | Bin 0 -> 945 bytes textures/dfcaverns_floor_fungus_side.png | Bin 542 -> 0 bytes voxelarea_iterator.lua | 75 ++++++++++++++++++ 6 files changed, 164 insertions(+), 28 deletions(-) create mode 100644 textures/dfcaverns_floor_fungus_fine.png delete mode 100644 textures/dfcaverns_floor_fungus_side.png create mode 100644 voxelarea_iterator.lua diff --git a/biomes/lava_sea.lua b/biomes/lava_sea.lua index 0565b7e..85f3403 100644 --- a/biomes/lava_sea.lua +++ b/biomes/lava_sea.lua @@ -10,55 +10,89 @@ local c_mesecry = minetest.get_content_id("dfcaverns:glow_mese") ------------------------------------------------------------------------------------------- -local lava_ceiling = function(area, data, ai, vi, bi) - if math.random() < 0.005 then - subterrane:giant_stalactite(ai, area, data, 6, 13, c_meseore, c_meseore, c_mesecry) +local mese_crystal_ceiling = function(area, data, ai, vi, bi) + if math.random() < 0.025 then + if math.random() < 0.25 then + subterrane:giant_stalactite(ai, area, data, 6, 13, c_meseore, c_meseore, c_mesecry) + else + data[vi] = c_meseore + if math.random() < 0.25 then + data[bi] = c_mesecry + end + end + end +end + +local mese_ore_ceiling = function(area, data, ai, vi, bi) + if math.random() < 0.025 then + data[vi] = c_meseore + if math.random() < 0.25 then + data[bi] = c_mesecry + end + end +end + +local mese_ore_floor = function(area, data, ai, vi, bi) + if math.random() < 0.01 then + data[vi] = c_meseore + if math.random() < 0.25 then + data[ai] = c_mesecry + end end end -local lava_sea_biome_def = { +local lava_sea_crystal_biome_def = { + name = "dfcaverns_lava_sea_with_mese_crystal", + y_min = dfcaverns.config.lava_sea_min, + y_max = dfcaverns.config.lava_sea_max, + heat_point = 80, + humidity_point = 20, + _subterrane_ceiling_decor = mese_crystal_ceiling, + _subterrane_floor_decor = mese_ore_floor, +} + +local lava_sea_mese_biome_def = { + name = "dfcaverns_lava_sea_with_mese", + y_min = dfcaverns.config.lava_sea_min, + y_max = dfcaverns.config.lava_sea_max, + heat_point = 60, + humidity_point = 40, + _subterrane_ceiling_decor = mese_ore_ceiling, +} + +local lava_sea_barren_biome_def = { name = "dfcaverns_lava_sea", y_min = dfcaverns.config.lava_sea_min, y_max = dfcaverns.config.lava_sea_max, - heat_point = 50, + heat_point = 40, humidity_point = 50, - _subterrane_ceiling_decor = lava_ceiling, } -minetest.register_biome(lava_sea_biome_def) -local airspace = (dfcaverns.config.lava_sea_max - dfcaverns.config.lava_sea_min) / 3 +minetest.register_biome(lava_sea_crystal_biome_def) +minetest.register_biome(lava_sea_mese_biome_def) +minetest.register_biome(lava_sea_barren_biome_def) + +local airspace = (dfcaverns.config.lava_sea_max - dfcaverns.config.lava_sea_min) / 2.75 +local lava_sea_level = dfcaverns.config.lava_sea_max - airspace local data = {} minetest.register_on_generated(function(minp, maxp, seed) --if out of range of cave definition limits, abort - if minp.y > dfcaverns.config.lava_sea_max - airspace or maxp.y < dfcaverns.config.lava_sea_min then + if minp.y > lava_sea_level or maxp.y < dfcaverns.config.lava_sea_min then return end - - --easy reference to commonly used values - local t_start = os.clock() - local x_max = maxp.x - local y_max = maxp.y - local z_max = maxp.z - local x_min = minp.x - local y_min = minp.y - local z_min = minp.z - + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} vm:get_data(data) - - for z = z_min, z_max do -- for each xy plane progressing northwards - for y = y_min, y_max do -- for each x row progressing upwards - local vi = area:index(x_min, y, z) --current node index - for x = x_min, x_max do -- for each node do - if data[vi] == c_air or data[vi] == c_water then - data[vi] = c_lava - end - vi = vi + 1 + + for vi, x, y, z in area:iterp_xyz(minp, maxp) do + if y < lava_sea_level + math.random(0,3) then + if data[vi] == c_air or data[vi] == c_water then + data[vi] = c_lava end end end @@ -68,6 +102,8 @@ minetest.register_on_generated(function(minp, maxp, seed) --calc lighting vm:set_lighting({day = 0, night = 0}) vm:calc_lighting() + + vm:update_liquids() --write it to world vm:write_to_map() end) \ No newline at end of file diff --git a/features/ground_cover.lua b/features/ground_cover.lua index 28e5c3a..e876c66 100644 --- a/features/ground_cover.lua +++ b/features/ground_cover.lua @@ -63,11 +63,35 @@ minetest.register_node("dfcaverns:cobble_with_floor_fungus", { }), }) +minetest.register_node("dfcaverns:cobble_with_floor_fungus_fine", { + description = S("Cobblestone With Floor Fungus"), + _doc_items_longdesc = dfcaverns.doc.floor_fungus_desc, + _doc_items_usagehelp = dfcaverns.doc.floor_fungus_usage, + tiles = {"default_cobble.png^dfcaverns_floor_fungus_fine.png"}, + drops = "default:cobble", + is_ground_content = true, + groups = {cracky = 3, stone = 2, slippery = 1, light_sensitive_fungus = 11}, + _dfcaverns_dead_node = "default:cobble", + sounds = default.node_sound_stone_defaults({ + footstep = {name = "dfcaverns_squish", gain = 0.25}, + }), +}) + minetest.register_abm{ label = "dfcaverns:floor_fungus_spread", nodenames = {"default:cobble"}, neighbors = {"dfcaverns:cobble_with_floor_fungus"}, interval = 60, + chance = 5, + catch_up = true, + action = function(pos) + minetest.swap_node(pos, {name="dfcaverns:cobble_with_floor_fungus_fine"}) + end, +} +minetest.register_abm{ + label = "dfcaverns:floor_fungus_thickening", + nodenames = {"default:cobble_with_floor_fungus_fine"}, + interval = 59, chance = 30, catch_up = true, action = function(pos) diff --git a/init.lua b/init.lua index ba7f505..13b34c3 100644 --- a/init.lua +++ b/init.lua @@ -6,6 +6,7 @@ local modpath = minetest.get_modpath(minetest.get_current_modname()) --load companion lua files dofile(modpath.."/config.lua") dofile(modpath.."/doc.lua") +dofile(modpath.."/voxelarea_iterator.lua") dofile(modpath.."/features/ground_cover.lua") dofile(modpath.."/features/glow_worms.lua") diff --git a/textures/dfcaverns_floor_fungus_fine.png b/textures/dfcaverns_floor_fungus_fine.png new file mode 100644 index 0000000000000000000000000000000000000000..b2132e6d752c0935e77e508bd19b486246d49174 GIT binary patch literal 945 zcmV;i15W&jP)+pAzAknS6x_w5Qv5l5|$u>8V?2(l7ol*O?nX` zf)|5`!H+e1QqV&rMEre;pFbnb#Iq4; zKCfb;H;vK%#RxZ&N2-XIufMH0?4@}c!@HXO9C?% zpg-ES37>!Vfp*TKQh5=hKhAO1bC$LucO!v%RYB*J#zyJEGa*!-3}x46EE`IN=M*;g zMY=g=r4aoZ$L=+d;GE01GRlvKz*kt|p>yS902nZbPpNBn?<-usXft|4EIvlePkJAw zvufHmWLJj6#XB*|fk5{taVQbt1xY-Lu}xY>A^^xU>klNUT%leBgeT5rzar+fQtA~{ zZUt3ZAe4tK*S8dK1z^?z{6b3Ub<({-xFZtIS?f-z+T%Sy_dWoOMerYH^QenBQ7AK)b&nCMyIp5@_x2|7 z)alCsvA3`E+>fZ{ZX8XzZ&hUY8UQ92Hm@XO2%5I*HNIX_Dp*7EwBIKNR5Gm)007Q! zUQJ!JZHVpxV1Anr+M$RZe0S?Zl~PiqQ%)o&8-K9g>z8Xyg8_jbIyV^Ky!lC^z~{!e z<7~I zA=)F#u2nIX#l1dP8Y2`@3rnaspIbk#V9*_yHWoCyCFL)iWwSI5*} TpZ5Zz00000NkvXXu0mjfQMjWW literal 0 HcmV?d00001 diff --git a/textures/dfcaverns_floor_fungus_side.png b/textures/dfcaverns_floor_fungus_side.png deleted file mode 100644 index 6d22a9a81f4cfde96082a01a091e694e8c7e174c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmV+(0^$9MP)t3ag5Cwe zkBeZ-YMZo};F_9bn{0}kot;lFUIl+Zp9fz&fAmf(>C*JP^WI{klm`!>R1K{NQviV9 z>!^xCp}7bQqW1udofI>2uD=OPN*%;;*HqQYhl1090wNN}d5a(zVx4tHFV-Tt=&dto zjrP`p<05WNr&A;V2u2%hw|kyY!ng zNjEwrotW2a=~L$e;T)BehN`Nh?Q|~~B+2VMA2(qbdu?hz9DMzF{A+O#Mm-)yf>^VN z2p1s6qtU(hA3nbXY`3blX2+A0EXxjF4G)JaLIhhb=OF6}2;w)T%-g1ENT-toN>#h0 zk-ACK{uSpi$+GkO#nw34l@yh;F?5<OV07*qoM6N<$f{tzHX8-^I diff --git a/voxelarea_iterator.lua b/voxelarea_iterator.lua new file mode 100644 index 0000000..be46507 --- /dev/null +++ b/voxelarea_iterator.lua @@ -0,0 +1,75 @@ +-- These functions are a minor modification of the voxel area iterator defined in the built in voxelarea.lua lua code. +-- As such, this file is separately licened under the LGPL as follows: + +-- License of Minetest source code +------------------------------- + +--Minetest +--Copyright (C) 2010-2018 celeron55, Perttu Ahola + +--This program is free software; you can redistribute it and/or modify +--it under the terms of the GNU Lesser General Public License as published by +--the Free Software Foundation; either version 2.1 of the License, or +--(at your option) any later version. + +--This program is distributed in the hope that it will be useful, +--but WITHOUT ANY WARRANTY; without even the implied warranty of +--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +--GNU Lesser General Public License for more details. + +--You should have received a copy of the GNU Lesser General Public License along +--with this program; if not, write to the Free Software Foundation, Inc., +--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +function VoxelArea:iter_xyz(minx, miny, minz, maxx, maxy, maxz) + local i = self:index(minx, miny, minz) - 1 + + local x = minx - 1 -- subtracting one because x gets incremented before it gets returned the first time. + local xrange = maxx - minx + 1 + local nextaction = i + 1 + xrange + + local y = 0 + local yrange = maxy - miny + 1 + local yreqstride = self.ystride - xrange + + local z = 0 + local zrange = maxz - minz + 1 + local multistride = self.zstride - ((yrange - 1) * self.ystride + xrange) + + return function() + -- continue i until it needs to jump + i = i + 1 + x = x + 1 + if i ~= nextaction then + return i, x, y+miny, z+minz + end + + -- continue y until maxy is exceeded + y = y + 1 + x = minx -- new line + if y ~= yrange then + -- set i to index(minx, miny + y, minz + z) - 1 + i = i + yreqstride + nextaction = i + xrange + return i, x, y+miny, z+minz + end + + -- continue z until maxz is exceeded + z = z + 1 + if z == zrange then + -- cuboid finished, return nil + return + end + + -- set i to index(minx, miny, minz + z) - 1 + i = i + multistride + + y = 0 + nextaction = i + xrange + return i, x, y+miny, z+minz + end +end + +function VoxelArea:iterp_xyz(minp, maxp) + return self:iter_xyz(minp.x, minp.y, minp.z, maxp.x, maxp.y, maxp.z) +end \ No newline at end of file From 0cfdac9695772b079c2e8671c0d8aa31f2b26315 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 31 May 2018 20:32:06 -0600 Subject: [PATCH 25/25] add smoother churn to the surface of the magma sea --- biomes/lava_sea.lua | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/biomes/lava_sea.lua b/biomes/lava_sea.lua index 85f3403..8c2e692 100644 --- a/biomes/lava_sea.lua +++ b/biomes/lava_sea.lua @@ -46,8 +46,8 @@ local lava_sea_crystal_biome_def = { name = "dfcaverns_lava_sea_with_mese_crystal", y_min = dfcaverns.config.lava_sea_min, y_max = dfcaverns.config.lava_sea_max, - heat_point = 80, - humidity_point = 20, + heat_point = 60, + humidity_point = 30, _subterrane_ceiling_decor = mese_crystal_ceiling, _subterrane_floor_decor = mese_ore_floor, } @@ -56,7 +56,7 @@ local lava_sea_mese_biome_def = { name = "dfcaverns_lava_sea_with_mese", y_min = dfcaverns.config.lava_sea_min, y_max = dfcaverns.config.lava_sea_max, - heat_point = 60, + heat_point = 50, humidity_point = 40, _subterrane_ceiling_decor = mese_ore_ceiling, } @@ -65,7 +65,7 @@ local lava_sea_barren_biome_def = { name = "dfcaverns_lava_sea", y_min = dfcaverns.config.lava_sea_min, y_max = dfcaverns.config.lava_sea_max, - heat_point = 40, + heat_point = 30, humidity_point = 50, } @@ -78,6 +78,18 @@ local airspace = (dfcaverns.config.lava_sea_max - dfcaverns.config.lava_sea_min) local lava_sea_level = dfcaverns.config.lava_sea_max - airspace local data = {} +local lavasurface_buffer = {} + +local lavasurface_noise + +local lavasurface_noise_params = { + offset = 0, + scale = 2, + spread = {x=20, y=20, z=20}, + seed = 5033, + octaves = 3, + persist = 0.6 +} minetest.register_on_generated(function(minp, maxp, seed) --if out of range of cave definition limits, abort @@ -85,12 +97,23 @@ minetest.register_on_generated(function(minp, maxp, seed) return end + if not lavasurface_noise then + local sidelen = maxp.x - minp.x + 1 --length of a mapblock + local chunk_lengths = {x = sidelen, y = sidelen, z = sidelen} --table of chunk edges + lavasurface_noise = minetest.get_perlin_map(lavasurface_noise_params, chunk_lengths) + end + local nvals_lavasurface = lavasurface_noise:get2dMap({x=minp.x, y=minp.z}, lavasurface_buffer) + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} vm:get_data(data) + local minx = minp.x-1 + local minz = minp.z-1 + for vi, x, y, z in area:iterp_xyz(minp, maxp) do - if y < lava_sea_level + math.random(0,3) then + local lavaheight = nvals_lavasurface[x-minx][z-minz] + if y < lava_sea_level + lavaheight then if data[vi] == c_air or data[vi] == c_water then data[vi] = c_lava end