Dungeons: Add nodebox stairs to desert and sandstone dungeons
authorparamat <mat.gregory@virginmedia.com>
Mon, 23 Jan 2017 08:07:34 +0000 (08:07 +0000)
committerparamat <mat.gregory@virginmedia.com>
Thu, 26 Jan 2017 20:18:54 +0000 (20:18 +0000)
Desert and sandstone dungeons have 2 node wide corridors. Previously,
nodebox stairs were disabled because dungeon generation code did not
support nodebox stairs wider than 1 node, now it does.

Add 'stair desert stone' content id to MappgenBasic.

Requires 'mapgen stair desert stone' to be added to Minetest Game.

src/mapgen.cpp
src/mapgen.h

index fd4f5858f524f41e1e0d50d4acbc95eebb342a68..e42fc74679cf276d3054d9b65069ecae673a2349 100644 (file)
@@ -604,6 +604,7 @@ MapgenBasic::MapgenBasic(int mapgenid, MapgenParams *params, EmergeManager *emer
        c_cobble               = ndef->getId("mapgen_cobble");
        c_stair_cobble         = ndef->getId("mapgen_stair_cobble");
        c_mossycobble          = ndef->getId("mapgen_mossycobble");
+       c_stair_desert_stone   = ndef->getId("mapgen_stair_desert_stone");
        c_sandstonebrick       = ndef->getId("mapgen_sandstonebrick");
        c_stair_sandstonebrick = ndef->getId("mapgen_stair_sandstonebrick");
 
@@ -867,7 +868,7 @@ void MapgenBasic::generateDungeons(s16 max_stone_y, MgStoneType stone_type)
        case MGSTONE_DESERT_STONE:
                dp.c_wall     = c_desert_stone;
                dp.c_alt_wall = CONTENT_IGNORE;
-               dp.c_stair    = c_desert_stone;
+               dp.c_stair    = c_stair_desert_stone;
 
                dp.diagonal_dirs = true;
                dp.holesize      = v3s16(2, 3, 2);
@@ -877,7 +878,7 @@ void MapgenBasic::generateDungeons(s16 max_stone_y, MgStoneType stone_type)
        case MGSTONE_SANDSTONE:
                dp.c_wall     = c_sandstonebrick;
                dp.c_alt_wall = CONTENT_IGNORE;
-               dp.c_stair    = c_sandstonebrick;
+               dp.c_stair    = c_stair_sandstonebrick;
 
                dp.diagonal_dirs = false;
                dp.holesize      = v3s16(2, 2, 2);
index b18bfb9309d480a562c8f45191e35b9306fa5297..a95e1942aeea5d40fdded5eb67c579b068fe736b 100644 (file)
@@ -266,6 +266,7 @@ protected:
        content_t c_cobble;
        content_t c_stair_cobble;
        content_t c_mossycobble;
+       content_t c_stair_desert_stone;
        content_t c_sandstonebrick;
        content_t c_stair_sandstonebrick;