[1738213] describe_floor() now uses feature_description instead of rolling its own. This does produce redundant messages when stepping into shallow water, but I think we can live with that.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1591 c06c8d41-db1a-0410-9941-cceddc491573
TAHSTXR7ROOMDFUSBUU4ZAIEWQLAS5CIRCTARLD4Q2BGNLSL7E5QC 3SQQ7NFTRSYDTYI4A6NWKUMOD65JJ5YPSJJIME6JDAAAN7IF6KGQC PL6I2CMSTHY5ZHWVMIQE5YTM5S5VPKBNZM6QJVHZSSKOJGIJ5W4AC MUTWHW6LSJKATZA6LMVXT2K3UMMYJLUQRDSRXTGUBDAGOA6JO4LQC CQ24AVAI6SW3AHTIDMLPSTRRBEU6FHRF5I5FD6G5QIYE6PO4BQMQC 3YK4G4IQBXW63HPGU5WRTV6L2FCMKAK4DOTCHFK2FNSB5B3Y3PVQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC AJJ6D6JRV6ZAZOAUHYUM2IQG42V6PBALOD4KEMNKSVVAOJXAUCPQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC XP3TQISCLEST3ZNTF6OZ6FYMHIIPMVTNVBIIG47LA5PS7J234SQAC NJDPIHOREOTAZJXOMZA5QA4TBADDWLFZ25NVAIFDQ7BUBVUWCEEAC MSQI3TH6T62JAXQGLL52QZCWAMC372TGB6ZNNRDGUGMJKBNNV2VAC RC6L3CIBLJEH4GWRFD7UQNGI6PZT74FRUVOYHSAN2XCC74NZUASQC TJISAZK5RWKXIIC5UTQNY4KT3UX3ASGBUQQNWZ7ZDULPRYFRZXQQC YCL3W2PFE6ILTGBFODCSXNPDIA46KVSZP2TI7HDMYAOEJT65RIEAC TZ55IZNANEJO2WDTKYWVLY2W2VV6BR7WKIN7XLNISAMMFT6LG2WQC WWR4IDWLXP4XLBWDZBA5GFG7CRKUJQNRK7FFUFOISK6OJTMYQPFQC LOJYD6QZRNLNDDZJKVBMKQIBPTKSRN2ETCYGNVV47M7L3QLUJUJAC WHY6LRRJ5T2NSBE3IUCR4X3TOAH7TTK5NPUPUIFT7TPNJ6J4HBDAC M47QBURKKRV2JFK6U7GQNVWK7RUTBVPBJ5FHURC55SKQSXAUFSBAC {int x = start_x + curs_x - 1, y = start_y + curs_y - 1;if (getty == CONTROL('X'))toggle_exclude(x, y);elseclear_excludes();// We now need to redo travel coloursfeatures.clear();find_travel_pos(you.x_pos, you.y_pos, NULL, NULL, &features);// Sort features into the order the player is likely to prefer.arrange_features(features);
{int x = start_x + curs_x - 1, y = start_y + curs_y - 1;if (getty == CONTROL('X'))toggle_exclude(coord_def(x, y));elseclear_excludes();
const coord_def &c = exc[i];int dx = c.x - x,dy = c.y - y;if (dx * dx + dy * dy <= Options.travel_exclude_radius2)return true;
if ((exc[i].pos - p).abs() < exc[i].radius_sq())return (true);
// Sanity checks
if (travel_exclude *exc = find_exclude_root(p)){int &curr_radius = exc->radius;switch (curr_radius){case LOS_RADIUS: curr_radius = 1; break;case 1 : curr_radius = 4; break;case 4 : curr_radius = LOS_RADIUS; break;}if (can_travel_interlevel()){LevelInfo &li = travel_cache.get_level_info(level_id::current());li.update();}}}void toggle_exclude(const coord_def &p){if (is_exclude_root(p))set_exclude(p, 0);elseset_exclude(p, LOS_RADIUS);}void set_exclude(const coord_def &p, int radius){// Sanity checks; excludes can be set in Pan and regular dungeon// levels only.
if (grid >= DNGN_ENTER_HELL && grid <= DNGN_PERMADRY_FOUNTAIN){if (grid >= DNGN_STONE_STAIRS_DOWN_I && grid <= DNGN_ROCK_STAIRS_DOWN){mprf("There is a %s staircase leading down here.",(grid == DNGN_ROCK_STAIRS_DOWN) ? "rock" : "stone" );}else if (grid >= DNGN_STONE_STAIRS_UP_I && grid <= DNGN_ROCK_STAIRS_UP){mprf("There is a %s staircase leading upwards here.",(grid == DNGN_ROCK_STAIRS_UP) ? "rock" : "stone" );}else{switch (grid){case DNGN_ENTER_HELL:mpr("There is a gateway to Hell here.");break;case DNGN_ENTER_GEHENNA:mpr("There is a gateway to Gehenna here.");break;case DNGN_ENTER_COCYTUS:mpr("There is a gateway to the frozen wastes of Cocytus here.");break;case DNGN_ENTER_TARTARUS:mpr("There is a gateway to Tartarus here.");break;case DNGN_ENTER_DIS:mpr("There is a gateway to the Iron City of Dis here.");break;case DNGN_ENTER_SHOP:mprf("There is an entrance to %s here.",shop_name(you.x_pos, you.y_pos));break;case DNGN_ENTER_LABYRINTH:mpr("There is an entrance to a labyrinth here.");mpr("Beware, for starvation awaits!");break;case DNGN_ENTER_ABYSS:mpr("There is a one-way gate to the infinite horrors of the Abyss here.");break;case DNGN_STONE_ARCH:mpr("There is an empty stone archway here.");break;case DNGN_EXIT_ABYSS:mpr("There is a gateway leading out of the Abyss here.");break;case DNGN_ENTER_PANDEMONIUM:mpr("There is a gate leading to the halls of Pandemonium here.");break;case DNGN_EXIT_PANDEMONIUM:mpr("There is a gate leading out of Pandemonium here.");break;case DNGN_TRANSIT_PANDEMONIUM:mpr("There is a gate leading to another region of Pandemonium here.");break;case DNGN_ENTER_ORCISH_MINES:mpr("There is a staircase to the Orcish Mines here.");break;case DNGN_ENTER_HIVE:mpr("There is a staircase to the Hive here.");break;case DNGN_ENTER_LAIR:mpr("There is a staircase to the Lair here.");break;case DNGN_ENTER_SLIME_PITS:mpr("There is a staircase to the Slime Pits here.");break;case DNGN_ENTER_VAULTS:mpr("There is a staircase to the Vaults here.");break;case DNGN_ENTER_CRYPT:mpr("There is a staircase to the Crypt here.");break;case DNGN_ENTER_HALL_OF_BLADES:mpr("There is a staircase to the Hall of Blades here.");break;case DNGN_ENTER_ZOT:mpr("There is a gate to the Realm of Zot here.");break;case DNGN_ENTER_TEMPLE:mpr("There is a staircase to the Ecumenical Temple here.");break;case DNGN_ENTER_SNAKE_PIT:mpr("There is a staircase to the Snake Pit here.");break;case DNGN_ENTER_ELVEN_HALLS:mpr("There is a staircase to the Elven Halls here.");break;case DNGN_ENTER_TOMB:mpr("There is a staircase to the Tomb here.");break;case DNGN_ENTER_SWAMP:mpr("There is a staircase to the Swamp here.");break;case DNGN_ENTER_SHOALS:mpr("There is a staircase to the Shoals here.");break;case DNGN_RETURN_FROM_ORCISH_MINES:case DNGN_RETURN_FROM_HIVE:case DNGN_RETURN_FROM_LAIR:case DNGN_RETURN_FROM_VAULTS:case DNGN_RETURN_FROM_TEMPLE:mpr("There is a staircase back to the Dungeon here.");break;case DNGN_RETURN_FROM_SLIME_PITS:case DNGN_RETURN_FROM_SNAKE_PIT:case DNGN_RETURN_FROM_SWAMP:case DNGN_RETURN_FROM_SHOALS:mpr("There is a staircase back to the Lair here.");break;case DNGN_RETURN_FROM_CRYPT:case DNGN_RETURN_FROM_HALL_OF_BLADES:mpr("There is a staircase back to the Vaults here.");break;case DNGN_RETURN_FROM_TOMB:mpr("There is a staircase back to the Crypt here.");break;case DNGN_RETURN_FROM_ELVEN_HALLS:mpr("There is a staircase back to the Mines here.");break;case DNGN_RETURN_FROM_ZOT:mpr("There is a gate leading back out of this place here.");break;case DNGN_ALTAR_ZIN:mpr("There is a glowing white marble altar of Zin here.");break;case DNGN_ALTAR_SHINING_ONE:mpr("There is a glowing golden altar of the Shining One here.");break;case DNGN_ALTAR_KIKUBAAQUDGHA:mpr("There is an ancient bone altar of Kikubaaqudgha here.");break;case DNGN_ALTAR_YREDELEMNUL:mpr("There is a basalt altar of Yredelemnul here.");break;case DNGN_ALTAR_XOM:mpr("There is a shimmering altar of Xom here.");break;case DNGN_ALTAR_VEHUMET:mpr("There is a shining altar of Vehumet here.");break;case DNGN_ALTAR_OKAWARU:mpr("There is an iron altar of Okawaru here.");break;case DNGN_ALTAR_MAKHLEB:mpr("There is a burning altar of Makhleb here.");break;case DNGN_ALTAR_SIF_MUNA:mpr("There is a deep blue altar of Sif Muna here.");break;case DNGN_ALTAR_TROG:mpr("There is a bloodstained altar of Trog here.");break;case DNGN_ALTAR_NEMELEX_XOBEH:mpr("There is a sparkling altar of Nemelex Xobeh here.");break;case DNGN_ALTAR_ELYVILON:mpr("There is a silver altar of Elyvilon here.");break;case DNGN_ALTAR_LUGONU:mpr("There is a corrupted altar of Lugonu here.");break;case DNGN_ALTAR_BEOGH:mpr("There is a roughly hewn altar of Beogh here.");break;case DNGN_BLUE_FOUNTAIN:mpr("There is a fountain here (q to drink).");break;case DNGN_SPARKLING_FOUNTAIN:mpr("There is a sparkling fountain here (q to drink).");break;case DNGN_DRY_FOUNTAIN_I:case DNGN_DRY_FOUNTAIN_II:case DNGN_DRY_FOUNTAIN_IV:case DNGN_DRY_FOUNTAIN_VI:case DNGN_DRY_FOUNTAIN_VIII:case DNGN_PERMADRY_FOUNTAIN:mpr("There is a dry fountain here.");break;}}}}
}void describe_floor(){const int grid = grd(you.pos());std::string prefix = "There is ";std::string feat;std::string suffix = " here.";switch (grid){case DNGN_FLOOR:return;case DNGN_ENTER_SHOP:prefix = "There is an entrance to ";break;default:break;}feat = feature_description(you.x_pos, you.y_pos);if (feat.empty())return;if (grid != DNGN_ENTER_SHOP)feat[0] = tolower(feat[0]);if (ends_with(feat, "."))feat = feat.substr(0, feat.length() - 1);mpr((prefix + feat + suffix).c_str());if (grid == DNGN_ENTER_LABYRINTH)mpr("Beware, for starvation awaits!");