From ceb51161c896f17a951b0ba2bbd4b48f8fead13a Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 20:39:11 +0100 Subject: Replace global see_cell by observe_cell and disambiguate old uses. Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say). --- crawl-ref/source/spells2.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spells2.cc') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index e91d251949..bbeb789948 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -151,7 +151,7 @@ static bool _mark_detected_creature(coord_def where, const monsters *mon, // If the player would be able to see a monster at this location // don't place it there. - if (see_cell(place)) + if (you.see_cell(place)) continue; // Try not to overwrite another detected monster. @@ -1829,7 +1829,7 @@ int fungal_bloom() destroy_item(j->index()); } - if (corpse_on_pos && see_cell(*i)) + if (corpse_on_pos && observe_cell(*i)) seen_corpses++; } } @@ -1863,7 +1863,7 @@ int create_plant(coord_def & target) if (plant != -1) { env.mons[plant].flags |= MF_ATT_CHANGE_ATTEMPT; - if (see_cell(target)) + if (observe_cell(target)) mpr("A plant grows up from the ground."); } @@ -1932,7 +1932,7 @@ bool sunlight() if (grd(target) != ftype) { grd(target) = ftype; - if (see_cell(target)) + if (observe_cell(target)) evap_count++; } @@ -1967,7 +1967,7 @@ bool sunlight() MG_FORCE_PLACE, GOD_FEAWN)); - if (plant != -1 && see_cell(target)) + if (plant != -1 && observe_cell(target)) plant_count++; } } @@ -2030,7 +2030,7 @@ void path_distance(coord_def & origin, for (adjacent_iterator adj_it(current.first); adj_it; ++adj_it) { idx = adj_it->x + adj_it->y * X_WIDTH; - if (see_cell(*adj_it) + if (you.see_cell(*adj_it) && !feat_is_solid(env.grid(*adj_it)) && exclusion.insert(idx).second) { -- cgit v1.2.3-54-g00ecf