]> git.pond.sub.org Git - empserver/commitdiff
(opt_NO_LCMS, opt_NO_HCMS, opt_NO_OIL, Options,
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 13 Nov 2005 16:39:27 +0000 (16:39 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sun, 13 Nov 2005 16:39:27 +0000 (16:39 +0000)
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.

include/options.h
include/optlist.h
src/lib/commands/buil.c
src/lib/global/options.c
src/lib/subs/show.c
src/server/main.c

index ba632832432a558fc637b2cec7a6eab3e30ea3f9..d350d220fb5e28dd9e4374aea63e31cd96d5a94d 100644 (file)
@@ -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 /**/
index bad44ddc67078be138d0522c0c6a17925c42c19f..3b917f7de58f746e7f122509871a1ec40c5e6dee 100644 (file)
@@ -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;
index 6ba596429fb22da382fa9edc47065846fa77ee2f..c88db74cd15b97d6dc5810845c7d77e9ba141bc7 100644 (file)
@@ -561,23 +561,14 @@ 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),
-              vec[I_HCM], vec[I_HCM] > 1 ? "s" : "");
-           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 (vec[I_HCM] < buil_bh) {
+       pr("%s only has %d unit%s of hcm,\n",
+          xyas(sp->sct_x, sp->sct_y, player->cnum),
+          vec[I_HCM], vec[I_HCM] > 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(&sect);
     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;
+    vec[I_HCM] -= buil_bh;
     return 1;
 }
 
@@ -847,23 +835,14 @@ 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),
-              vec[I_HCM], vec[I_HCM] > 1 ? "s" : "");
-           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 (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),
+          vec[I_HCM], vec[I_HCM] > 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(&sect);
     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;
+    vec[I_HCM] -= buil_tower_bh;
     return 1;
 }
index c479dcf23ddc69e15d06e76b1fa9b800274c0835..4cf2939df751c67f2adc94501315606cd8d0756b 100644 (file)
@@ -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},
index 6bd4a29e3d454f6a4a31a26a8a96af0cfcf65aa1..d8ca82f7c218a4d35088b7995f7e344a04ac1ff6 100644 (file)
@@ -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 hcm,", 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 hcm,", 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,
index 0e03367840e8041461f940fe8117df88a07e4134..02bd3888328a4d9fba5227841f4b2990185b3ab1 100644 (file)
@@ -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)