From 91480fa09bfd0c7e937cdf0b29360c9e10413f62 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 17 Oct 2009 08:59:19 +0200 Subject: More renaming and reorganization of feature checks. There were a couple of functions is_something(dgn_feature_type feat) defined in travel.cc that were otherwise independent of travel. For consistency, move these to terrain.cc and rename to feat_is_something. One might also consider renaming the various feat_is_whatever functions to just is_whatever. --- crawl-ref/source/misc.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index fc9cefbf0b..a43ce79974 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1313,7 +1313,7 @@ static void climb_message(dungeon_feature_type stair, bool going_up, (player_is_airborne() ? "float" : "slide")); } } - else if (is_gate(stair)) + else if (feat_is_gate(stair)) { mprf("You %s %s through the gate.", you.flight_mode() == FL_FLY ? "fly" : @@ -1776,7 +1776,7 @@ void up_stairs(dungeon_feature_type force_stair, } if (you.burden_state == BS_OVERLOADED && !feat_is_escape_hatch(stair_find) - && !is_gate(stair_find)) + && !feat_is_gate(stair_find)) { mpr("You are carrying too much to climb upwards."); you.turn_is_over = true; @@ -1858,9 +1858,9 @@ void up_stairs(dungeon_feature_type force_stair, const dungeon_feature_type stair_taken = stair_find; - if (you.flight_mode() == FL_LEVITATE && !is_gate(stair_find)) + if (you.flight_mode() == FL_LEVITATE && !feat_is_gate(stair_find)) mpr("You float upwards... And bob straight up to the ceiling!"); - else if (you.flight_mode() == FL_FLY && !is_gate(stair_find)) + else if (you.flight_mode() == FL_FLY && !feat_is_gate(stair_find)) mpr("You fly upwards."); else climb_message(stair_find, true, old_level_type); @@ -2090,7 +2090,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, } if (!force_stair && you.flight_mode() == FL_LEVITATE - && !is_gate(stair_find)) + && !feat_is_gate(stair_find)) { mpr("You're floating high up above the floor!"); return; -- cgit v1.2.3-54-g00ecf