1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-10 11:55:27 +01:00

Mapgen: Add rudimentary unittests

This commit is contained in:
SmallJoker
2024-11-28 19:16:07 +01:00
committed by SmallJoker
parent c7fe2ee5c9
commit 50928b9759
5 changed files with 162 additions and 58 deletions

View File

@@ -19,6 +19,12 @@ class BiomeManager;
typedef u16 biome_t;
constexpr v3s16 MAX_MAP_GENERATION_LIMIT_V3(
MAX_MAP_GENERATION_LIMIT,
MAX_MAP_GENERATION_LIMIT,
MAX_MAP_GENERATION_LIMIT
);
#define BIOME_NONE ((biome_t)0)
enum BiomeType {
@@ -29,32 +35,32 @@ class Biome : public ObjDef, public NodeResolver {
public:
ObjDef *clone() const;
u32 flags;
content_t c_top;
content_t c_filler;
content_t c_stone;
content_t c_water_top;
content_t c_water;
content_t c_river_water;
content_t c_riverbed;
content_t c_dust;
content_t
c_top = CONTENT_IGNORE,
c_filler = CONTENT_IGNORE,
c_stone = CONTENT_IGNORE,
c_water_top = CONTENT_IGNORE,
c_water = CONTENT_IGNORE,
c_river_water = CONTENT_IGNORE,
c_riverbed = CONTENT_IGNORE,
c_dust = CONTENT_IGNORE;
std::vector<content_t> c_cave_liquid;
content_t c_dungeon;
content_t c_dungeon_alt;
content_t c_dungeon_stair;
content_t
c_dungeon = CONTENT_IGNORE,
c_dungeon_alt = CONTENT_IGNORE,
c_dungeon_stair = CONTENT_IGNORE;
s16 depth_top;
s16 depth_filler;
s16 depth_water_top;
s16 depth_riverbed;
s16 depth_top = 0;
s16 depth_filler = -MAX_MAP_GENERATION_LIMIT;
s16 depth_water_top = 0;
s16 depth_riverbed = 0;
v3s16 min_pos;
v3s16 max_pos;
float heat_point;
float humidity_point;
s16 vertical_blend;
float weight;
v3s16 min_pos = -MAX_MAP_GENERATION_LIMIT_V3;
v3s16 max_pos = MAX_MAP_GENERATION_LIMIT_V3;
float heat_point = 0.0f;
float humidity_point = 0.0f;
s16 vertical_blend = 0;
float weight = 1.0f;
virtual void resolveNodeNames();
};