diff options
author | paramat <mat.gregory@virginmedia.com> | 2017-02-04 04:04:03 +0000 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-02-04 07:21:16 +0000 |
commit | 2d03cfd24c89c66e5ace4f335dae42f7c2c84f6b (patch) | |
tree | d6016829711cb111314be0431bf3ddcf75603827 /src/mapgen.cpp | |
parent | 03b34cb3dd0647b3e378f00cdc7203e580c9dcc8 (diff) | |
download | minetest-2d03cfd24c89c66e5ace4f335dae42f7c2c84f6b.tar.gz minetest-2d03cfd24c89c66e5ace4f335dae42f7c2c84f6b.tar.bz2 minetest-2d03cfd24c89c66e5ace4f335dae42f7c2c84f6b.zip |
MapgenBasic node resolver: Various fixes
Add a fallback node for stair_desert_stone to avoid ignore placed
in Minimal subgame desert dungeons.
Don't allow river_water_source to fallback to water_source as river
water needs to be non-renewable and have a short flow range.
Make stair_sandstonebrick fall back to sandstonebrick instead of
sandstone.
Re-order some lines.
Add a comment.
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r-- | src/mapgen.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp index e42fc7467..00ae917a1 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -587,23 +587,23 @@ MapgenBasic::MapgenBasic(int mapgenid, MapgenParams *params, EmergeManager *emer //// Look up some commonly used content c_stone = ndef->getId("mapgen_stone"); - c_water_source = ndef->getId("mapgen_water_source"); c_desert_stone = ndef->getId("mapgen_desert_stone"); c_sandstone = ndef->getId("mapgen_sandstone"); + c_water_source = ndef->getId("mapgen_water_source"); c_river_water_source = ndef->getId("mapgen_river_water_source"); // Fall back to more basic content if not defined + // river_water_source cannot fallback to water_source because river water + // needs to be non-renewable and have a short flow range. if (c_desert_stone == CONTENT_IGNORE) c_desert_stone = c_stone; if (c_sandstone == CONTENT_IGNORE) c_sandstone = c_stone; - if (c_river_water_source == CONTENT_IGNORE) - c_river_water_source = c_water_source; //// Content used for dungeon generation c_cobble = ndef->getId("mapgen_cobble"); - c_stair_cobble = ndef->getId("mapgen_stair_cobble"); c_mossycobble = ndef->getId("mapgen_mossycobble"); + c_stair_cobble = ndef->getId("mapgen_stair_cobble"); c_stair_desert_stone = ndef->getId("mapgen_stair_desert_stone"); c_sandstonebrick = ndef->getId("mapgen_sandstonebrick"); c_stair_sandstonebrick = ndef->getId("mapgen_stair_sandstonebrick"); @@ -613,10 +613,12 @@ MapgenBasic::MapgenBasic(int mapgenid, MapgenParams *params, EmergeManager *emer c_mossycobble = c_cobble; if (c_stair_cobble == CONTENT_IGNORE) c_stair_cobble = c_cobble; + if (c_stair_desert_stone == CONTENT_IGNORE) + c_stair_desert_stone = c_desert_stone; if (c_sandstonebrick == CONTENT_IGNORE) c_sandstonebrick = c_sandstone; if (c_stair_sandstonebrick == CONTENT_IGNORE) - c_stair_sandstonebrick = c_sandstone; + c_stair_sandstonebrick = c_sandstonebrick; } |