From fe5edc3ef063ca4d0678bf045346542053eea17b Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 18 Jun 2006 17:08:03 +0000 Subject: [PATCH] (map): Fix misleading prompt to reflect the real choices for the player. --- src/lib/commands/map.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/commands/map.c b/src/lib/commands/map.c index 50f64956..5227aa93 100644 --- a/src/lib/commands/map.c +++ b/src/lib/commands/map.c @@ -50,13 +50,14 @@ int map(void) { char *b; - int unit_type = 0; + int unit_type = EF_BAD; int bmap = 0; char *str; struct nstr_sect ns; char origin = '\0'; int map_flags = 0; char buf[1024]; + char prompt[128]; if (**player->argp != 'm') { if (**player->argp == 'b') @@ -80,7 +81,13 @@ map(void) } if (player->argp[1] == NULL) { - str = getstring("(sects)? ", buf); + if (unit_type == EF_BAD) { + str = getstring("(sects)? ", buf); + } else { + sprintf(prompt, "(sects, %s)? ", ef_nameof(unit_type)); + str = getstring(prompt, buf); + } + if (!str || !*str) return RET_SYN; } else