Adjust couple therecmdmenu entries
- Don't show attacking a peaceful or tame monster, as that is actually swapping places with them - so add that. - Don't show naming a hostile monster - it's usually not wanted, and this way when clicking a hostile monster, the only entry is the attack, so will be executed automatically. This makes it much more usable.
This commit is contained in:
@@ -5541,15 +5541,18 @@ there_cmd_menu_next2u(
|
|||||||
if (mtmp && (mtmp->mpeaceful || mtmp->mtame)) {
|
if (mtmp && (mtmp->mpeaceful || mtmp->mtame)) {
|
||||||
Sprintf(buf, "Talk to %s", mon_nam(mtmp));
|
Sprintf(buf, "Talk to %s", mon_nam(mtmp));
|
||||||
mcmd_addmenu(win, MCMD_TALK, buf), ++K;
|
mcmd_addmenu(win, MCMD_TALK, buf), ++K;
|
||||||
}
|
|
||||||
if (mtmp) {
|
Sprintf(buf, "Swap places with %s", mon_nam(mtmp));
|
||||||
|
mcmd_addmenu(win, MCMD_MOVE_DIR, buf), ++K;
|
||||||
|
|
||||||
Sprintf(buf, "%s %s",
|
Sprintf(buf, "%s %s",
|
||||||
!has_mgivenname(mtmp) ? "Name" : "Rename",
|
!has_mgivenname(mtmp) ? "Name" : "Rename",
|
||||||
mon_nam(mtmp));
|
mon_nam(mtmp));
|
||||||
mcmd_addmenu(win, MCMD_NAME, buf), ++K;
|
mcmd_addmenu(win, MCMD_NAME, buf), ++K;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mtmp || glyph_is_invisible(glyph_at(x, y))) {
|
if ((mtmp && !(mtmp->mpeaceful || mtmp->mtame))
|
||||||
|
|| glyph_is_invisible(glyph_at(x, y))) {
|
||||||
Sprintf(buf, "Attack %s", mtmp ? mon_nam(mtmp) : "unseen creature");
|
Sprintf(buf, "Attack %s", mtmp ? mon_nam(mtmp) : "unseen creature");
|
||||||
mcmd_addmenu(win, MCMD_ATTACK_NEXT2U, buf), ++K;
|
mcmd_addmenu(win, MCMD_ATTACK_NEXT2U, buf), ++K;
|
||||||
/* attacking overrides any other automatic action */
|
/* attacking overrides any other automatic action */
|
||||||
|
|||||||
Reference in New Issue
Block a user