(influx): New.
extern void putreject(struct natstr *np, natid them, int how, int what);
extern void putcontact(struct natstr *np, natid them, int contact);
extern void agecontact(struct natstr *np);
+extern int influx(struct natstr *np);
/* nation flags */
#define NF_INFORM bit(0) /* Inform me of telegrams right away */
coun_list(struct natstr *natp)
{
char *status;
- struct sctstr sect;
natid cn = natp->nat_cnum;
pr("%3d ", cn);
else if (natp->nat_stat & STAT_NORM) {
status = "Active";
if (!opt_HIDDEN || player->god) {
- getsect(natp->nat_xcap, natp->nat_ycap, §);
- if (sect.sct_own != cn ||
- (sect.sct_type != SCT_CAPIT && sect.sct_type != SCT_MOUNT))
+ if (influx(natp))
status = "In flux";
else if (natp->nat_money < 0)
status = "Broke";
pr(" Bureaucratic Time Units: %d\n", natp->nat_btu);
if (natp->nat_stat & STAT_INUSE) {
getsect(natp->nat_xcap, natp->nat_ycap, §);
- if (!player->owner || (sect.sct_type != SCT_CAPIT &&
- sect.sct_type != SCT_MOUNT &&
- sect.sct_type != SCT_SANCT))
+ if (influx(natp))
pr("No capital. (was at %s)\n",
xyas(sect.sct_x, sect.sct_y, player->cnum));
else {
static void
repo_list(struct stats *stat, natid cn, struct natstr *natp)
{
- struct sctstr cap;
-
if (player->god) {
pr(" %-3d %-14.14s ", cn, natp->nat_cnam);
pr(" %7.2f %7.2f %7.2f %7.2f",
printdiff(stat->stat, stat->res, natp, NAT_RLEV);
printdiff(stat->stat, stat->edu, natp, NAT_ELEV);
printdiff(stat->stat, stat->hap, natp, NAT_HLEV);
- getsect(natp->nat_xcap, natp->nat_ycap, &cap);
if (opt_HIDDEN) {
pr("\n");
} else {
- if ((cap.sct_own != cn) ||
- (cap.sct_type != SCT_CAPIT && cap.sct_type != SCT_MOUNT) ||
- (natp->nat_flags & NF_SACKED))
+ if (influx(natp))
pr("In flux\n");
else if (natp->nat_money <= 0)
pr("Broke\n");
if (np->nat_contact[them] < contact)
np->nat_contact[them] = contact;
}
+
+int
+influx(struct natstr *np)
+{
+ struct sctstr sect;
+
+ getsect(np->nat_xcap, np->nat_ycap, §);
+ if (sect.sct_own != np->nat_cnum ||
+ (sect.sct_type != SCT_CAPIT && sect.sct_type != SCT_MOUNT &&\r
+ sect.sct_type != SCT_SANCT) ||
+ (np->nat_flags & NF_SACKED))
+ return 1;
+ else
+ return 0;
+}