#include "angband.h"
#include "util.h"
+#include "term.h"
+#include "autopick.h"
+#include "core.h"
#include "mind.h"
#include "store.h"
#include "player-status.h"
#include "player-move.h"
+#include "player-class.h"
+#include "player-race.h"
+#include "objectkind.h"
+#include "object-ego.h"
#include "object-flavor.h"
#include "object-hook.h"
#include "files.h"
#include "floor.h"
#include "world.h"
+#include "monster.h"
+#include "monsterrace.h"
+#include "view-mainwindow.h"
#define MAX_LINELEN 1024
/*
+ * 自動拾い/破壊設定のリストに関する変数 / List for auto-picker/destroyer entries
+ */
+int max_autopick = 0; /*!< 現在登録している自動拾い/破壊設定の数 */
+int max_max_autopick = 0; /*!< 自動拾い/破壊設定の限界数 */
+autopick_type *autopick_list = NULL; /*!< 自動拾い/破壊設定構造体のポインタ配列 */
+
+/*
* A function to create new entry
*/
static bool autopick_new_entry(autopick_type *entry, concptr str, bool allow_default)
return format("%s.prf", namebase);
case PT_WITH_PNAME:
- return format("%s-%s.prf", namebase, player_base);
+ return format("%s-%s.prf", namebase, p_ptr->base_name);
default:
return NULL;
{
/*
* 'Collecting' means the item must be absorbed
- * into an inventory slot.
+ * into an p_ptr->inventory_list slot.
* But an item can not be absorbed into itself!
*/
- if ((&inventory[j] != o_ptr) &&
- object_similar(&inventory[j], o_ptr))
+ if ((&p_ptr->inventory_list[j] != o_ptr) &&
+ object_similar(&p_ptr->inventory_list[j], o_ptr))
return TRUE;
}
object_type *o_ptr;
/* Get the item (in the pack) */
- if (item >= 0) o_ptr = &inventory[item];
+ if (item >= 0) o_ptr = &p_ptr->inventory_list[item];
/* Get the item (on the floor) */
else o_ptr = ¤t_floor_ptr->o_list[0 - item];
/*
* Auto-inscription and/or destroy
*
- * Auto-destroyer works only on inventory or on floor stack only when
+ * Auto-destroyer works only on p_ptr->inventory_list or on floor stack only when
* requested.
*/
void autopick_alter_item(INVENTORY_IDX item, bool destroy)
int idx;
/* Get the item (in the pack) */
- if (item >= 0) o_ptr = &inventory[item];
+ if (item >= 0) o_ptr = &p_ptr->inventory_list[item];
/* Get the item (on the floor) */
else o_ptr = ¤t_floor_ptr->o_list[0 - item];
/*** Collecting items ***/
/*** Which can be absorbed into a slot as a bundle ***/
if (IS_FLG(FLG_COLLECTING))
- which_str[which_n++] = "can be absorbed into an existing inventory slot";
+ which_str[which_n++] = "can be absorbed into an existing p_ptr->inventory_list slot";
/*** Unaware items ***/
if (IS_FLG(FLG_UNAWARE))
q = _("どのアイテムを登録しますか? ", "Enter which item? ");
s = _("アイテムを持っていない。", "You have nothing to enter.");
- o_ptr = choose_object(NULL, q, s, USE_INVEN | USE_FLOOR | USE_EQUIP);
+ o_ptr = choose_object(NULL, q, s, USE_INVEN | USE_FLOOR | USE_EQUIP, 0);
if (!o_ptr) return FALSE;
autopick_entry_from_object(entry, o_ptr);
q = _("どのアイテムを検索しますか? ", "Enter which item? ");
s = _("アイテムを持っていない。", "You have nothing to enter.");
- o_ptr = choose_object(NULL, q, s, USE_INVEN | USE_FLOOR | USE_EQUIP);
+ o_ptr = choose_object(NULL, q, s, USE_INVEN | USE_FLOOR | USE_EQUIP, 0);
if (!o_ptr) return 0;
*o_handle = o_ptr;
static GAME_TEXT MN_SEARCH_STR[] = "Search by string";
static GAME_TEXT MN_SEARCH_FORW[] = "Search forward";
static GAME_TEXT MN_SEARCH_BACK[] = "Search backward";
-static GAME_TEXT MN_SEARCH_OBJ[] = "Search by inventory object";
+static GAME_TEXT MN_SEARCH_OBJ[] = "Search by p_ptr->inventory_list object";
static GAME_TEXT MN_SEARCH_DESTROYED[] = "Search by destroyed object";
static GAME_TEXT MN_INSERT[] = "Insert...";
old_autosave_turn = current_world_ptr->game_turn;
}
- /* HACK -- Reset start_time to stop counting current_world_ptr->play_time while edit */
+ /* HACK -- Reset current_world_ptr->start_time to stop counting current_world_ptr->play_time while edit */
update_playtime();
/* Free old entries */
/* Reload autopick pref */
process_autopick_file(buf);
- /* HACK -- reset start_time so that current_world_ptr->play_time is not increase while edit */
- start_time = (u32b)time(NULL);
+ /* HACK -- reset current_world_ptr->start_time so that current_world_ptr->play_time is not increase while edit */
+ current_world_ptr->start_time = (u32b)time(NULL);
/* Save cursor location */
cx_save = tb->cx;