(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

@ -82,14 +82,7 @@ newe(void)
wforce = (int)((civs * sect.sct_work) / 100.0
+ uws + sect.sct_item[I_MILIT] * 2 / 5.0);
work = etu_per_update * 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;
type = sect.sct_type;