summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-13 12:24:05 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-13 12:24:05 +0000
commit42fe04c5774e1abb0c25de0aed269f0f5546e9d9 (patch)
treec42ba59affef4118c051c4a18c7977de6f970a97 /crawl-ref/source
parent1f89164a2b292e7da1020d8049499b1cdc6f8a87 (diff)
downloadcrawl-ref-42fe04c5774e1abb0c25de0aed269f0f5546e9d9.tar.gz
crawl-ref-42fe04c5774e1abb0c25de0aed269f0f5546e9d9.zip
Applying patches 1793701 (dolorous), 1793683 and 1793679
(both zelgadis), and 1793603 (ennewalker). Also default yesno() when choosing a religion to 'no'. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2080 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/direct.cc2
-rw-r--r--crawl-ref/source/externs.h1
-rw-r--r--crawl-ref/source/initfile.cc5
-rw-r--r--crawl-ref/source/invent.cc8
-rw-r--r--crawl-ref/source/religion.cc5
-rw-r--r--crawl-ref/source/view.cc2
6 files changed, 16 insertions, 7 deletions
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index ac30c963af..ae23bd7c8e 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -271,7 +271,7 @@ void direction(dist& moves, targeting_type restricts,
cursor_control con(!Options.use_fake_cursor);
int dir = 0;
- bool show_beam = false;
+ bool show_beam = Options.show_beam;
ray_def ray;
FixedVector < char, 2 > objfind_pos;
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index b93b613304..33b92cd3c1 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1656,6 +1656,7 @@ public:
bool show_more_prompt;
bool show_turns; // Show turns used in HUD.
+ bool show_beam; // Show targeting beam by default.
long autopickups; // items to autopickup
bool show_inventory_weights; // show weights in inventory listings
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index bed5a7e9ea..7aee2eaa4c 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -560,6 +560,7 @@ void game_options::reset_options()
show_more_prompt = true;
show_turns = false;
+ show_beam = false;
prev_race = 0;
prev_cls = 0;
@@ -1886,6 +1887,10 @@ void game_options::read_option_line(const std::string &str, bool runscript)
{
show_turns = read_bool( field, show_turns );
}
+ else if (key == "show_beam")
+ {
+ show_beam = read_bool( field, show_beam );
+ }
#ifndef SAVE_DIR_PATH
else if (key == "morgue_dir")
{
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index c835984358..74a2a74bab 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -1024,11 +1024,15 @@ static bool check_old_item_warning( const item_def& item,
}
else if (oper == OPER_WEAR) // can we safely take off old item?
{
+ if (item.base_type != OBJ_ARMOUR)
+ return (true);
+
equipment_type eq_slot = get_armour_slot(item);
- if (item.base_type != OBJ_ARMOUR || you.equip[eq_slot] == -1)
+ if (you.equip[eq_slot] == -1)
return (true);
-
+
old_item = you.inv[you.equip[eq_slot]];
+
if (!has_warning_inscription(old_item, OPER_TAKEOFF))
return (true);
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 0e35447c6e..00de2c7425 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -756,8 +756,7 @@ void pray()
const god_type altar_god = grid_altar_god(grd[you.x_pos][you.y_pos]);
if (altar_god != GOD_NO_GOD)
{
- if (player_is_levitating()
- && !wearing_amulet(AMU_CONTROLLED_FLIGHT))
+ if (you.flies() == FL_LEVITATE)
{
mpr("You are floating high above the altar.");
return;
@@ -2881,7 +2880,7 @@ void god_pitch(god_type which_god)
snprintf( info, INFO_SIZE, "Do you wish to %sjoin this religion?",
(you.worshipped[which_god]) ? "re" : "" );
- if (!yesno( info ) || !yesno("Are you sure?"))
+ if (!yesno( info, false, 'n' ) || !yesno("Are you sure?", false, 'n'))
{
redraw_screen();
return;
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 6a22de3464..62d5fea95f 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -1044,6 +1044,7 @@ void fire_monster_alerts()
|| mons_was_seen_this_turn(monster))
&& !mons_is_submerged( monster ))
{
+ learn_visible_mon_eq_egos(monster);
if (!mons_is_safe( static_cast<const monsters*>(monster) )
&& !mons_class_flag( monster->type, M_NO_EXP_GAIN )
&& !mons_is_mimic( monster->type ))
@@ -1051,7 +1052,6 @@ void fire_monster_alerts()
interrupt_activity( AI_SEE_MONSTER, monster );
}
seen_monster( monster );
- learn_visible_mon_eq_egos(monster);
// Monster was viewed this turn
monster->flags |= MF_WAS_IN_VIEW;