{
v3s16 em = vm->m_area.getExtent();
u32 index = 0;
- MgStoneType stone_type = STONE;
+ MgStoneType stone_type = MGSTONE_STONE;
for (s16 z = node_min.Z; z <= node_max.Z; z++)
for (s16 x = node_min.X; x <= node_max.X; x++, index++) {
// This is more efficient than detecting per-node and will not
// miss any desert stone or sandstone biomes.
if (biome->c_stone == c_desert_stone)
- stone_type = DESERT_STONE;
+ stone_type = MGSTONE_DESERT_STONE;
else if (biome->c_stone == c_sandstone)
- stone_type = SANDSTONE;
+ stone_type = MGSTONE_SANDSTONE;
}
if (c == c_stone) {
// TODO(hmmmm/paramat): make stone type selection dynamic
enum MgStoneType {
- STONE,
- DESERT_STONE,
- SANDSTONE,
+ MGSTONE_STONE,
+ MGSTONE_DESERT_STONE,
+ MGSTONE_SANDSTONE,
};
struct GenNotifyEvent {
dp.np_density = nparams_dungeon_density;
dp.np_wetness = nparams_dungeon_wetness;
dp.c_water = c_water_source;
- if (stone_type == STONE) {
+ if (stone_type == MGSTONE_STONE) {
dp.c_cobble = c_cobble;
dp.c_moss = c_mossycobble;
dp.c_stair = c_stair_cobble;
dp.holesize = v3s16(1, 2, 1);
dp.roomsize = v3s16(0, 0, 0);
dp.notifytype = GENNOTIFY_DUNGEON;
- } else if (stone_type == DESERT_STONE) {
+ } else if (stone_type == MGSTONE_DESERT_STONE) {
dp.c_cobble = c_desert_stone;
dp.c_moss = c_desert_stone;
dp.c_stair = c_desert_stone;
dp.holesize = v3s16(2, 3, 2);
dp.roomsize = v3s16(2, 5, 2);
dp.notifytype = GENNOTIFY_TEMPLE;
- } else if (stone_type == SANDSTONE) {
+ } else if (stone_type == MGSTONE_SANDSTONE) {
dp.c_cobble = c_sandstonebrick;
dp.c_moss = c_sandstonebrick;
dp.c_stair = c_sandstonebrick;
dp.np_density = nparams_dungeon_density;
dp.np_wetness = nparams_dungeon_wetness;
dp.c_water = c_water_source;
- if (stone_type == STONE) {
+ if (stone_type == MGSTONE_STONE) {
dp.c_cobble = c_cobble;
dp.c_moss = c_mossycobble;
dp.c_stair = c_stair_cobble;
dp.holesize = v3s16(1, 2, 1);
dp.roomsize = v3s16(0, 0, 0);
dp.notifytype = GENNOTIFY_DUNGEON;
- } else if (stone_type == DESERT_STONE) {
+ } else if (stone_type == MGSTONE_DESERT_STONE) {
dp.c_cobble = c_desert_stone;
dp.c_moss = c_desert_stone;
dp.c_stair = c_desert_stone;
dp.holesize = v3s16(2, 3, 2);
dp.roomsize = v3s16(2, 5, 2);
dp.notifytype = GENNOTIFY_TEMPLE;
- } else if (stone_type == SANDSTONE) {
+ } else if (stone_type == MGSTONE_SANDSTONE) {
dp.c_cobble = c_sandstonebrick;
dp.c_moss = c_sandstonebrick;
dp.c_stair = c_sandstonebrick;
dp.np_density = nparams_dungeon_density;
dp.np_wetness = nparams_dungeon_wetness;
dp.c_water = c_water_source;
- if (stone_type == STONE) {
+ if (stone_type == MGSTONE_STONE) {
dp.c_cobble = c_cobble;
dp.c_moss = c_mossycobble;
dp.c_stair = c_stair_cobble;
dp.holesize = v3s16(1, 2, 1);
dp.roomsize = v3s16(0, 0, 0);
dp.notifytype = GENNOTIFY_DUNGEON;
- } else if (stone_type == DESERT_STONE) {
+ } else if (stone_type == MGSTONE_DESERT_STONE) {
dp.c_cobble = c_desert_stone;
dp.c_moss = c_desert_stone;
dp.c_stair = c_desert_stone;
dp.holesize = v3s16(2, 3, 2);
dp.roomsize = v3s16(2, 5, 2);
dp.notifytype = GENNOTIFY_TEMPLE;
- } else if (stone_type == SANDSTONE) {
+ } else if (stone_type == MGSTONE_SANDSTONE) {
dp.c_cobble = c_sandstonebrick;
dp.c_moss = c_sandstonebrick;
dp.c_stair = c_sandstonebrick;
dp.np_density = nparams_dungeon_density;
dp.np_wetness = nparams_dungeon_wetness;
dp.c_water = c_water_source;
- if (stone_type == STONE) {
+ if (stone_type == MGSTONE_STONE) {
dp.c_cobble = c_cobble;
dp.c_moss = c_mossycobble;
dp.c_stair = c_stair_cobble;
dp.holesize = v3s16(1, 2, 1);
dp.roomsize = v3s16(0, 0, 0);
dp.notifytype = GENNOTIFY_DUNGEON;
- } else if (stone_type == DESERT_STONE) {
+ } else if (stone_type == MGSTONE_DESERT_STONE) {
dp.c_cobble = c_desert_stone;
dp.c_moss = c_desert_stone;
dp.c_stair = c_desert_stone;
dp.holesize = v3s16(2, 3, 2);
dp.roomsize = v3s16(2, 5, 2);
dp.notifytype = GENNOTIFY_TEMPLE;
- } else if (stone_type == SANDSTONE) {
+ } else if (stone_type == MGSTONE_SANDSTONE) {
dp.c_cobble = c_sandstonebrick;
dp.c_moss = c_sandstonebrick;
dp.c_stair = c_sandstonebrick;
dp.np_density = nparams_dungeon_density;
dp.np_wetness = nparams_dungeon_wetness;
dp.c_water = c_water_source;
- if (stone_type == STONE) {
+ if (stone_type == MGSTONE_STONE) {
dp.c_cobble = c_cobble;
dp.c_moss = c_mossycobble;
dp.c_stair = c_stair_cobble;
dp.holesize = v3s16(1, 2, 1);
dp.roomsize = v3s16(0, 0, 0);
dp.notifytype = GENNOTIFY_DUNGEON;
- } else if (stone_type == DESERT_STONE) {
+ } else if (stone_type == MGSTONE_DESERT_STONE) {
dp.c_cobble = c_desert_stone;
dp.c_moss = c_desert_stone;
dp.c_stair = c_desert_stone;
dp.holesize = v3s16(2, 3, 2);
dp.roomsize = v3s16(2, 5, 2);
dp.notifytype = GENNOTIFY_TEMPLE;
- } else if (stone_type == SANDSTONE) {
+ } else if (stone_type == MGSTONE_SANDSTONE) {
dp.c_cobble = c_sandstonebrick;
dp.c_moss = c_sandstonebrick;
dp.c_stair = c_sandstonebrick;
#define BIOME_NONE ((u8)0)
-enum BiomeType
-{
- BIOME_NORMAL,
- BIOME_LIQUID,
- BIOME_NETHER,
- BIOME_AETHER,
- BIOME_FLAT
+// TODO(hmmmm): Decide whether this is obsolete or will be used in the future
+enum BiomeType {
+ BIOMETYPE_NORMAL,
+ BIOMETYPE_LIQUID,
+ BIOMETYPE_NETHER,
+ BIOMETYPE_AETHER,
+ BIOMETYPE_FLAT,
};
class Biome : public ObjDef, public NodeResolver {
struct EnumString ModApiMapgen::es_BiomeTerrainType[] =
{
- {BIOME_NORMAL, "normal"},
- {BIOME_LIQUID, "liquid"},
- {BIOME_NETHER, "nether"},
- {BIOME_AETHER, "aether"},
- {BIOME_FLAT, "flat"},
+ {BIOMETYPE_NORMAL, "normal"},
+ {BIOMETYPE_LIQUID, "liquid"},
+ {BIOMETYPE_NETHER, "nether"},
+ {BIOMETYPE_AETHER, "aether"},
+ {BIOMETYPE_FLAT, "flat"},
{0, NULL},
};
return NULL;
BiomeType biometype = (BiomeType)getenumfield(L, index, "type",
- ModApiMapgen::es_BiomeTerrainType, BIOME_NORMAL);
+ ModApiMapgen::es_BiomeTerrainType, BIOMETYPE_NORMAL);
Biome *b = BiomeManager::create(biometype);
b->name = getstringfield_default(L, index, "name", "");