fix #H4205 - take-off of covered items
Bug report subject was "menu interface things" but this isn't related to menus, just getobj(). Make the requested change to not list worn suit as a likely candidate for T (and R) if a worn cloak is going to prevent it from being removed. (Suit can still be picked, but the take-off operation for it will be refused, same as when it was being listed as a candidate.) In discussion about the request, there was a separate suggestion that cloaks shouldn't interfere with removing things underneath since they're generally sleeveless. I haven't done that; I think it is better to keep the layering as it is. The bug report also asked for the likely candidates when writing with a magic marker to exclude non-blank scrolls and books. That has been implemented already (post-3.6.0).
This commit is contained in:
@@ -1131,9 +1131,10 @@ register const char *let, *word;
|
||||
&& (!Is_astralevel(&u.uz) ^ (otmp->oclass != AMULET_CLASS)))
|
||||
/* suppress container being stashed into */
|
||||
|| (!strcmp(word, "stash") && !ck_bag(otmp))
|
||||
/* worn armor or accessory covered by cursed worn armor */
|
||||
/* worn armor (shirt, suit) covered by worn armor (suit, cloak)
|
||||
or accessory (ring) covered by cursed worn armor (gloves) */
|
||||
|| (taking_off(word)
|
||||
&& inaccessible_equipment(otmp, (const char *) 0, TRUE))
|
||||
&& inaccessible_equipment(otmp, (const char *) 0, FALSE))
|
||||
|| (!strcmp(word, "write on")
|
||||
&& (!(otyp == SCR_BLANK_PAPER || otyp == SPE_BLANK_PAPER)
|
||||
|| !otmp->dknown || !objects[otyp].oc_name_known))
|
||||
|
||||
Reference in New Issue
Block a user