Fix MgStoneType and BiomeType enum names

master
kwolekr 2016-05-02 02:45:59 -04:00
parent 87bc39dca7
commit 9b5c492be5
9 changed files with 34 additions and 34 deletions

View File

@ -384,7 +384,7 @@ MgStoneType MapgenBasic::generateBiomes()
{
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++) {
@ -429,9 +429,9 @@ MgStoneType MapgenBasic::generateBiomes()
// 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) {

View File

@ -76,9 +76,9 @@ enum GenNotifyType {
// TODO(hmmmm/paramat): make stone type selection dynamic
enum MgStoneType {
STONE,
DESERT_STONE,
SANDSTONE,
MGSTONE_STONE,
MGSTONE_DESERT_STONE,
MGSTONE_SANDSTONE,
};
struct GenNotifyEvent {

View File

@ -257,7 +257,7 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
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;
@ -267,7 +267,7 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
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;
@ -277,7 +277,7 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
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;

View File

@ -273,7 +273,7 @@ void MapgenFractal::makeChunk(BlockMakeData *data)
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;
@ -283,7 +283,7 @@ void MapgenFractal::makeChunk(BlockMakeData *data)
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;
@ -293,7 +293,7 @@ void MapgenFractal::makeChunk(BlockMakeData *data)
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;

View File

@ -255,7 +255,7 @@ void MapgenV5::makeChunk(BlockMakeData *data)
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;
@ -265,7 +265,7 @@ void MapgenV5::makeChunk(BlockMakeData *data)
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;
@ -275,7 +275,7 @@ void MapgenV5::makeChunk(BlockMakeData *data)
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;

View File

@ -285,7 +285,7 @@ void MapgenV7::makeChunk(BlockMakeData *data)
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;
@ -295,7 +295,7 @@ void MapgenV7::makeChunk(BlockMakeData *data)
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;
@ -305,7 +305,7 @@ void MapgenV7::makeChunk(BlockMakeData *data)
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;

View File

@ -312,7 +312,7 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
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;
@ -322,7 +322,7 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
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;
@ -332,7 +332,7 @@ void MapgenValleys::makeChunk(BlockMakeData *data)
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;

View File

@ -33,13 +33,13 @@ class BiomeManager;
#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 {

View File

@ -39,11 +39,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
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},
};
@ -371,7 +371,7 @@ Biome *read_biome_def(lua_State *L, int index, INodeDefManager *ndef)
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", "");