mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-02-23 07:20:22 +01:00
it's been a few months since name_generator's name was changed on contentDB, remove temp backwards compatibility
This commit is contained in:
parent
b6ffd7fc97
commit
ae4d0ebe81
@ -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, namegen, fireflies
|
||||
optional_depends = df_farming, ice_sprites, oil, df_underworld_items, magma_conduits, bones_loot, named_waypoints, name_generator, fireflies
|
@ -9,14 +9,6 @@ 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
|
||||
@ -59,14 +51,14 @@ if named_waypoints_path then
|
||||
end
|
||||
named_waypoints.register_named_waypoints("puzzle_seals", seal_waypoint_def)
|
||||
|
||||
if namegenerator then
|
||||
namegenerator.parse_lines(io.lines(modpath.."/underworld_names.cfg"))
|
||||
if name_generator_path then
|
||||
name_generator.parse_lines(io.lines(modpath.."/underworld_names.cfg"))
|
||||
|
||||
name_pit = function()
|
||||
return namegenerator.generate("glowing_pits")
|
||||
return name_generator.generate("glowing_pits")
|
||||
end
|
||||
name_ruin = function()
|
||||
return namegenerator.generate("underworld_ruins")
|
||||
return name_generator.generate("underworld_ruins")
|
||||
end
|
||||
|
||||
local underworld_ruin_def = {
|
||||
@ -475,7 +467,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 namegenerator then
|
||||
if name_generator_path 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user