#include "angband.h"
#include "store.h"
#include "player-status.h"
+#include "player-move.h"
#include "object-hook.h"
#define MAX_LINELEN 1024
static GAME_TEXT KEY_ARTIFACT[] = "artifact";
static GAME_TEXT KEY_EGO[] = "ego";
static GAME_TEXT KEY_GOOD[] = "good";
-static GAME_TEXT KEY_nameLESS[] = "nameless";
+static GAME_TEXT KEY_NAMELESS[] = "nameless";
static GAME_TEXT KEY_AVERAGE[] = "average";
static GAME_TEXT KEY_WORTHLESS[] = "worthless";
static GAME_TEXT KEY_RARE[] = "rare";
{
int idx;
object_type *o_ptr = ¤t_floor_ptr->o_list[this_o_idx];
-
- /* Acquire next object */
- next_o_idx = o_ptr->next_o_idx;
+ next_o_idx = o_ptr->next_o_idx;
idx = is_autopick(o_ptr);
char pref_file[1024];
FILE *pref_fff;
autopick_type an_entry, *entry = &an_entry;
+ concptr tmp;
int match_autopick = is_autopick(o_ptr);
}
/* Check the header */
- while (TRUE)
- {
- /* Read a line */
- if (my_fgets(pref_fff, buf, sizeof(buf)))
+ if (pref_fff) {
+ while (TRUE)
{
- /* No header found */
- p_ptr->autopick_autoregister = FALSE;
+ /* Read a line */
+ if (my_fgets(pref_fff, buf, sizeof(buf)))
+ {
+ /* No header found */
+ p_ptr->autopick_autoregister = FALSE;
- break;
- }
+ break;
+ }
- if (streq(buf, autoregister_header))
- {
- /* Found the header */
- p_ptr->autopick_autoregister = TRUE;
+ if (streq(buf, autoregister_header))
+ {
+ /* Found the header */
+ p_ptr->autopick_autoregister = TRUE;
- break;
+ break;
+ }
}
- }
- /* Close read only FILE* */
- fclose(pref_fff);
+ /* Close read only FILE* */
+ fclose(pref_fff);
+ }
+ else
+ {
+ /*
+ * File could not be opened for reading. Assume header not
+ * present.
+ */
+ p_ptr->autopick_autoregister = FALSE;
+ }
/* Open for append */
pref_fff = my_fopen(pref_file, "a");
fprintf(pref_fff, "%s\n", autoregister_header);
fprintf(pref_fff, "%s\n", _("# *警告!!* 以降の行は自動登録されたものです。",
- "# *Waring!* The lines below will be deleated later."));
+ "# *Warning!* The lines below will be deleted later."));
fprintf(pref_fff, "%s\n", _("# 後で自動的に削除されますので、必要な行は上の方へ移動しておいてください。",
"# Keep it by cut & paste if you need these lines for future characters."));
/* Add a line to the file */
/* Don't kill "entry" */
- fprintf(pref_fff, "%s\n", autopick_line_from_entry(entry));
+ tmp = autopick_line_from_entry(entry);
+ fprintf(pref_fff, "%s\n", tmp);
+ string_free(tmp);
fclose(pref_fff);
return TRUE;
{
before_str[before_n++] = "very rare";
body_str = "equipments";
- after_str[after_n++] = "such like Dragon armors, Blades of Chaos, etc.";
+ after_str[after_n++] = "such as Dragon armor, Blades of Chaos, etc.";
}
/*** Common equipments ***/
{
before_str[before_n++] = "relatively common";
body_str = "equipments";
- after_str[after_n++] = "compared to very rare Dragon armors, Blades of Chaos, etc.";
+ after_str[after_n++] = "compared to very rare Dragon armor, Blades of Chaos, etc.";
}
/*** Worthless items ***/
else if (IS_FLG(FLG_MISSILES))
body_str = "shots, arrows or crossbow bolts";
else if (IS_FLG(FLG_DEVICES))
- body_str = "scrolls, wands, staves or rods";
+ body_str = "scrolls, wands, staffs or rods";
else if (IS_FLG(FLG_LIGHTS))
body_str = "light sources";
else if (IS_FLG(FLG_JUNKS))
{
str++;
top = TRUE;
- whose_str[whose_n++] = "name is beginning with \"";
+ whose_str[whose_n++] = "name begins with \"";
}
else
which_str[which_n++] = "have \"";
static GAME_TEXT MN_CL_NO_DISP[] = "'(' (No display on the large map)";
static GAME_TEXT MN_ADJECTIVE_GEN[] = "Adjective (general)";
-static GAME_TEXT MN_RARE[] = "rare (equipments)";
-static GAME_TEXT MN_COMMON[] = "common (equipments)";
+static GAME_TEXT MN_RARE[] = "rare (equipment)";
+static GAME_TEXT MN_COMMON[] = "common (equipment)";
static GAME_TEXT MN_ADJECTIVE_SPECIAL[] = "Adjective (special)";
static GAME_TEXT MN_BOOSTED[] = "dice boosted (weapons)";
old_autosave_turn = current_world_ptr->game_turn;
}
- /* HACK -- Reset start_time to stop counting playtime while edit */
+ /* HACK -- Reset 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 playtime is not increase while edit */
+ /* HACK -- reset start_time so that current_world_ptr->play_time is not increase while edit */
start_time = (u32b)time(NULL);
/* Save cursor location */