(opt_NO_LCMS, opt_NO_HCMS, opt_NO_OIL, Options,
buil, show_bridge, show_tower, nullify_objects): Remove NO_LCMS, NO_HCMS, and NO_OIL options, not used. Functionality can be emulated by modifiying the characteristics files.
This commit is contained in:
parent
0a63d324ca
commit
2f1b7cd2a3
6 changed files with 19 additions and 135 deletions
|
@ -41,9 +41,6 @@
|
|||
|
||||
#include "gamesdef.h"
|
||||
|
||||
/* #define NO_LCMS *//* No lcms needed */
|
||||
/* #define NO_HCMS *//* No hcms needed */
|
||||
|
||||
/* #define NO_FORT_FIRE *//* Forts cannot fire */
|
||||
|
||||
#define BRIDGETOWERS /* Bridge towers are enabled */
|
||||
|
@ -74,9 +71,6 @@
|
|||
/*#define LOSE_CONTACT*//* Allows contact to be lost after a few updates */
|
||||
|
||||
/* Chainsaw Mods */
|
||||
#ifndef NO_OIL /* Can't have fuel with no oil! */
|
||||
/*#define FUEL*//* Ships use fuel to move */
|
||||
#endif
|
||||
/*#define TRADESHIPS*//* Use Tradeships */
|
||||
/*#define SLOW_WAR*//* Declaring war takes time */
|
||||
#define PINPOINTMISSILE /**/
|
||||
|
|
|
@ -71,9 +71,6 @@ extern int opt_MOB_ACCESS;
|
|||
extern int opt_NOFOOD;
|
||||
extern int opt_NOMOBCOST;
|
||||
extern int opt_NO_FORT_FIRE;
|
||||
extern int opt_NO_HCMS;
|
||||
extern int opt_NO_LCMS;
|
||||
extern int opt_NO_OIL;
|
||||
extern int opt_NO_PLAGUE;
|
||||
extern int opt_PINPOINTMISSILE;
|
||||
extern int opt_RES_POP;
|
||||
|
|
|
@ -561,7 +561,6 @@ build_bridge(struct sctstr *sp, short *vec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!opt_NO_HCMS) {
|
||||
if (vec[I_HCM] < buil_bh) {
|
||||
pr("%s only has %d unit%s of hcm,\n",
|
||||
xyas(sp->sct_x, sp->sct_y, player->cnum),
|
||||
|
@ -569,15 +568,7 @@ build_bridge(struct sctstr *sp, short *vec)
|
|||
pr("(a bridge span requires %d)\n", buil_bh);
|
||||
return 0;
|
||||
}
|
||||
} else if (!opt_NO_LCMS) {
|
||||
if (vec[I_LCM] < buil_bh) {
|
||||
pr("%s only has %d unit%s of lcm,\n",
|
||||
xyas(sp->sct_x, sp->sct_y, player->cnum),
|
||||
vec[I_LCM], vec[I_LCM] > 1 ? "s" : "");
|
||||
pr("(a bridge span requires %d)\n", buil_bh);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cash < buil_bc) {
|
||||
pr("A span costs $%.2f to build; ", buil_bc);
|
||||
pr("you only have %d.\n", cash);
|
||||
|
@ -654,10 +645,7 @@ build_bridge(struct sctstr *sp, short *vec)
|
|||
putsect(§);
|
||||
pr("Bridge span built over %s\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||
if (!opt_NO_HCMS)
|
||||
vec[I_HCM] -= buil_bh;
|
||||
else if (!opt_NO_LCMS)
|
||||
vec[I_LCM] -= buil_bh;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -847,7 +835,6 @@ build_tower(struct sctstr *sp, short *vec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!opt_NO_HCMS) {
|
||||
if (vec[I_HCM] < buil_tower_bh) {
|
||||
pr("%s only has %d unit%s of hcm,\n",
|
||||
xyas(sp->sct_x, sp->sct_y, player->cnum),
|
||||
|
@ -855,15 +842,7 @@ build_tower(struct sctstr *sp, short *vec)
|
|||
pr("(a bridge tower requires %d)\n", buil_tower_bh);
|
||||
return 0;
|
||||
}
|
||||
} else if (!opt_NO_LCMS) {
|
||||
if (vec[I_LCM] < buil_tower_bh) {
|
||||
pr("%s only has %d unit%s of lcm,\n",
|
||||
xyas(sp->sct_x, sp->sct_y, player->cnum),
|
||||
vec[I_LCM], vec[I_LCM] > 1 ? "s" : "");
|
||||
pr("(a bridge tower requires %d)\n", buil_tower_bh);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cash < buil_tower_bc) {
|
||||
pr("A bridge tower costs $%.2f to build; ", buil_tower_bc);
|
||||
pr("you only have %d.\n", cash);
|
||||
|
@ -943,9 +922,6 @@ build_tower(struct sctstr *sp, short *vec)
|
|||
putsect(§);
|
||||
pr("Bridge tower built in %s\n",
|
||||
xyas(sect.sct_x, sect.sct_y, player->cnum));
|
||||
if (!opt_NO_HCMS)
|
||||
vec[I_HCM] -= buil_tower_bh;
|
||||
else if (!opt_NO_LCMS)
|
||||
vec[I_LCM] -= buil_tower_bh;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -81,24 +81,6 @@ int opt_DEFENSE_INFRA = 1;
|
|||
int opt_DEFENSE_INFRA = 0;
|
||||
#endif
|
||||
|
||||
#ifdef NO_HCMS
|
||||
int opt_NO_HCMS = 1;
|
||||
#else
|
||||
int opt_NO_HCMS = 0;
|
||||
#endif
|
||||
|
||||
#ifdef NO_LCMS
|
||||
int opt_NO_LCMS = 1;
|
||||
#else
|
||||
int opt_NO_LCMS = 0;
|
||||
#endif
|
||||
|
||||
#ifdef NO_OIL
|
||||
int opt_NO_OIL = 1;
|
||||
#else
|
||||
int opt_NO_OIL = 0;
|
||||
#endif
|
||||
|
||||
#ifdef LANDSPIES
|
||||
int opt_LANDSPIES = 1;
|
||||
#else
|
||||
|
@ -283,9 +265,6 @@ struct option_list Options[] = {
|
|||
{"MARKET", &opt_MARKET},
|
||||
{"MOB_ACCESS", &opt_MOB_ACCESS},
|
||||
{"NO_FORT_FIRE", &opt_NO_FORT_FIRE},
|
||||
{"NO_HCMS", &opt_NO_HCMS},
|
||||
{"NO_LCMS", &opt_NO_LCMS},
|
||||
{"NO_OIL", &opt_NO_OIL},
|
||||
{"NO_PLAGUE", &opt_NO_PLAGUE},
|
||||
{"NOFOOD", &opt_NOFOOD},
|
||||
{"NOMOBCOST", &opt_NOMOBCOST},
|
||||
|
|
|
@ -143,10 +143,7 @@ show_bridge(int tlev)
|
|||
if (tlev < buil_bt)
|
||||
return;
|
||||
pr("Bridges require %g tech,", buil_bt);
|
||||
if (!opt_NO_HCMS)
|
||||
pr(" %d hcm,", buil_bh);
|
||||
else if (!opt_NO_LCMS)
|
||||
pr(" %d lcm,", buil_bh);
|
||||
pr(" %d workers,\n", 0);
|
||||
pr("%d available workforce, and cost $%g\n",
|
||||
(SCT_BLD_WORK(0, buil_bh) * SCT_MINEFF + 99) / 100,
|
||||
|
@ -159,10 +156,7 @@ show_tower(int tlev)
|
|||
if (tlev < buil_tower_bt)
|
||||
return;
|
||||
pr("Bridge Towers require %g tech,", buil_tower_bt);
|
||||
if (!opt_NO_HCMS)
|
||||
pr(" %d hcm,", buil_tower_bh);
|
||||
else if (!opt_NO_LCMS)
|
||||
pr(" %d lcm,", buil_tower_bh);
|
||||
pr(" %d workers,\n", 0);
|
||||
pr("%d available workforce, and cost $%g\n",
|
||||
(SCT_BLD_WORK(0, buil_tower_bh) * SCT_MINEFF + 99) / 100,
|
||||
|
|
|
@ -486,70 +486,14 @@ shutdwn(int sig)
|
|||
static void
|
||||
nullify_objects(void)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
|
||||
if (opt_BIG_CITY)
|
||||
dchr[SCT_CAPIT] = bigcity_dchr;
|
||||
if (opt_NO_LCMS)
|
||||
dchr[SCT_LIGHT].d_cost = -1;
|
||||
if (opt_NO_HCMS)
|
||||
dchr[SCT_HEAVY].d_cost = -1;
|
||||
if (opt_NO_OIL) {
|
||||
dchr[SCT_OIL].d_cost = -1;
|
||||
dchr[SCT_REFINE].d_cost = -1;
|
||||
}
|
||||
for (i = 0; plchr[i].pl_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
plchr[i].pl_hcm = 0;
|
||||
if (opt_NO_LCMS)
|
||||
plchr[i].pl_lcm = 0;
|
||||
if (opt_NO_OIL)
|
||||
plchr[i].pl_fuel = 0;
|
||||
}
|
||||
for (i = 0; lchr[i].l_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
lchr[i].l_hcm = 0;
|
||||
if (opt_NO_LCMS)
|
||||
lchr[i].l_lcm = 0;
|
||||
/* Fix up the military values */
|
||||
lchr[i].l_mil = lchr[i].l_item[I_MILIT];
|
||||
}
|
||||
for (i = 0; mchr[i].m_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
mchr[i].m_hcm = 0;
|
||||
if (opt_NO_LCMS)
|
||||
mchr[i].m_lcm = 0;
|
||||
if (opt_NO_OIL)
|
||||
mchr[i].m_flags &= ~M_OIL;
|
||||
}
|
||||
for (i = 0; nchr[i].n_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
nchr[i].n_hcm = 0;
|
||||
if (opt_NO_LCMS)
|
||||
nchr[i].n_lcm = 0;
|
||||
}
|
||||
for (i = 0; i <= SCT_MAXDEF; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
dchr[i].d_hcms = 0;
|
||||
if (opt_NO_LCMS)
|
||||
dchr[i].d_lcms = 0;
|
||||
}
|
||||
for (i = 0; pchr[i].p_name; i++) {
|
||||
for (j = 0; j < MAXPRCON; j++) {
|
||||
if (opt_NO_HCMS && pchr[i].p_ctype[j] == I_HCM)
|
||||
pchr[i].p_camt[j] = 0;
|
||||
if (opt_NO_LCMS && pchr[i].p_ctype[j] == I_LCM)
|
||||
pchr[i].p_camt[j] = 0;
|
||||
if (opt_NO_OIL && pchr[i].p_ctype[j] == I_OIL)
|
||||
pchr[i].p_camt[j] = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; intrchr[i].in_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
intrchr[i].in_hcms = 0;
|
||||
if (opt_NO_LCMS)
|
||||
intrchr[i].in_lcms = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue