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);
30 * Check the status of "autopick"
32 void do_cmd_knowledge_autopick(player_type *creature_ptr)
35 GAME_TEXT file_name[FILE_NAME_SIZE];
36 if (!open_temporary_file(&fff, file_name))
40 fprintf(fff, _("自動破壊/拾いには何も登録されていません。", "No preference for auto picker/destroyer."));
42 fprintf(fff, _(" 自動拾い/破壊には現在 %d行登録されています。\n\n", " There are %d registered lines for auto picker/destroyer.\n\n"), max_autopick);
45 for (int k = 0; k < max_autopick; k++) {
47 byte act = autopick_list[k].action;
48 if (act & DONT_AUTOPICK) {
49 tmp = _("放置", "Leave");
50 } else if (act & DO_AUTODESTROY) {
51 tmp = _("破壊", "Destroy");
52 } else if (act & DO_AUTOPICK) {
53 tmp = _("拾う", "Pickup");
55 tmp = _("確認", "Query");
59 fprintf(fff, "%11s", format("[%s]", tmp));
61 fprintf(fff, "%11s", format("(%s)", tmp));
63 tmp = autopick_line_from_entry(&autopick_list[k]);
64 fprintf(fff, " %s", tmp);
71 (void)show_file(creature_ptr, TRUE, file_name, _("自動拾い/破壊 設定リスト", "Auto-picker/Destroyer"), 0, 0);