(status): Simplify. No functional change.
This commit is contained in:
parent
3d11b5ecfd
commit
c96761ecee
1 changed files with 14 additions and 27 deletions
|
@ -166,34 +166,21 @@ status(void)
|
|||
putnat(natp);
|
||||
return 0;
|
||||
}
|
||||
if (player->dolcost != 0.0) {
|
||||
if (player->dolcost > 100.0)
|
||||
pr("That just cost you $%.2f\n", player->dolcost);
|
||||
else if (player->dolcost < -100.0)
|
||||
pr("You just made $%.2f\n", -player->dolcost);
|
||||
if (natp->nat_money < player->dolcost && !player->broke) {
|
||||
player->broke = 1;
|
||||
player->nstat &= ~MONEY;
|
||||
pr("You are now broke; industries are on strike.\n");
|
||||
} else if (player->broke && natp->nat_money - player->dolcost > 0) {
|
||||
player->broke = 0;
|
||||
player->nstat |= MONEY;
|
||||
pr("You are no longer broke!\n");
|
||||
}
|
||||
natp->nat_money -= roundavg(player->dolcost);
|
||||
player->dolcost = 0.0;
|
||||
} else {
|
||||
if (natp->nat_money < 0.0 && !player->broke) {
|
||||
player->broke = 1;
|
||||
player->nstat &= ~MONEY;
|
||||
pr("You are now broke; industries are on strike.\n");
|
||||
}
|
||||
if (player->broke && natp->nat_money > 0) {
|
||||
player->broke = 0;
|
||||
player->nstat |= MONEY;
|
||||
pr("You are no longer broke!\n");
|
||||
}
|
||||
if (player->dolcost > 100.0)
|
||||
pr("That just cost you $%.2f\n", player->dolcost);
|
||||
else if (player->dolcost < -100.0)
|
||||
pr("You just made $%.2f\n", -player->dolcost);
|
||||
if (natp->nat_money < player->dolcost && !player->broke) {
|
||||
player->broke = 1;
|
||||
player->nstat &= ~MONEY;
|
||||
pr("You are now broke; industries are on strike.\n");
|
||||
} else if (player->broke && natp->nat_money - player->dolcost > 0) {
|
||||
player->broke = 0;
|
||||
player->nstat |= MONEY;
|
||||
pr("You are no longer broke!\n");
|
||||
}
|
||||
natp->nat_money -= roundavg(player->dolcost);
|
||||
player->dolcost = 0.0;
|
||||
getsect(natp->nat_xcap, natp->nat_ycap, §);
|
||||
if (influx(natp))
|
||||
player->nstat &= ~CAP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue