summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:58 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:58 +0100
commite9d57ecb0090655ec46a780dc450bc170abd9068 (patch)
tree731199beac7033acd5c06017c97dbab50a167118
parent2714df02ad4a4b47745caa149561e3a8c821df45 (diff)
Remove easy_{disarm,tunnel,open}
We behave is if the options (in the old code) were set to their defaults, *except* for easy_disarm which is rather dangerous. Because of the dangerousness we behave as if easy_disarm==FALSE, except for picking the "obvious" choice if there is one when using the (D)isarm command.
-rw-r--r--src/cmd1.cc65
-rw-r--r--src/cmd2.cc9
-rw-r--r--src/externs.h5
-rw-r--r--src/tables.cc9
-rw-r--r--src/variable.cc8
5 files changed, 22 insertions, 74 deletions
diff --git a/src/cmd1.cc b/src/cmd1.cc
index 2548aa72..3f7b6ad9 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -3188,13 +3188,6 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
oktomove = FALSE;
}
- /* Disarm a visible trap */
- else if (easy_disarm && disarm && (c_ptr->info & (CAVE_TRDT)))
- {
- (void)do_cmd_disarm_aux(y, x, tmp, do_pickup);
- return;
- }
-
/* Don't step on known traps. */
else if (disarm && (c_ptr->info & (CAVE_TRDT)) && !(p_ptr->confused || p_ptr->stun || p_ptr->image))
{
@@ -3256,61 +3249,35 @@ void move_player_aux(int dir, int do_pickup, int run, bool_ disarm)
/* Rubble */
if (c_ptr->feat == FEAT_RUBBLE)
{
- if (!easy_tunnel)
- {
- msg_print("There is rubble blocking your way.");
+ msg_print("There is rubble blocking your way.");
- if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
- energy_use = 0;
- /*
- * Well, it makes sense that you lose time bumping into
- * a wall _if_ you are confused, stunned or blind; but
- * typing mistakes should not cost you a turn...
- */
- }
- else
- {
- do_cmd_tunnel_aux(y, x, dir);
- return;
- }
+ if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
+ energy_use = 0;
+ /*
+ * Well, it makes sense that you lose time bumping into
+ * a wall _if_ you are confused, stunned or blind; but
+ * typing mistakes should not cost you a turn...
+ */
}
/* Closed doors */
else if ((c_ptr->feat >= FEAT_DOOR_HEAD) && (c_ptr->feat <= FEAT_DOOR_TAIL))
{
- if (easy_open)
- {
- if (easy_open_door(y, x)) return;
- }
- else
- {
- msg_print("There is a closed door blocking your way.");
-
- if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
- energy_use = 0;
- }
+ if (easy_open_door(y, x)) return;
}
/* Wall (or secret door) */
else
{
- if (!easy_tunnel)
- {
- int feat;
+ int feat;
- if (c_ptr->mimic) feat = c_ptr->mimic;
- else
- feat = f_info[c_ptr->feat].mimic;
+ if (c_ptr->mimic) feat = c_ptr->mimic;
+ else
+ feat = f_info[c_ptr->feat].mimic;
- msg_format("There is %s.", f_info[feat].block);
+ msg_format("There is %s.", f_info[feat].block);
- if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
- energy_use = 0;
- }
- else
- {
- do_cmd_tunnel_aux(y, x, dir);
- return;
- }
+ if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
+ energy_use = 0;
}
}
diff --git a/src/cmd2.cc b/src/cmd2.cc
index aa4371ac..aa98533a 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -1105,8 +1105,7 @@ void do_cmd_open(void)
return;
}
- /* Option: Pick a direction */
- if (easy_open)
+ /* Pick a direction if there's an obvious target */
{
int num_doors, num_chests;
@@ -1272,8 +1271,7 @@ void do_cmd_close(void)
bool_ more = FALSE;
- /* Option: Pick a direction */
- if (easy_open)
+ /* Pick a direction if there's an obvious choice */
{
int num_doors;
@@ -2122,8 +2120,7 @@ void do_cmd_disarm(void)
bool_ more = FALSE;
- /* Option: Pick a direction */
- if (easy_disarm)
+ /* Pick a direction if there's an obvious choice */
{
int num_traps, num_chests;
diff --git a/src/externs.h b/src/externs.h
index 3313c081..a986ded0 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -1579,11 +1579,6 @@ extern bool_ repeat_pull(int *what);
extern void repeat_check(void);
extern void get_count(int number, int max);
-/* variable.c */
-extern bool_ easy_open;
-extern bool_ easy_tunnel;
-extern bool_ easy_disarm;
-
/* cmd2.c */
extern bool_ easy_open_door(int y, int x);
diff --git a/src/tables.cc b/src/tables.cc
index 425e400d..00da471d 100644
--- a/src/tables.cc
+++ b/src/tables.cc
@@ -1445,15 +1445,6 @@ option_type option_info[] =
{ &disturb_pets, FALSE, 2, 17,
"disturb_pets", "Disturb when visible pets move" },
- { &easy_open, TRUE, 2, 18,
- "easy_open", "Automatically open doors" },
-
- { &easy_disarm, TRUE, 2, 19,
- "easy_disarm", "Automatically disarm traps" },
-
- { &easy_tunnel, FALSE, 2, 20,
- "easy_tunnel", "Automatically tunnel walls" },
-
/*** Game-Play ***/
{ &auto_scum, TRUE, 3, 1,
diff --git a/src/variable.cc b/src/variable.cc
index bc4a5570..7172158d 100644
--- a/src/variable.cc
+++ b/src/variable.cc
@@ -842,11 +842,9 @@ bool_ (*get_mon_num2_hook)(int r_idx);
*/
bool_ (*get_obj_num_hook)(int k_idx);
-
-bool_ easy_open = TRUE;
-bool_ easy_disarm = TRUE;
-bool_ easy_tunnel = FALSE;
-
+/*
+ * Devices
+ */
s32b get_level_max_stick = -1;
s32b get_level_use_stick = -1;