New option ROLLOVER_AVAIL; from Drake Diedrich.
#define ALL_BLEED /* Tech bleeds to everyone */
/*#define DRNUKE*//* Need research to make nukes */
#define NO_PLAGUE /* Plague is disabled */
+/*#define ROLLOVER_AVAIL*/ /* Avail builds up across updates like mob */
#define NEW_STARVE /* UW's starve, then civs, then mil */
#define NEW_WORK /* Work is changed in proportion to the # of civs mvd */
/*#define RES_POP*//* population is limited by research */
extern int opt_BIG_CITY;
extern int opt_INTERDICT_ATT;
extern int opt_TECH_POP;
+extern int opt_ROLLOVER_AVAIL;
struct keymatch; /* forward decl */
NUKEFAIL(etc): nukes on missiles that explode in launching may detonate
SHIPNAMES: ships may be named
DEMANDUPDATE: updates may be allowed on player demand
-UPDATESC(etc): updates can be controlled by the 'hours' file. NITP
+UPDATESCHED: updates can be controlled by the 'hours' file. NITP
The following options were introduced in the Chainsaw server:
INTERDICT_ATT Interdict units & mil as they move in after an attack
The following options were introduced in the Empire4 Server:
+ROLLOVER_AVAIL: Unused production avail is rolled over across updates.
BRIDGETOWERS: You can build bridge towers, which allow you to build
bridges from them.
DEFENSE_INFRA: Use the new defensive infrastructure. Otherwise, use
#include "item.h"
#include "file.h"
#include "commands.h"
+#include "optlist.h"
int
newe(void)
uws = min(uws, maxpop);
/* This isn't quite right, since research might rise/fall */
/* during the update, but it's the best we can really do */
- wforce = (int)
- ((civs * sect.sct_work) / 100.0
- + uws + items[I_MILIT] * 2 / 5.0);
+ wforce = (int)((civs * sect.sct_work) / 100.0
+ + uws + items[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;
+ }
+
bwork = work / 2;
type = sect.sct_type;
/ 100.0 + (double)uws +
(double)items[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;
+ }
bwork = (int)((double)work / 2.0);
if (sect.sct_off)
int opt_TECH_POP = 0;
#endif
+#ifdef ROLLOVER_AVAIL
+int opt_ROLLOVER_AVAIL = 1;
+#else
+int opt_ROLLOVER_AVAIL = 0;
+#endif
+
struct option_list Options[] = {
{"ALL_BLEED", &opt_ALL_BLEED},
{"BIG_CITY", &opt_BIG_CITY},
{"PINPOINTMISSILE", &opt_PINPOINTMISSILE},
{"PLANENAMES", &opt_PLANENAMES},
{"RES_POP", &opt_RES_POP},
+ {"ROLLOVER_AVAIL", &opt_ROLLOVER_AVAIL},
{"SAIL", &opt_SAIL},
{"SHIP_DECAY", &opt_SHIP_DECAY},
{"SHIPNAMES", &opt_SHIPNAMES},
uws = (vec[I_UW] > maxpop) ? maxpop : vec[I_UW];
mil = (vec[I_MILIT] > maxpop) ? maxpop : vec[I_MILIT];
work_avail = total_work(sctwork, etu, civvies, mil, uws);
+ if (opt_ROLLOVER_AVAIL) {
+ if (sp->sct_type == sp->sct_newtype) {
+ work_avail += sp->sct_avail;
+ }
+ }
people = vec[I_CIVIL] + vec[I_MILIT] + vec[I_UW];
if (sp->sct_type != SCT_SANCT) {
pt_bg_nmbr(bp, sp, I_CIVIL, vec[I_CIVIL]);
pt_bg_nmbr(bp, sp, I_UW, vec[I_UW]);
pt_bg_nmbr(bp, sp, I_MILIT, vec[I_MILIT]);
+ if (work_avail > 999) work_avail = 999;
*workp = work_avail;
return sctwork;
}