--- deliantra/server/random_maps/random_map.c 2006/02/03 07:14:21 1.1.1.1 +++ deliantra/server/random_maps/random_map.c 2006/02/22 18:03:16 1.1.1.2 @@ -105,22 +105,36 @@ /* set region */ theMap->region=RP->region; - make_map_walls(theMap,layout,RP->wallstyle,RP); - - put_doors(theMap,layout,RP->doorstyle,RP); - - place_exits(theMap,layout,RP->exitstyle,RP->orientation,RP); + /* create walls unless the wallstyle is "none" */ + if (strcmp (RP->wallstyle, "none")) { + make_map_walls(theMap,layout,RP->wallstyle,RP); + + /* place doors unless doorstyle or wallstyle is "none"*/ + if (strcmp (RP->doorstyle, "none")) + put_doors(theMap,layout,RP->doorstyle,RP); + + } + + /* create exits unless the exitstyle is "none" */ + if (strcmp (RP->exitstyle, "none")) + place_exits(theMap,layout,RP->exitstyle,RP->orientation,RP); place_specials_in_map(theMap,layout,RP); - place_monsters(theMap,RP->monsterstyle,RP->difficulty,RP); + /* create monsters unless the monsterstyle is "none" */ + if (strcmp (RP->monsterstyle, "none")) + place_monsters(theMap,RP->monsterstyle,RP->difficulty,RP); /* treasures needs to have a proper difficulty set for the map. */ theMap->difficulty=calculate_difficulty(theMap); - place_treasure(theMap,layout,RP->treasurestyle,RP->treasureoptions,RP); - - put_decor(theMap,layout,RP->decorstyle,RP->decoroptions,RP); + /* create treasure unless the treasurestyle is "none" */ + if (strcmp (RP->treasurestyle, "none")) + place_treasure(theMap,layout,RP->treasurestyle,RP->treasureoptions,RP); + + /* create decor unless the decorstyle is "none" */ + if (strcmp (RP->decorstyle, "none")) + put_decor(theMap,layout,RP->decorstyle,RP->decoroptions,RP); /* generate treasures, etc. */ fix_auto_apply(theMap);