(ROLLOVER_AVAIL, opt_ROLLOVER_AVAIL, Options, do_feed, prod, newe):
New option ROLLOVER_AVAIL; from Drake Diedrich.
This commit is contained in:
parent
1261d1c825
commit
d7a054c20a
7 changed files with 33 additions and 4 deletions
|
@ -100,6 +100,7 @@
|
||||||
#define ALL_BLEED /* Tech bleeds to everyone */
|
#define ALL_BLEED /* Tech bleeds to everyone */
|
||||||
/*#define DRNUKE*//* Need research to make nukes */
|
/*#define DRNUKE*//* Need research to make nukes */
|
||||||
#define NO_PLAGUE /* Plague is disabled */
|
#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_STARVE /* UW's starve, then civs, then mil */
|
||||||
#define NEW_WORK /* Work is changed in proportion to the # of civs mvd */
|
#define NEW_WORK /* Work is changed in proportion to the # of civs mvd */
|
||||||
/*#define RES_POP*//* population is limited by research */
|
/*#define RES_POP*//* population is limited by research */
|
||||||
|
|
|
@ -99,6 +99,7 @@ extern int opt_DEMANDUPDATE;
|
||||||
extern int opt_BIG_CITY;
|
extern int opt_BIG_CITY;
|
||||||
extern int opt_INTERDICT_ATT;
|
extern int opt_INTERDICT_ATT;
|
||||||
extern int opt_TECH_POP;
|
extern int opt_TECH_POP;
|
||||||
|
extern int opt_ROLLOVER_AVAIL;
|
||||||
|
|
||||||
struct keymatch; /* forward decl */
|
struct keymatch; /* forward decl */
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ SAIL: another wait to automatically move ships (may also be buggy)
|
||||||
NUKEFAIL(etc): nukes on missiles that explode in launching may detonate
|
NUKEFAIL(etc): nukes on missiles that explode in launching may detonate
|
||||||
SHIPNAMES: ships may be named
|
SHIPNAMES: ships may be named
|
||||||
DEMANDUPDATE: updates may be allowed on player demand
|
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:
|
The following options were introduced in the Chainsaw server:
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ BIG_CITY: 'c' sectors cost $, lcm, hcm to build and hold 10x civs
|
||||||
INTERDICT_ATT Interdict units & mil as they move in after an attack
|
INTERDICT_ATT Interdict units & mil as they move in after an attack
|
||||||
|
|
||||||
The following options were introduced in the Empire4 Server:
|
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
|
BRIDGETOWERS: You can build bridge towers, which allow you to build
|
||||||
bridges from them.
|
bridges from them.
|
||||||
DEFENSE_INFRA: Use the new defensive infrastructure. Otherwise, use
|
DEFENSE_INFRA: Use the new defensive infrastructure. Otherwise, use
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
|
#include "optlist.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
newe(void)
|
newe(void)
|
||||||
|
@ -83,11 +84,17 @@ newe(void)
|
||||||
uws = min(uws, maxpop);
|
uws = min(uws, maxpop);
|
||||||
/* This isn't quite right, since research might rise/fall */
|
/* This isn't quite right, since research might rise/fall */
|
||||||
/* during the update, but it's the best we can really do */
|
/* during the update, but it's the best we can really do */
|
||||||
wforce = (int)
|
wforce = (int)((civs * sect.sct_work) / 100.0
|
||||||
((civs * sect.sct_work) / 100.0
|
+ uws + items[I_MILIT] * 2 / 5.0);
|
||||||
+ uws + items[I_MILIT] * 2 / 5.0);
|
|
||||||
|
|
||||||
work = etu_per_update * wforce / 100.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;
|
bwork = work / 2;
|
||||||
|
|
||||||
type = sect.sct_type;
|
type = sect.sct_type;
|
||||||
|
|
|
@ -142,6 +142,12 @@ prod(void)
|
||||||
/ 100.0 + (double)uws +
|
/ 100.0 + (double)uws +
|
||||||
(double)items[I_MILIT] * 2.0 / 5.0);
|
(double)items[I_MILIT] * 2.0 / 5.0);
|
||||||
work = (double)etu_per_update *(double)wforce / 100.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);
|
bwork = (int)((double)work / 2.0);
|
||||||
|
|
||||||
if (sect.sct_off)
|
if (sect.sct_off)
|
||||||
|
|
|
@ -327,6 +327,12 @@ int opt_TECH_POP = 1;
|
||||||
int opt_TECH_POP = 0;
|
int opt_TECH_POP = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ROLLOVER_AVAIL
|
||||||
|
int opt_ROLLOVER_AVAIL = 1;
|
||||||
|
#else
|
||||||
|
int opt_ROLLOVER_AVAIL = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct option_list Options[] = {
|
struct option_list Options[] = {
|
||||||
{"ALL_BLEED", &opt_ALL_BLEED},
|
{"ALL_BLEED", &opt_ALL_BLEED},
|
||||||
{"BIG_CITY", &opt_BIG_CITY},
|
{"BIG_CITY", &opt_BIG_CITY},
|
||||||
|
@ -365,6 +371,7 @@ struct option_list Options[] = {
|
||||||
{"PINPOINTMISSILE", &opt_PINPOINTMISSILE},
|
{"PINPOINTMISSILE", &opt_PINPOINTMISSILE},
|
||||||
{"PLANENAMES", &opt_PLANENAMES},
|
{"PLANENAMES", &opt_PLANENAMES},
|
||||||
{"RES_POP", &opt_RES_POP},
|
{"RES_POP", &opt_RES_POP},
|
||||||
|
{"ROLLOVER_AVAIL", &opt_ROLLOVER_AVAIL},
|
||||||
{"SAIL", &opt_SAIL},
|
{"SAIL", &opt_SAIL},
|
||||||
{"SHIP_DECAY", &opt_SHIP_DECAY},
|
{"SHIP_DECAY", &opt_SHIP_DECAY},
|
||||||
{"SHIPNAMES", &opt_SHIPNAMES},
|
{"SHIPNAMES", &opt_SHIPNAMES},
|
||||||
|
|
|
@ -82,6 +82,11 @@ do_feed(register struct sctstr *sp, register struct natstr *np, int *vec,
|
||||||
uws = (vec[I_UW] > maxpop) ? maxpop : vec[I_UW];
|
uws = (vec[I_UW] > maxpop) ? maxpop : vec[I_UW];
|
||||||
mil = (vec[I_MILIT] > maxpop) ? maxpop : vec[I_MILIT];
|
mil = (vec[I_MILIT] > maxpop) ? maxpop : vec[I_MILIT];
|
||||||
work_avail = total_work(sctwork, etu, civvies, mil, uws);
|
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];
|
people = vec[I_CIVIL] + vec[I_MILIT] + vec[I_UW];
|
||||||
if (sp->sct_type != SCT_SANCT) {
|
if (sp->sct_type != SCT_SANCT) {
|
||||||
|
@ -140,6 +145,7 @@ do_feed(register struct sctstr *sp, register struct natstr *np, int *vec,
|
||||||
pt_bg_nmbr(bp, sp, I_CIVIL, vec[I_CIVIL]);
|
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_UW, vec[I_UW]);
|
||||||
pt_bg_nmbr(bp, sp, I_MILIT, vec[I_MILIT]);
|
pt_bg_nmbr(bp, sp, I_MILIT, vec[I_MILIT]);
|
||||||
|
if (work_avail > 999) work_avail = 999;
|
||||||
*workp = work_avail;
|
*workp = work_avail;
|
||||||
return sctwork;
|
return sctwork;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue