context-sensitive inventory item-action quaff
Picking a potion from inventory and then picking 'quaff this potion' from the context menu needed handling similar to eat/offer/tin: skip floor candidates. If you were on a fountain or sink, picked a potion from inventory and then the quaff option for it, you weren't prompted to drink from the fountain but you were prompted for what potion to drink instead of using the one that had already been picked to initiate drinkig.
This commit is contained in:
@@ -531,8 +531,11 @@ dodrink(void)
|
||||
drink_ok_extra = 0;
|
||||
/* preceding 'q'/#quaff with 'm' skips the possibility of drinking
|
||||
from fountains, sinks, and surrounding water plus the prompting
|
||||
which those entail */
|
||||
if (!iflags.menu_requested) {
|
||||
which those entail; if cmdq is non-empty, player has selected a
|
||||
potion from inventory and then chosen action-item 'quaff' so
|
||||
skip fountains,&c for that case too--the potion's inv letter is
|
||||
queued up for next getobj() */
|
||||
if (!iflags.menu_requested && !cmdq_peek()) {
|
||||
/* Is there a fountain to drink from here? */
|
||||
if (IS_FOUNTAIN(levl[u.ux][u.uy].typ)
|
||||
/* not as low as floor level but similar restrictions apply */
|
||||
|
||||
Reference in New Issue
Block a user