summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-06-11 07:20:42 +0200
committerBardur Arantsson <bardur@scientician.net>2015-06-11 07:21:06 +0200
commit000f6272f8ab1d43ec6300fb5972f7813ada1c88 (patch)
tree00aad7d77fc407c55a82cec5cd107df09523d0ea
parent894d0831b5dd118b0072d9e651f4e51d41819c17 (diff)
Remove dead Portable Hole code
-rw-r--r--lib/help/defines.txt1
-rw-r--r--lib/mods/theme/help/defines.txt1
-rw-r--r--src/cmd3.cc125
-rw-r--r--src/cmd3.hpp3
-rw-r--r--src/defines.h2
-rw-r--r--src/skills.cc3
6 files changed, 0 insertions, 135 deletions
diff --git a/lib/help/defines.txt b/lib/help/defines.txt
index ac997501..13609658 100644
--- a/lib/help/defines.txt
+++ b/lib/help/defines.txt
@@ -66,7 +66,6 @@ TV_BOOK 111 /* spell books */
~~~~~12|Svals
/* The "sval" codes for TV_TOOL */
SV_TOOL_CLIMB 0
- SV_PORTABLE_HOLE 1
~~~~~16
/* The "sval" codes for TV_SHOT/TV_ARROW/TV_BOLT */
SV_AMMO_LIGHT 0 /* pebbles */
diff --git a/lib/mods/theme/help/defines.txt b/lib/mods/theme/help/defines.txt
index ac997501..13609658 100644
--- a/lib/mods/theme/help/defines.txt
+++ b/lib/mods/theme/help/defines.txt
@@ -66,7 +66,6 @@ TV_BOOK 111 /* spell books */
~~~~~12|Svals
/* The "sval" codes for TV_TOOL */
SV_TOOL_CLIMB 0
- SV_PORTABLE_HOLE 1
~~~~~16
/* The "sval" codes for TV_SHOT/TV_ARROW/TV_BOLT */
SV_AMMO_LIGHT 0 /* pebbles */
diff --git a/src/cmd3.cc b/src/cmd3.cc
index 6f2d67e9..06300982 100644
--- a/src/cmd3.cc
+++ b/src/cmd3.cc
@@ -1859,131 +1859,6 @@ bool_ do_cmd_sense_grid_mana()
/*
- * Calculate the weight of the portable holes
- */
-s32b portable_hole_weight(void)
-{
- s32b weight, i;
-
- store_type *st_ptr = &town_info[TOWN_RANDOM].store[STORE_HOME];
-
-
- /* Sum the objects in the appropriate home */
- for (i = 0, weight = 0; i < st_ptr->stock_num; i++)
- {
- object_type *o_ptr = &st_ptr->stock[i];
-
- weight += (o_ptr->weight * o_ptr->number);
- }
-
- /* Multiply the sum with 1.5 */
- weight = (weight * 3) / 2 + 2;
-
- return (weight);
-}
-
-
-/*
- * Calculate and set the weight of the portable holes
- */
-void set_portable_hole_weight(void)
-{
- s32b weight, i, j;
-
- /* Calculate the weight of items in home */
- weight = portable_hole_weight();
-
- /* Set the weight of portable holes in the shops, ... */
- for (i = 1; i < max_towns; i++)
- {
- for (j = 0; j < max_st_idx; j++)
- {
- store_type *st_ptr = &town_info[i].store[j];
- int k;
-
- for (k = 0; k < st_ptr->stock_num; k++)
- {
- object_type *o_ptr = &st_ptr->stock[k];
-
- if ((o_ptr->tval == TV_TOOL) &&
- (o_ptr->sval == SV_PORTABLE_HOLE))
- o_ptr->weight = weight;
- }
- }
- }
-
- /* ... in the object list, ... */
- for (i = 1; i < o_max; i++)
- {
- object_type *o_ptr = &o_list[i];
-
- if ((o_ptr->tval == TV_TOOL) &&
- (o_ptr->sval == SV_PORTABLE_HOLE)) o_ptr->weight = weight;
- }
-
- /* ... and in the p_ptr->inventory to the appropriate value */
- for (i = 0; i < INVEN_TOTAL; i++)
- {
- object_type *o_ptr = &p_ptr->inventory[i];
-
- /* Skip non-objects */
- if ((o_ptr->tval == TV_TOOL) &&
- (o_ptr->sval == SV_PORTABLE_HOLE)) o_ptr->weight = weight;
- }
-}
-
-
-/*
- * Use a portable hole
- */
-void do_cmd_portable_hole(void)
-{
- cave_type *c_ptr = &cave[p_ptr->py][p_ptr->px];
-
- int feat, special, town_num;
-
- /* Is it currently wielded? */
- if (!p_ptr->inventory[INVEN_TOOL].k_idx ||
- (p_ptr->inventory[INVEN_TOOL].tval != TV_TOOL) ||
- (p_ptr->inventory[INVEN_TOOL].sval != SV_PORTABLE_HOLE))
- {
- /* No, it isn't */
- msg_print("You have to wield a portable hole to use your abilities");
- return;
- }
-
- /* Mega-hack: Saving the old values, and then... */
- feat = c_ptr->feat;
- special = c_ptr->special;
- town_num = p_ptr->town_num;
-
- /* ... change the current grid to the home in town #1 */
- /* DG -- use the first random town, since random towns cannot have houses */
- /*
- * pelpel -- This doesn't affect LoS, so we can manipulate
- * terrain feature without calling cave_set_feat()
- */
- c_ptr->feat = FEAT_SHOP;
- c_ptr->special = STORE_HOME;
- p_ptr->town_num = TOWN_RANDOM;
-
- /* Now use the portable hole */
- do_cmd_store();
-
- /* Mega-hack part II: change the current grid to the original value */
- c_ptr->feat = feat;
- c_ptr->special = special;
- p_ptr->town_num = town_num;
-
- set_portable_hole_weight();
-
- /* Recalculate bonuses */
- p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
- p_ptr->update |= (PU_BONUS);
-}
-
-
-/*
* Try to add a CLI action.
*/
void cli_add(cptr active, cptr trigger, cptr descr)
diff --git a/src/cmd3.hpp b/src/cmd3.hpp
index a496a42d..48677b77 100644
--- a/src/cmd3.hpp
+++ b/src/cmd3.hpp
@@ -22,6 +22,3 @@ extern void do_cmd_locate(void);
extern void do_cmd_query_symbol(void);
extern bool_ do_cmd_sense_grid_mana(void);
extern bool_ research_mon(void);
-extern s32b portable_hole_weight(void);
-extern void set_portable_hole_weight(void);
-extern void do_cmd_portable_hole(void);
diff --git a/src/defines.h b/src/defines.h
index 72acb003..7021609f 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -441,7 +441,6 @@
#define MKEY_RUNE 9
#define MKEY_FORGING 10
#define MKEY_INCARNATION 11
-#define MKEY_TELEKINESIS 12
#define MKEY_SUMMON 13
#define MKEY_TRAP 14
#define MKEY_STEAL 15
@@ -1257,7 +1256,6 @@
/* The "sval" codes for TV_TOOL */
#define SV_TOOL_CLIMB 0
-#define SV_PORTABLE_HOLE 1
/* The "sval" codes for TV_MSTAFF */
#define SV_MSTAFF 1
diff --git a/src/skills.cc b/src/skills.cc
index a5808b37..330aa9ba 100644
--- a/src/skills.cc
+++ b/src/skills.cc
@@ -1028,9 +1028,6 @@ void do_cmd_activate_skill()
case MKEY_INCARNATION:
do_cmd_possessor();
break;
- case MKEY_TELEKINESIS:
- do_cmd_portable_hole();
- break;
case MKEY_SUMMON:
do_cmd_summoner();
break;