Skip to content

Commit

Permalink
since I don't know when contentdb will accept the changed name for na…
Browse files Browse the repository at this point in the history
…megen, adding support for both names temporarily
  • Loading branch information
FaceDeer committed Dec 2, 2020
1 parent d2ed498 commit 2b8f808
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
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, name_generator, fireflies
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot, named_waypoints, name_generator, namegen, fireflies
18 changes: 13 additions & 5 deletions df_caverns/underworld.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ local bones_loot_path = minetest.get_modpath("bones_loot")
local named_waypoints_path = minetest.get_modpath("named_waypoints")
local name_generator_path = minetest.get_modpath("name_generator")

-- TEMP backwards compatibility for the change of name of the name_generator mod. Once it's updated in the contentDB, remove this and also the optional_depends
local namegenerator = nil
if not name_generator_path and minetest.get_modpath("namegen") and namegen and namegen.parse_lines and namegen.generate then
namegenerator = namegen
elseif name_generator_path then
namegenerator = name_generator
end

local hunters_enabled = minetest.get_modpath("hunter_statue") and df_underworld_items.config.underworld_hunter_statues

local name_pit = function() end
Expand Down Expand Up @@ -51,14 +59,14 @@ if named_waypoints_path then
end
named_waypoints.register_named_waypoints("puzzle_seals", seal_waypoint_def)

if name_generator_path then
name_generator.parse_lines(io.lines(modpath.."/underworld_names.cfg"))
if namegenerator then
namegenerator.parse_lines(io.lines(modpath.."/underworld_names.cfg"))

name_pit = function()
return name_generator.generate("glowing_pits")
return namegenerator.generate("glowing_pits")
end
name_ruin = function()
return name_generator.generate("underworld_ruins")
return namegenerator.generate("underworld_ruins")
end

local underworld_ruin_def = {
Expand Down Expand Up @@ -467,7 +475,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, small_building_schematic, building.rotation)
elseif building.building_type == "medium building" then
mapgen_helper.place_schematic_on_data(data, data_param2, area, building.pos, medium_building_schematic, building.rotation)
if named_waypoints_path and name_generator_path then
if named_waypoints_path and namegenerator then
if not next(named_waypoints.get_waypoints_in_area("underworld_ruins", vector.subtract(building.pos, 250), vector.add(building.pos, 250))) then
named_waypoints.add_waypoint("underworld_ruins", {x=building.pos.x, y=floor_height+1, z=building.pos.z}, {name=name_ruin()})
end
Expand Down
4 changes: 2 additions & 2 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ The Magma Sea is not without its treasures, however. In the most infernal region

![There are older and fouler things than orcs in the deep places of the world](./df_caverns/screenshots/underworld.jpg)

The foundations of the world lie at -3100 meters, under a default configuration. The diggable rock of the world ends at a rippling layer of invulnerable Slade, a material of unparalleled density. There is a cavern layer at the seam between rock and Slade, however, as if the earth itself was reluctant to touch the strange matter below. The crevices of the ceiling have strange glowing rocks in them, producing a surprisingly bright ambience. Don't attempt to disturb those rocks.
The foundations of the world lie at -3100 meters, under a default configuration. The diggable rock of the world ends at a rippling layer of invulnerable Slade, a material of unparalleled density. There is a cavern layer at the seam between rock and Slade, however, as if the earth itself was reluctant to touch the strange matter below. The crevices of the ceiling have strange glowing rocks in them, producing a surprisingly bright ambiance. Don't attempt to disturb those rocks.

There is no native life in the Underworld. It appears there once _was_, however. Occasional clusters of vacant buildings can be found, impossibly crafted from bricks of Slade and empty of any furnishings. Around those clusters of vacant buildings are fields filled with sealed pits lined with flawless Slade blocks. It is unclear whether these pits are as vacant as the buildings, though. The seals capping them are engraved with ancient words in lost tongues, but one phrase can be translated from the oldest known languages: "This Place is Not a Place of Honor."

Just as ominously, the ancient bones of long-dead warriors are scattered amidst the buildings. They contain loot for those willing to risk disturbing them. There are no traces of who - or what - they died fighting.
Just as ominously, the ancient bones of long-dead warriors are scattered amidst the buildings. They contain loot for those willing to risk disturbing them. There are no traces of who - or what - they died fighting, but their ancient sentinels still lurk nearby to guard them.

![Glowing pit](./df_caverns/screenshots/glowing_pit.jpg)

Expand Down

0 comments on commit 2b8f808

Please sign in to comment.