change 'm #tip' behavior
Using the 'm' prefix with #tip was putting up a menu to pick between one or more floor containers and 'choose from invent', but that interfered with choosing Tip as a context-sensitive item-action for carried container. Change 'm' to behave like it does with #eat and \#quaff and several other commands: skip possible candidates on the floor and go directly to picking something from inventory. That prevents using 'm' to force a menu of |a - <floor container> |i - pick a container being carried for any menustyle when there is one floor container. For menustyles other than traditional, I think that's inconsequential; player needs to answer 'n' for floor container and then get the choose-from-invent prompt instead of 'i' and then choose. When there are two or more containers on hero's spot, 'm' prefix isn't needed to get that menu. Unfortuately using 'm' to override menustyle:Traditional is still a thing players might want to do. Keep the prior behavior for that style when multiple containers are present (dotip() already skipped that menu despite 'm' when there was just one container). Use the new behavior (skip floor containers) when one (or none) is present. That's inconsistent but seems more useful than alternatives. It is relatively unlikely that anyone who uses traditional non-menu item selection will also use newfangled inventory item-actions so the menu isn't likely to interfere with the latter. Update the Guidebook to describe how Traditional differs just in case.
This commit is contained in:
@@ -2844,6 +2844,15 @@ itemactions_pushkeys(struct obj *otmp, int act)
|
||||
cmdq_add_key(CQ_CANNED, otmp->invlet);
|
||||
break;
|
||||
case IA_TIP_CONTAINER:
|
||||
/* start with m-prefix to skip floor containers;
|
||||
for menustyle:Traditional when more than one floor
|
||||
container is present, player will get a #tip menu and
|
||||
have to pick the "tip sometking being carried" choice,
|
||||
then this item will be already chosen from inventory;
|
||||
suboptimal but possibly an acceptable tradeoff since
|
||||
combining item actions with use of traditional ggetobj()
|
||||
is an unlikely scenario */
|
||||
cmdq_add_ec(CQ_CANNED, do_reqmenu);
|
||||
cmdq_add_ec(CQ_CANNED, dotip);
|
||||
cmdq_add_key(CQ_CANNED, otmp->invlet);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user