2 * @brief 自動拾いの登録状況を表示する
7 #include "knowledge/knowledge-autopick.h"
8 #include "autopick/autopick-entry.h"
9 #include "autopick/autopick-methods-table.h"
10 #include "autopick/autopick-reader-writer.h"
11 #include "core/asking-player.h"
12 #include "core/show-file.h"
13 #include "io-dump/dump-util.h"
14 #include "util/angband-files.h"
17 * @brief 自動拾い設定ファイルをロードするコマンドのメインルーチン /
18 * @param creature_ptr プレーヤーへの参照ポインタ
21 void do_cmd_reload_autopick(player_type *creature_ptr)
23 if (!get_check(_("自動拾い設定ファイルをロードしますか? ", "Reload auto-pick preference file? ")))
26 autopick_load_pref(creature_ptr, TRUE);
31 * Check the status of "autopick"
33 void do_cmd_knowledge_autopick(player_type *creature_ptr)
36 GAME_TEXT file_name[FILE_NAME_SIZE];
37 if (!open_temporary_file(&fff, file_name)) return;
41 fprintf(fff, _("自動破壊/拾いには何も登録されていません。", "No preference for auto picker/destroyer."));
45 fprintf(fff, _(" 自動拾い/破壊には現在 %d行登録されています。\n\n",
46 " There are %d registered lines for auto picker/destroyer.\n\n"), max_autopick);
49 for (int k = 0; k < max_autopick; k++)
52 byte act = autopick_list[k].action;
53 if (act & DONT_AUTOPICK)
55 tmp = _("放置", "Leave");
57 else if (act & DO_AUTODESTROY)
59 tmp = _("破壊", "Destroy");
61 else if (act & DO_AUTOPICK)
63 tmp = _("拾う", "Pickup");
67 tmp = _("確認", "Query");
71 fprintf(fff, "%11s", format("[%s]", tmp));
73 fprintf(fff, "%11s", format("(%s)", tmp));
75 tmp = autopick_line_from_entry(&autopick_list[k]);
76 fprintf(fff, " %s", tmp);
83 (void)show_file(creature_ptr, TRUE, file_name, _("自動拾い/破壊 設定リスト", "Auto-picker/Destroyer"), 0, 0);