(new_work, do_feed, prod, newe): Factor out calculation of work into

new_work().

(ROLLOVER_AVAIL, opt_ROLLOVER_AVAIL, opt_ROLLOVER_AVAIL, Options,
rollover_avail_max, configkeys, vers, new_work): Replace option
ROLLOVER_AVAIL by configuration parameter rollover_avail_max.
This commit is contained in:
Markus Armbruster 2004-05-10 20:30:38 +00:00
parent b665d57de1
commit 7f4e59fb8d
9 changed files with 19 additions and 28 deletions

View file

@ -134,13 +134,7 @@ prod(void)
wforce = (int)(((double)civs * sect.sct_work) / 100.0
+ uws
+ sect.sct_item[I_MILIT] * 2.0 / 5.0);
work = (double)etu_per_update *(double)wforce / 100.0;
if (opt_ROLLOVER_AVAIL) {
if (sect.sct_type == sect.sct_newtype) {
work += sect.sct_avail;
}
if (work > 999) work = 999;
}
work = new_work(&sect, wforce * etu_per_update / 100);
bwork = work / 2;
if (sect.sct_off)