if (IS_FLG(FLG_HUMAN)) ADD_KEY(KEY_HUMAN);
if (IS_FLG(FLG_WORTHLESS)) ADD_KEY(KEY_WORTHLESS);
if (IS_FLG(FLG_NAMELESS)) ADD_KEY(KEY_NAMELESS);
- if (IS_FLG(FLG_ARTIFACT)) ADD_KEY(KEY_ARTIFACT);
if (IS_FLG(FLG_EGO)) ADD_KEY(KEY_EGO);
+ if (IS_FLG(FLG_ARTIFACT)) ADD_KEY(KEY_ARTIFACT);
+
if (IS_FLG(FLG_ITEMS)) ADD_KEY2(KEY_ITEMS);
else if (IS_FLG(FLG_WEAPONS)) ADD_KEY2(KEY_WEAPONS);
else if (IS_FLG(FLG_ARMORS)) ADD_KEY2(KEY_ARMORS);
else if (IS_FLG(FLG_HELMS)) ADD_KEY2(KEY_HELMS);
else if (IS_FLG(FLG_GLOVES)) ADD_KEY2(KEY_GLOVES);
else if (IS_FLG(FLG_BOOTS)) ADD_KEY2(KEY_BOOTS);
- else
+
+ /* You don't need sepalator after adjective */
+ /* 'artifact' is not true adjective */
+ else if (!IS_FLG(FLG_ARTIFACT))
sepa_flag = FALSE;
if (entry->name && entry->name[0])
buf[i] = '\0';
}
+ return string_make(buf);
+}
+
+
+/*
+ * Reconstruct preference line from entry and kill entry
+ */
+static cptr autopick_line_from_entry_kill(autopick_type *entry)
+{
+ cptr ptr = autopick_line_from_entry(entry);
+
/* Free memory for original entry */
autopick_free_entry(entry);
- return string_make(buf);
+ return ptr;
}
+
/*
* A function to create new entry
*/
else if (IS_FLG(FLG_HELMS))
body_str = "¥Ø¥ë¥á¥Ã¥È¤ä´§";
else if (IS_FLG(FLG_GLOVES))
- body_str = "¾®¼ê";
+ body_str = "äƼê";
else if (IS_FLG(FLG_BOOTS))
body_str = "¥Ö¡¼¥Ä";
}
if (insc)
- strncat(buff, format("¤Ë¡Ö%s¡×¤È¹ï¤ó¤Ç", insc), 80);
+ {
+ strncat(buff, format("¤Ë¡Ö%s¡×", insc), 80);
+
+ if (strstr(insc, "%%all"))
+ strcat(buff, "(%%all¤ÏÁ´Ç½ÎϤòɽ¤¹±Ñ»ú¤Îµ¹æ¤ÇÃÖ´¹)");
+ else if (strstr(insc, "%all"))
+ strcat(buff, "(%all¤ÏÁ´Ç½ÎϤòɽ¤¹µ¹æ¤ÇÃÖ´¹)");
+ else if (strstr(insc, "%%"))
+ strcat(buff, "(%%¤ÏÄɲÃǽÎϤòɽ¤¹±Ñ»ú¤Îµ¹æ¤ÇÃÖ´¹)");
+ else if (strstr(insc, "%"))
+ strcat(buff, "(%¤ÏÄɲÃǽÎϤòɽ¤¹µ¹æ¤ÇÃÖ´¹)");
+
+ strcat(buff, "¤È¹ï¤ó¤Ç");
+ }
else
strcat(buff, "¤ò");
/* Auto-insctiption */
if (insc)
- strncat(buff, format("and inscribe \"%s\" on ", insc), 80);
+ {
+ strncat(buff, format("and inscribe \"%s\"", insc), 80);
+
+ if (strstr(insc, "%all"))
+ strcat(buff, ", replacing %all with code string representing all abilities,");
+ else if (strstr(insc, "%"))
+ strcat(buff, ", replacing % with code string representing extra random abilities,");
+
+ strcat(buff, " on ");
+ }
/* Adjective */
if (!before_n)
if (act & DO_DISPLAY)
{
if (act & DONT_AUTOPICK)
- strcat(buff, " Display these items when you press 'N' in the full map('M').");
+ strcat(buff, " Display these items when you press the N key in the full 'M'ap.");
else if (act & DO_AUTODESTROY)
- strcat(buff, " Display these items when you press 'K' in the full map('M').");
+ strcat(buff, " Display these items when you press the K key in the full 'M'ap.");
else
- strcat(buff, " Display these items when you press 'M' in the full map('M').");
+ strcat(buff, " Display these items when you press the M key in the full 'M'ap.");
}
else
strcat(buff, " Not displayed in the full map.");
else
ADD_FLG(flg);
- lines_list[y] = autopick_line_from_entry(entry);
+ lines_list[y] = autopick_line_from_entry_kill(entry);
}
/*
object_type *search_o_ptr = NULL;
cptr search_str = NULL;
- cptr last_destroyed;
+ cptr last_destroyed = NULL;
char last_destroyed_command[WID_DESC+3];
char yank_buf[MAX_YANK];
char classrace[80];
init_autopicker();
/* Name of the Last Destroyed Item */
- autopick_entry_from_object(entry, &autopick_last_destroyed_object);
- last_destroyed = autopick_line_from_entry(entry);
+ if (autopick_last_destroyed_object.k_idx)
+ {
+ autopick_entry_from_object(entry, &autopick_last_destroyed_object);
+ last_destroyed = autopick_line_from_entry_kill(entry);
+ }
/* Command Description of the Last Destroyed Item */
if (last_destroyed)
{
- strcpy(last_destroyed_command, "^L \"");
- strncpy(last_destroyed_command + 4, last_destroyed, WID_DESC-4);
+ strncpy(last_destroyed_command, format("^L \"%s\"", last_destroyed), WID_DESC+2);
last_destroyed_command[WID_DESC+2] = '\0';
}
else
entry->action |= DO_AUTOPICK;
}
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;
entry->action |= DO_AUTOPICK;
}
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;
else
entry->action &= ~DO_DISPLAY;
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;
if (cx > 0) cx--;
}
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;
dirty_flags |= DIRTY_SCREEN;
break;
}
- tmp = autopick_line_from_entry(entry);
+ tmp = autopick_line_from_entry_kill(entry);
if (tmp)
{
if (!entry->insc) entry->insc = string_make("");
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Move to collumn for auto inscription */
for (cx = 0; lines_list[cy][cx]; cx++)
entry->action |= DO_AUTOPICK;
}
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;
REM_FLG(FLG_STAR_IDENTIFIED);
}
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;
REM_FLG(FLG_ARTIFACT);
}
- lines_list[cy] = autopick_line_from_entry(entry);
+ lines_list[cy] = autopick_line_from_entry_kill(entry);
/* Now dirty */
dirty_line = cy;