mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Allow multiple cave liquids in a biome definition (#8481)
This allows games to specify biome cave liquids and avoid the old hardcoded behaviour, but preserves the ability to have multiple cave liquids in one biome, such as lava and water. When multiple cave liquids are defined by the biome definition, make each entire cave use a randomly chosen liquid, instead of every small cave segment using a randomly chosen liquid. Plus an optimisation: Don't place nodes if cave liquid is defined as 'air'
This commit is contained in:
parent
6cb6aea969
commit
b1b40fef16
6 changed files with 52 additions and 31 deletions
|
@ -63,6 +63,7 @@ BiomeManager::BiomeManager(Server *server) :
|
|||
b->m_nodenames.emplace_back("mapgen_stone");
|
||||
b->m_nodenames.emplace_back("ignore");
|
||||
b->m_nodenames.emplace_back("ignore");
|
||||
b->m_nnlistsizes.push_back(1);
|
||||
b->m_nodenames.emplace_back("ignore");
|
||||
b->m_nodenames.emplace_back("ignore");
|
||||
b->m_nodenames.emplace_back("ignore");
|
||||
|
@ -330,7 +331,7 @@ void Biome::resolveNodeNames()
|
|||
getIdFromNrBacklog(&c_river_water, "mapgen_river_water_source", CONTENT_AIR, false);
|
||||
getIdFromNrBacklog(&c_riverbed, "mapgen_stone", CONTENT_AIR, false);
|
||||
getIdFromNrBacklog(&c_dust, "ignore", CONTENT_IGNORE, false);
|
||||
getIdFromNrBacklog(&c_cave_liquid, "ignore", CONTENT_IGNORE, false);
|
||||
getIdsFromNrBacklog(&c_cave_liquid);
|
||||
getIdFromNrBacklog(&c_dungeon, "ignore", CONTENT_IGNORE, false);
|
||||
getIdFromNrBacklog(&c_dungeon_alt, "ignore", CONTENT_IGNORE, false);
|
||||
getIdFromNrBacklog(&c_dungeon_stair, "ignore", CONTENT_IGNORE, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue