Consistently consider a nation bankrupt when its treasury is

negative.  Some places considered $0 as bankrupt, some didn't.  Fix
the ones that did:
(repo_list): report command misreported countries with $0 as broke.
(init_nats): If you had $0, logging out and back in bankrupted you.
(produce_sect, upd_ship): Failed to build sectors and produce stuff
for countries with $0.
This commit is contained in:
Markus Armbruster 2007-12-08 14:46:40 +00:00
parent a71ec1459d
commit 09a842c1a0
4 changed files with 6 additions and 6 deletions

View file

@ -156,7 +156,7 @@ upd_ship(struct shpstr *sp, int etus,
sectp = getsectp(sp->shp_x, sp->shp_y);
/* produce oil */
if (np->nat_money > 0
if (np->nat_money >= 0
&& (mp->m_flags & M_OIL) && sectp->sct_type == SCT_WATER) {
product = &pchr[dchr[SCT_OIL].d_prd];
oil_gained = roundavg(total_work(100, etus,
@ -182,7 +182,7 @@ upd_ship(struct shpstr *sp, int etus,
sp->shp_item[I_OIL] += oil_gained;
}
/* produce fish */
if (np->nat_money > 0
if (np->nat_money >= 0
&& (mp->m_flags & M_FOOD) && sectp->sct_type == SCT_WATER) {
sp->shp_item[I_FOOD]
+= roundavg(total_work(100, etus,