.TH Command NATION
.NA nation "The state of your nation"
.LV Basic
-.SY "nation"
-The nation report command displays various data about your country.
+.SY "nation [as-COUNTRY]"
+The nation report command displays various data about a country.
+The as-COUNTRY defaults to yourself.
+Only a deity can request a nation report for another country.
.s1
The data displayed by the nation command is formatted as a single page
report and should be self explanatory.
float hap;
int mil;
int civ;
+ int cnum;
int poplimit, safepop, uwpop;
double pfac;
- if ((natp = getnatp(player->cnum)) == 0) {
- pr("Bad country number %d\n", player->cnum);
+ if (player->argp[1])
+ cnum = natarg(player->argp[1], "for which country? ");
+ else
+ cnum = player->cnum;
+
+ if ((natp = getnatp(cnum)) == 0) {
+ pr("Bad country number %d\n", cnum);
+ return RET_SYN;
+ }
+
+ 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("\n(#%i) %s Nation Report\t", player->cnum, cname(player->cnum));
+
+ pr("\n(#%i) %s Nation Report\t", cnum, cname(cnum));
prdate();
pr("Nation status is %s", natstate(natp));
pr(" Bureaucratic Time Units: %d\n", natp->nat_btu);
getsect(natp->nat_xcap, natp->nat_ycap, §);
if (influx(natp))
pr("No capital (was at %s).\n",
- xyas(sect.sct_x, sect.sct_y, player->cnum));
+ xyas(sect.sct_x, sect.sct_y, cnum));
else {
civ = sect.sct_item[I_CIVIL];
mil = sect.sct_item[I_MILIT];
sect.sct_effic,
(sect.sct_type ==
SCT_CAPIT ? "capital" : "mountain capital"),
- xyas(sect.sct_x, sect.sct_y, player->cnum), civ, splur(civ),
+ xyas(sect.sct_x, sect.sct_y, cnum), civ, splur(civ),
mil);
}
}
pr("Technology.........%6.2f Research........%6.2f\n",
(double)natp->nat_level[NAT_TLEV],
(double)natp->nat_level[NAT_RLEV]);
- pr("Technology factor :%6.2f%%", tfact(player->cnum, 100.));
+ pr("Technology factor :%6.2f%%", tfact(cnum, 100.));
if (opt_NO_PLAGUE)
pfac = 0.0;
move, C_MOD, NORM + CAP},
{"mquota <SHIPS> <value>", 2, mobq, C_MOD, NORM + CAP},
{"name <SHIPS> <NAME>", 0, name, C_MOD, NORM},
- {"nation", 0, nati, 0, VIS},
+ {"nation [as-COUNTRY]", 0, nati, 0, VIS},
{"navigate <SHIPS> <PATH|DESTINATION>", 1, navi, C_MOD, NORM + CAP},
{"ndump <SECTS>", 0, ndump, 0, NORM},
{"newcap <NAT> [<SECTOR>]", 0, new, C_MOD, GOD},