Skip to content

Commit

Permalink
Merge pull request #17 from FaceDeer/ground_covers
Browse files Browse the repository at this point in the history
Ground covers and guardians
  • Loading branch information
FaceDeer authored Dec 5, 2020
2 parents c328f05 + 7b8c1e5 commit b4a4d54
Show file tree
Hide file tree
Showing 125 changed files with 3,320 additions and 718 deletions.
7 changes: 7 additions & 0 deletions bones_loot/locale/bones_loot.de.tr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# textdomain: bones_loot


### init.lua ###

#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Someone's old bones=Jemandes alte Knochen
7 changes: 7 additions & 0 deletions bones_loot/locale/bones_loot.it.tr
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# textdomain: bones_loot


### init.lua ###

#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Someone's old bones=Le vecchie ossa di qualcuno
2 changes: 2 additions & 0 deletions df_caverns/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ local modpath = minetest.get_modpath(minetest.get_current_modname())
--load companion lua files
dofile(modpath.."/config.lua")

dofile(modpath.."/node_ids.lua")

dofile(modpath.."/shared.lua")
dofile(modpath.."/surface_tunnels.lua")
dofile(modpath.."/level1.lua")
Expand Down
12 changes: 6 additions & 6 deletions df_caverns/lava_sea.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ if not df_caverns.config.enable_lava_sea then
return
end

local c_air = minetest.get_content_id("air")
local c_lava = minetest.get_content_id("default:lava_source")
local c_meseore = minetest.get_content_id("default:stone_with_mese")
local c_mese_crystal = minetest.get_content_id("df_mapitems:mese_crystal")
local c_mese_crystal_block = minetest.get_content_id("df_mapitems:glow_mese")
local c_obsidian = minetest.get_content_id("default:obsidian")
local c_air = df_caverns.node_id.air
local c_lava = df_caverns.node_id.lava
local c_meseore = df_caverns.node_id.meseore
local c_mese_crystal = df_caverns.node_id.mese_crystal
local c_mese_crystal_block = df_caverns.node_id.mese_crystal_block
local c_obsidian = df_caverns.node_id.obsidian

-------------------------------------------------------------------------------------------

Expand Down
21 changes: 10 additions & 11 deletions df_caverns/level1.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
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_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")

local c_spindlestem_white = minetest.get_content_id("df_trees:spindlestem_cap_white")
local c_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_dirt = df_caverns.node_id.dirt
local c_dirt_moss = df_caverns.node_id.dirt_moss
local c_gravel = df_caverns.node_id.gravel
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_spindlestem_white = df_caverns.node_id.spindlestem_white

local tower_cap_shrublist
local fungiwood_shrublist
Expand Down Expand Up @@ -172,7 +171,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
Expand Down Expand Up @@ -219,7 +218,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
Expand Down
33 changes: 18 additions & 15 deletions df_caverns/level2.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
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_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_dirt = df_caverns.node_id.dirt
local c_dirt_moss = df_caverns.node_id.dirt_moss
local c_gravel = df_caverns.node_id.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")
local c_stillworm = df_caverns.node_id.stillworm
local c_pebble_fungus = df_caverns.node_id.pebble_fungus
local c_red = df_caverns.node_id.spindlestem_red

local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone

local c_veinstone = df_caverns.node_id.veinstone
local c_pearls = df_caverns.node_id.pearls

local c_veinstone = minetest.get_content_id("df_mapitems:veinstone")
local wall_vein_perlin_params = {
offset = 0,
scale = 1,
Expand All @@ -18,8 +25,6 @@ local wall_vein_perlin_params = {
flags = "eased",
}

local c_pearls = minetest.get_content_id("df_mapitems:cave_pearls")

local subsea_level = df_caverns.config.level2_min - (df_caverns.config.level2_min - df_caverns.config.level1_min) * 0.33 -- "sea level" for the flooded caverns.
local flooding_threshold = math.min(df_caverns.config.tunnel_flooding_threshold, df_caverns.config.cavern_threshold) -- cavern value out to which we're flooding tunnels and warrens

Expand Down Expand Up @@ -62,8 +67,6 @@ if minetest.get_modpath("df_farming") then
}
end

local c_red = minetest.get_content_id("df_trees:spindlestem_cap_red")

local goblin_cap_cavern_floor = function(abs_cracks, vert_rand, vi, area, data, data_param2)
local ystride = area.ystride
if abs_cracks < 0.1 then
Expand Down Expand Up @@ -93,7 +96,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)
Expand All @@ -112,7 +115,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)
Expand Down Expand Up @@ -238,7 +241,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
Expand Down Expand Up @@ -295,7 +298,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
Expand Down
52 changes: 21 additions & 31 deletions df_caverns/level3.lua
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
local c_water = minetest.get_content_id("default:water_source")
local c_air = minetest.get_content_id("air")
local c_desert_sand = minetest.get_content_id("default:desert_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")
local c_ice = minetest.get_content_id("default:ice")
local c_hoar_moss = minetest.get_content_id("df_mapitems:ice_with_hoar_moss")
local c_gravel = minetest.get_content_id("default:gravel")

local c_oil = minetest.get_content_id("oil:oil_source")

local c_cobble_fungus_fine = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus_fine")
local c_cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
local c_cobble = minetest.get_content_id("default:cobble")

local c_wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")
local c_dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")

local c_glow_ore = minetest.get_content_id("df_mapitems:glow_ruby_ore")

local c_salty_cobble = minetest.get_content_id("df_mapitems:salty_cobble")
local c_salt_crystal = minetest.get_content_id("df_mapitems:salt_crystal")

local c_sprite
if minetest.get_modpath("ice_sprites") then
c_sprite = minetest.get_content_id("ice_sprites:ice_sprite")
end
local c_water = df_caverns.node_id.water
local c_air = df_caverns.node_id.air
local c_desert_sand = df_caverns.node_id.desert_sand
local c_stone_with_coal = df_caverns.node_id.stone_with_coal
local c_silver_sand = df_caverns.node_id.silver_sand
local c_snow = df_caverns.node_id.snow
local c_ice = df_caverns.node_id.ice
local c_hoar_moss = df_caverns.node_id.hoar_moss
local c_gravel = df_caverns.node_id.gravel
local c_oil = df_caverns.node_id.oil
local c_cobble_fungus_fine = df_caverns.node_id.cobble_fungus_fine
local c_cobble_fungus = df_caverns.node_id.cobble_fungus
local c_cobble = df_caverns.node_id.cobble
local c_wet_flowstone = df_caverns.node_id.wet_flowstone
local c_dry_flowstone = df_caverns.node_id.dry_flowstone
local c_glow_ore = df_caverns.node_id.glow_ore
local c_salty_cobble = df_caverns.node_id.salty_cobble
local c_salt_crystal = df_caverns.node_id.salt_crystal
local c_sprite = df_caverns.node_id.sprite

local subsea_level = math.floor(df_caverns.config.level3_min - (df_caverns.config.level3_min - df_caverns.config.level2_min) * 0.33)
local flooding_threshold = math.min(df_caverns.config.tunnel_flooding_threshold, df_caverns.config.cavern_threshold)
Expand Down Expand Up @@ -353,7 +343,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
Expand Down Expand Up @@ -463,7 +453,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
Expand Down
11 changes: 11 additions & 0 deletions df_caverns/locale/df_caverns.de.tr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# textdomain: df_caverns


### underworld.lua ###

#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A glowing pit=Eine leuchtende Grube
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Ancient ruin=Alte Ruine
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Mysterious seal=Geheimnisvolles Siegel
11 changes: 11 additions & 0 deletions df_caverns/locale/df_caverns.it.tr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# textdomain: df_caverns


### underworld.lua ###

#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
A glowing pit=Un pozzo luminoso
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Ancient ruin=Antica rovina
#WARNING: AUTOTRANSLATED BY GOOGLE TRANSLATE
Mysterious seal=Sigillo misterioso
2 changes: 1 addition & 1 deletion df_caverns/mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = df_caverns
description = Adds vast underground caverns in the style of Dwarf Fortress, complete with underground flora in diverse biomes. Also adds stalactite/stalagmite decorations in the smaller tunnels.
depends = default, subterrane, df_trees, df_mapitems
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot, named_waypoints, namegen, fireflies
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot, named_waypoints, name_generator, namegen, fireflies
76 changes: 76 additions & 0 deletions df_caverns/node_ids.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
df_caverns.node_id = {}

minetest.after(1, function() df_caverns.node_id = nil end) -- should only be used during initialization.

if minetest.get_modpath("ice_sprites") then
df_caverns.node_id.sprite = minetest.get_content_id("ice_sprites:ice_sprite")
end

if minetest.get_modpath("fireflies") then
df_caverns.node_id.fireflies = minetest.get_content_id("fireflies:firefly")
end

if minetest.get_modpath("df_farming") then
df_caverns.node_id.dead_fungus = minetest.get_content_id("df_farming:dead_fungus")
end

df_caverns.node_id.air = minetest.get_content_id("air")

df_caverns.node_id.cobble = minetest.get_content_id("default:cobble")
df_caverns.node_id.desert_sand = minetest.get_content_id("default:desert_sand")
df_caverns.node_id.dirt = minetest.get_content_id("default:dirt")
df_caverns.node_id.gravel = minetest.get_content_id("default:gravel")
df_caverns.node_id.ice = minetest.get_content_id("default:ice")
df_caverns.node_id.lava = minetest.get_content_id("default:lava_source")
df_caverns.node_id.meseore = minetest.get_content_id("default:stone_with_mese")
df_caverns.node_id.mossycobble = minetest.get_content_id("default:mossycobble")
df_caverns.node_id.obsidian = minetest.get_content_id("default:obsidian")
df_caverns.node_id.sand = minetest.get_content_id("default:sand")
df_caverns.node_id.silver_sand = minetest.get_content_id("default:silver_sand")
df_caverns.node_id.snow = minetest.get_content_id("default:snow")
df_caverns.node_id.stone = minetest.get_content_id("default:stone")
df_caverns.node_id.stone_with_coal = minetest.get_content_id("default:stone_with_coal")
df_caverns.node_id.water = minetest.get_content_id("default:water_source")

