(map): Fix misleading prompt to reflect the real choices for the player.
This commit is contained in:
parent
94bc512581
commit
fe5edc3ef0
1 changed files with 9 additions and 2 deletions
|
@ -50,13 +50,14 @@ int
|
||||||
map(void)
|
map(void)
|
||||||
{
|
{
|
||||||
char *b;
|
char *b;
|
||||||
int unit_type = 0;
|
int unit_type = EF_BAD;
|
||||||
int bmap = 0;
|
int bmap = 0;
|
||||||
char *str;
|
char *str;
|
||||||
struct nstr_sect ns;
|
struct nstr_sect ns;
|
||||||
char origin = '\0';
|
char origin = '\0';
|
||||||
int map_flags = 0;
|
int map_flags = 0;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
char prompt[128];
|
||||||
|
|
||||||
if (**player->argp != 'm') {
|
if (**player->argp != 'm') {
|
||||||
if (**player->argp == 'b')
|
if (**player->argp == 'b')
|
||||||
|
@ -80,7 +81,13 @@ map(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->argp[1] == NULL) {
|
if (player->argp[1] == NULL) {
|
||||||
|
if (unit_type == EF_BAD) {
|
||||||
str = getstring("(sects)? ", buf);
|
str = getstring("(sects)? ", buf);
|
||||||
|
} else {
|
||||||
|
sprintf(prompt, "(sects, %s)? ", ef_nameof(unit_type));
|
||||||
|
str = getstring(prompt, buf);
|
||||||
|
}
|
||||||
|
|
||||||
if (!str || !*str)
|
if (!str || !*str)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue