]> granicus.if.org Git - nethack/commitdiff
Show current timeouts in #wizintrinsic
authorPasi Kallinen <paxed@alt.org>
Fri, 4 Aug 2017 18:41:04 +0000 (21:41 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 4 Aug 2017 18:41:04 +0000 (21:41 +0300)
src/cmd.c

index 719c4902e0512542e938bdc4439079776681d5b2..53a800bd9248775ddc7f0259d57a6607fa95cd06 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1189,7 +1189,12 @@ wiz_intrinsic(VOID_ARGS)
                 add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "--", FALSE);
             }
             any.a_int = i + 1; /* +1: avoid 0 */
-            add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, propname, FALSE);
+            oldtimeout = u.uprops[p].intrinsic & TIMEOUT;
+            if (oldtimeout)
+                Sprintf(buf, "%-27s [%li]", propname, oldtimeout);
+            else
+                Sprintf(buf, "%s", propname);
+            add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
         }
         end_menu(win, "Which intrinsics?");
         n = select_menu(win, PICK_ANY, &pick_list);