df_caverns.node_id.cobble_fungus = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus")
df_caverns.node_id.cobble_fungus_fine = minetest.get_content_id("df_mapitems:cobble_with_floor_fungus_fine")
df_caverns.node_id.dirt_moss = minetest.get_content_id("df_mapitems:dirt_with_cave_moss")
df_caverns.node_id.dry_flowstone = minetest.get_content_id("df_mapitems:dry_flowstone")
df_caverns.node_id.glow_ore = minetest.get_content_id("df_mapitems:glow_ruby_ore")
df_caverns.node_id.hoar_moss = minetest.get_content_id("df_mapitems:ice_with_hoar_moss")
df_caverns.node_id.mese_crystal = minetest.get_content_id("df_mapitems:mese_crystal")
df_caverns.node_id.mese_crystal_block = minetest.get_content_id("df_mapitems:glow_mese")
df_caverns.node_id.pearls = minetest.get_content_id("df_mapitems:cave_pearls")
df_caverns.node_id.pebble_fungus = minetest.get_content_id("df_mapitems:dirt_with_pebble_fungus")
df_caverns.node_id.rock_rot = minetest.get_content_id("df_mapitems:rock_rot")
df_caverns.node_id.spongestone = minetest.get_content_id("df_mapitems:spongestone")
df_caverns.node_id.salt_crystal = minetest.get_content_id("df_mapitems:salt_crystal")
df_caverns.node_id.salty_cobble = minetest.get_content_id("df_mapitems:salty_cobble")
df_caverns.node_id.sand_scum = minetest.get_content_id("df_mapitems:sand_scum")
df_caverns.node_id.stillworm = minetest.get_content_id("df_mapitems:dirt_with_stillworm")
df_caverns.node_id.veinstone = minetest.get_content_id("df_mapitems:veinstone")
df_caverns.node_id.wet_flowstone = minetest.get_content_id("df_mapitems:wet_flowstone")

df_caverns.node_id.spindlestem_red = minetest.get_content_id("df_trees:spindlestem_cap_red")
df_caverns.node_id.spindlestem_white = minetest.get_content_id("df_trees:spindlestem_cap_white")

df_caverns.node_id.amethyst = minetest.get_content_id("df_underworld_items:glow_amethyst")
df_caverns.node_id.glowstone = minetest.get_content_id("df_underworld_items:glowstone")
df_caverns.node_id.pit_plasma = minetest.get_content_id("df_underworld_items:pit_plasma")
df_caverns.node_id.slade = minetest.get_content_id("df_underworld_items:slade")
df_caverns.node_id.slade_block = minetest.get_content_id("df_underworld_items:slade_block")

df_caverns.node_id.oil = minetest.get_content_id("oil:oil_source")

df_caverns.node_id.gas = minetest.get_content_id("mine_gas:gas")
df_caverns.node_id.gas_wisp = minetest.get_content_id("mine_gas:gas_wisp")

df_caverns.node_id.giant_mycelium = minetest.get_content_id("df_primordial_items:giant_hypha_apical_mapgen")
df_caverns.node_id.ivy = minetest.get_content_id("df_primordial_items:jungle_ivy")
df_caverns.node_id.jungle_dirt = minetest.get_content_id("df_primordial_items:dirt_with_jungle_grass")
df_caverns.node_id.mycelial_dirt = minetest.get_content_id("df_primordial_items:dirt_with_mycelium")
df_caverns.node_id.orb = minetest.get_content_id("df_primordial_items:glow_orb_hanging")
df_caverns.node_id.packed_roots = minetest.get_content_id("df_primordial_items:packed_roots")
df_caverns.node_id.plant_matter = minetest.get_content_id("df_primordial_items:plant_matter")
df_caverns.node_id.root_1 = minetest.get_content_id("df_primordial_items:jungle_roots_1")
df_caverns.node_id.root_2 = minetest.get_content_id("df_primordial_items:jungle_roots_2")
10 changes: 5 additions & 5 deletions df_caverns/oil_sea.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ if not df_caverns.config.enable_oil_sea then
return
end

local c_oil = minetest.get_content_id("oil:oil_source")
local c_gas = minetest.get_content_id("mine_gas:gas")
local c_gas_wisp = minetest.get_content_id("mine_gas:gas_wisp")
local c_lava = minetest.get_content_id("default:lava_source")
local c_obsidian = minetest.get_content_id("default:obsidian")
local c_oil = df_caverns.node_id.oil
local c_gas = df_caverns.node_id.gas
local c_gas_wisp = df_caverns.node_id.gas_wisp
local c_lava = df_caverns.node_id.lava
local c_obsidian = df_caverns.node_id.obsidian

-------------------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit b4a4d54

Please sign in to comment.