add new carpet vegetation to some cavern layers

This commit is contained in:
FaceDeer 2020-07-11 13:05:33 -06:00
parent 24615891d6
commit e6ebf1a14d
5 changed files with 22 additions and 13 deletions

View File

@ -2,6 +2,7 @@ local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_gravel = minetest.get_content_id("default:gravel")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
@ -172,7 +173,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -219,7 +220,7 @@ local decorate_level_1 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
if biome_name ~= "barren" then

View File

@ -2,6 +2,10 @@ local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_gravel = minetest.get_content_id("default:gravel")
local c_stillworm = minetest.get_content_id("df_mapitems:dirt_with_stillworm")
local c_pebble_fungus = minetest.get_content_id("df_mapitems:dirt_with_pebble_fungus")
local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
@ -93,7 +97,7 @@ local spore_tree_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
if math.random() < 0.25 then
data[vi] = c_dirt
else
data[vi] = c_dirt_moss
data[vi] = c_pebble_fungus
end
if math.random() < 0.1 then
df_caverns.place_shrub(vi+ystride, area, data, data_param2, spore_tree_shrublist)
@ -112,7 +116,7 @@ local tunnel_tube_cavern_floor = function(abs_cracks, vert_rand, vi, area, data,
if math.random() < 0.25 then
data[vi] = c_dirt
else
data[vi] = c_dirt_moss
data[vi] = c_stillworm
end
if math.random() < 0.1 then
df_caverns.place_shrub(vi+ystride, area, data, data_param2, tunnel_tube_shrublist)
@ -238,7 +242,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -295,7 +299,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end

View File

@ -353,7 +353,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
-- we're in flooded areas or are not barren
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end
@ -463,7 +463,7 @@ local decorate_level_3 = function(minp, maxp, seed, vm, node_arrays, area, data)
if flooded_caverns or biome_name == "blackcap" then
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, true)
else
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false)
df_caverns.tunnel_floor(minp, maxp, area, vi, nvals_cracks, data, data_param2, false, c_gravel)
end
end
end

View File

@ -3,7 +3,6 @@
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_dirt = minetest.get_content_id("default:dirt")
local c_gravel = minetest.get_content_id("default:gravel")
local c_dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
local c_cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
@ -123,7 +122,7 @@ local content_in_list=function(content, list)
return false
end
df_caverns.tunnel_floor = function(minp, maxp, area, vi, nvals_cracks, data, data_param2, wet)
df_caverns.tunnel_floor = function(minp, maxp, area, vi, nvals_cracks, data, data_param2, wet, dirt_node)
if maxp.y > -30 then
wet = false
end
@ -138,14 +137,16 @@ df_caverns.tunnel_floor = function(minp, maxp, area, vi, nvals_cracks, data, dat
local height = math.floor(abs_cracks * 100)
subterrane.stalagmite(vi+ystride, area, data, data_param2, param2, height, df_mapitems.wet_stalagmite_ids)
data[vi] = c_wet_flowstone
elseif dirt_node and abs_cracks > 0.5 and data[vi-ystride] ~= c_air then
data[vi] = dirt_node
end
else
if abs_cracks < 0.025 and data[vi+ystride] == c_air and not content_in_list(data[vi], df_mapitems.dry_stalagmite_ids) then -- make sure data[vi] is not already flowstone. Stalagmites from lower levels are acting as base for further stalagmites
local param2 = abs_cracks*1000000 - math.floor(abs_cracks*1000000/4)*4
local height = math.floor(abs_cracks * 100)
subterrane.stalagmite(vi+ystride, area, data, data_param2, param2, height, df_mapitems.dry_stalagmite_ids)
elseif cracks > 0.5 and data[vi-ystride] ~= c_air then
data[vi] = c_gravel
elseif dirt_node and cracks > 0.5 and data[vi-ystride] ~= c_air then
data[vi] = dirt_node
end
end
end

View File

@ -6,6 +6,9 @@
#
# Copyright (C) 2019 Joachim Stolberg, 2020 FaceDeer, 2020 Louis Royer
# LGPLv2.1+
#
# See https://github.com/minetest-tools/update_translations for
# potential future updates to this script.
from __future__ import print_function
import os, fnmatch, re, shutil, errno
@ -167,7 +170,7 @@ def process_po_file(text):
# any "no longer used" strings will be preserved.
# Note that "fuzzy" tags will be lost in this process.
def process_po_files(folder, modname):
for root, dirs, files in os.walk(os.path.join(folder + 'locale/')):
for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
for name in files:
code_match = pattern_po_language_code.match(name)
if code_match == None: