Make pupgr() reject planes in orbit early
It's best to check and report conditions the player can't change before those he could.
This commit is contained in:
parent
c69c5ff6d2
commit
65e934a083
1 changed files with 4 additions and 4 deletions
|
@ -272,6 +272,10 @@ pupgr(void)
|
||||||
plane.pln_uid);
|
plane.pln_uid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (plane.pln_flags & PLN_LAUNCHED) {
|
||||||
|
pr("Plane %s is in orbit!\n", prplane(&plane));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
n++;
|
n++;
|
||||||
pp = &plchr[(int)plane.pln_type];
|
pp = &plchr[(int)plane.pln_type];
|
||||||
avail = (PLN_BLD_WORK(pp->pl_lcm, pp->pl_hcm) * UPGR_COST + 99) / 100;
|
avail = (PLN_BLD_WORK(pp->pl_lcm, pp->pl_hcm) * UPGR_COST + 99) / 100;
|
||||||
|
@ -296,10 +300,6 @@ pupgr(void)
|
||||||
prplane(&plane));
|
prplane(&plane));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (plane.pln_flags & PLN_LAUNCHED) {
|
|
||||||
pr("Plane %s is in orbit!\n", prplane(&plane));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
sect.sct_avail -= avail;
|
sect.sct_avail -= avail;
|
||||||
plane.pln_effic -= UPGR_EFF;
|
plane.pln_effic -= UPGR_EFF;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue