From b93175b125d801ee9e123899e866b019c7645a05 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 21 Jun 2007 01:32:41 +0000 Subject: [PATCH] more precise dipping prompt (trunk only) Someone in the newsgroup accidentally dipped the wrong item into a fountain and wants the second prompt to be "Dip into the fountain?" instead of just "Dip _it_ into the fountain?", hoping that he would have noticed that he had selected the wrong object. I think he's fooling himself there, but this gives a brief object name for fountain, pool, and potion prompts. --- doc/fixes35.0 | 1 + src/potion.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 3763fd1d3..b99fba365 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -360,6 +360,7 @@ add `#vanquished' debug mode command C and #name commands are now same and use menu to choose monster vs object hallucination provides partial protection against gaze attacks attempting to read "dull" spellbook might cause hero to fall asleep +dipping prompt is more precise Platform- and/or Interface-Specific New Features diff --git a/src/potion.c b/src/potion.c index 932046cfb..9c701ddc1 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1699,17 +1699,19 @@ dodip() return(0); if (inaccessible_equipment(obj, "dip", FALSE)) return 0; + Sprintf(qbuf, "dip %s into", thesimpleoname(obj)); here = levl[u.ux][u.uy].typ; /* Is there a fountain to dip into here? */ if (IS_FOUNTAIN(here)) { - if(yn("Dip it into the fountain?") == 'y') { + Strcat(qbuf, " the fountain?"); + if (yn(upstart(qbuf)) == 'y') { dipfountain(obj); return(1); } } else if (is_pool(u.ux,u.uy)) { tmp = waterbody_name(u.ux,u.uy); - Sprintf(qbuf, "Dip it into the %s?", tmp); - if (yn(qbuf) == 'y') { + Sprintf(eos(qbuf), " the %s?", tmp); + if (yn(upstart(qbuf)) == 'y') { if (Levitation) { floating_above(tmp); #ifdef STEED @@ -1726,8 +1728,8 @@ dodip() } } - if(!(potion = getobj(beverages, "dip into"))) - return(0); + potion = getobj(beverages, qbuf); /* "dip into" */ + if (!potion) return 0; if (potion == obj && potion->quan == 1L) { pline("That is a potion bottle, not a Klein bottle!"); return 0;