(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;
|
||||
double pfac;
|
||||
|
||||
if (player->argp[1])
|
||||
cnum = natarg(player->argp[1], "for which country? ");
|
||||
else
|
||||
cnum = player->cnum;
|
||||
|
||||
if ((natp = getnatp(cnum)) == 0)
|
||||
return RET_SYN;
|
||||
if (player->argp[1]) {
|
||||
if (!(natp = natargp(player->argp[1], NULL)))
|
||||
return RET_SYN;
|
||||
} else
|
||||
natp = getnatp(player->cnum);
|
||||
|
||||
cnum = natp->nat_cnum;
|
||||
if (!player->god && cnum != player->cnum) {
|
||||
pr("Only deities can request a nation "
|
||||
"report for a different country than yourself.\n");
|
||||
return RET_SYN;
|
||||
pr("Only deities can request a nation report for another country.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
||||
pr("\n(#%i) %s Nation Report\t", cnum, cname(cnum));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue