(nati): Use natargp() rather than natarg(), to avoid pointless
complaints about lack of contact. (nati): Improve not-deity error message and change error code to RET_FAIL.
This commit is contained in:
parent
35941f97eb
commit
39ce96c63d
1 changed files with 8 additions and 10 deletions
|
@ -54,18 +54,16 @@ nati(void)
|
||||||
int poplimit, safepop, uwpop;
|
int poplimit, safepop, uwpop;
|
||||||
double pfac;
|
double pfac;
|
||||||
|
|
||||||
if (player->argp[1])
|
if (player->argp[1]) {
|
||||||
cnum = natarg(player->argp[1], "for which country? ");
|
if (!(natp = natargp(player->argp[1], NULL)))
|
||||||
else
|
|
||||||
cnum = player->cnum;
|
|
||||||
|
|
||||||
if ((natp = getnatp(cnum)) == 0)
|
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
} else
|
||||||
|
natp = getnatp(player->cnum);
|
||||||
|
|
||||||
|
cnum = natp->nat_cnum;
|
||||||
if (!player->god && cnum != player->cnum) {
|
if (!player->god && cnum != player->cnum) {
|
||||||
pr("Only deities can request a nation "
|
pr("Only deities can request a nation report for another country.\n");
|
||||||
"report for a different country than yourself.\n");
|
return RET_FAIL;
|
||||||
return RET_SYN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pr("\n(#%i) %s Nation Report\t", cnum, cname(cnum));
|
pr("\n(#%i) %s Nation Report\t", cnum, cname(cnum));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue