int nstat;
int simulation; /* e.g. budget command */
double dolcost;
- int broke;
time_t curup; /* when last input was received */
int aborted; /* interrupt cookie received? */
int eof; /* EOF (cookie or real) received? */
return pl->nstat;
pl->god = np->nat_stat == STAT_GOD;
pl->nstat = nstat[np->nat_stat];
- pl->broke = np->nat_money < 0;
- if (!pl->broke)
+ if (np->nat_money >= 0)
pl->nstat |= MONEY;
if (np->nat_stat >= STAT_ACTIVE && !influx(np))
pl->nstat |= CAP;
status(void)
{
struct natstr *natp;
- int minute;
+ int old_nstat, minute;
char buf[128];
if (player->state == PS_SHUTDOWN)
natp->nat_money -= roundavg(player->dolcost);
player->dolcost = 0.0;
- if (natp->nat_money < 0 && !player->broke) {
+ old_nstat = player->nstat;
+ player_set_nstat(player, natp);
+ if ((old_nstat & MONEY) && !(player->nstat & MONEY))
pr("You are now broke; industries are on strike.\n");
- } else if (player->broke && natp->nat_money >= 0) {
+ if (!(old_nstat & MONEY) && (player->nstat & MONEY))
pr("You are no longer broke!\n");
- }
- player_set_nstat(player, natp);
player->ncomstat = player->nstat;
if (player->god)
player->ncomstat |= CAP | MONEY;