Commit Graph

17 Commits (86b19f284990304f5c8322040f277138333a3697)

Author SHA1 Message Date
Paramat 86b19f2849
Biome dust placement: Improve comments, re-order some lines 2018-06-04 00:39:10 +01:00
Paramat f4ca830abe
Biomemap: Simplify code of recent commit (#7398) 2018-06-02 21:28:26 +01:00
Paramat 99143f4947
Biomemap: Avoid empty biomemap entry to fix failing biome dust (#7393)
'generateBiomes()' constructs the biomemap as it generates biomes.
The biome calculated at first stone surface encountered is added to
the biomemap.
Previously, if no stone surface was encountered in a mapchunk column
the biomemap was left empty for that (x, z) position, causing biome
dust and water surface decoration placement to fail.

If at the base of a mapchunk column the biomemap is empty, add the
currently active biome to the biomemap, or if biome is NULL calculate
it for this position and add it to the biomemap.
2018-06-02 03:20:09 +01:00
Paramat 53d5b3ea40
Dungeons: Fix duplication of y limit parameters (#7359) 2018-05-20 23:45:53 +01:00
Paramat 54606e103d
Mapgen caves: Re-order generation to fix cavern bug
Previously, caverns confused tunnel generation causing biome top and filler
nodes to appear in caverns.
Split 'generateCaves()' into 2 functions to separate tunnel and large
randomwalk cave generation.
In each mapgen re-order cave generation to generate tunnels before caverns.
2018-04-29 07:20:46 +01:00
paramat 9d7335a99c Biome-defined dungeon nodes: Use faster biome calculation 2018-04-26 17:27:06 +02:00
Paramat 746ca41f58
Biome API / dungeons: Add biome-defined dungeon nodes
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'.
If 'node_dungeon' is not defined dungeons fall back to classic behaviour.

Remove messy and imprecise dungeon material code from 'generateBiomes()'.
Code deciding dungeon materials is now in 'generateDungeons()' and uses the
biome at mapchunk centre for more precision.

Remove hardcoded 'MG_STONE' types as long intended.
2018-04-07 22:09:54 +01:00
Paramat 32d456bd2d
Biome API / cavegen: Add definable cave liquid for a biome (#7192)
Add 'node_cave_liquid' as a new field in biome registration.
If field is absent cave liquids fall back to classic behaviour.
2018-04-05 17:21:41 +01:00
Loic Blot 12d1e4ff04 VoxelArea: add_{x,y,z,p} must be static
Fix some documentations issues
Use getNodeNoCheck(v3s16, ...) in some cases instead of getNodeNoCheck(x, y, z, ...)
2018-03-09 23:27:26 +01:00
paramat cbb9301bea Biomes: Add 'min_pos'/'max_pos' xyz biome limits
'y_min' and 'y_max' are still accepted for compatibility.
2018-03-09 03:16:25 +00:00
paramat 07622bf9b4 Generate Notifier: Clear events once after all 'on generated' functions 2018-03-03 22:59:49 +00:00
paramat 359a940dde SAO limits: Allow SAOs to exist outside the set 'mapgen limit' 2018-02-26 17:21:45 +00:00
paramat 861cfd8484 Dungeons: Avoid generation in multiple liquid nodes and 'airlike'
Previously only 'mapgen water source' and 'mapgen river water source'
were checked for. Games can use multiple liquid nodes defined for biomes,
many of which will not be aliased to those 2 mapgen aliases, causing
floating dungeons to generate in some liquids.

Now we check for liquid drawtype instead, so can remove liquid nodes
from dungeonparams.

Also check for 'airlike' drawtype instead of 'CONTENT_AIR' to avoid
generation in 'airlike' nodes in some rare situations. This will also be
needed for when we add definable biome air nodes.
2018-02-13 03:48:39 +00:00
paramat 142474196a Mapgen folder: Update and improve copyright information of files 2018-01-15 04:42:08 +00:00
adrido d677f292cc Use std::vector instead of dynamic C-Array (#6744) 2017-12-10 09:07:24 +01:00
paramat ec93893c7f Biome dust node: Only place on 'walkable' cubic non-liquid drawtypes
No longer decide placement on 'buildable_to' parameter.
Dust nodes only look acceptable placed on cubic nodes.
Modders may not want to make their plantlike decorations 'buildable_to'.
2017-11-17 19:27:06 +00:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00