]> git.pond.sub.org Git - empserver/commitdiff
(START_UNITS, start_unit_type, deity_build_land, new): Remove
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 23 Oct 2005 20:52:46 +0000 (20:52 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 23 Oct 2005 20:52:46 +0000 (20:52 +0000)
undocumented compile-time option START_UNITS.  It hasn't been used in
ages; writing a quick build script is easier than recompiling the
server.

include/options.h
include/optlist.h
src/lib/commands/new.c
src/lib/global/constants.c

index 38765514341c0a5113065c3420d0742bbd557a1b..374b8bb9f790fb0200a982aed914a519e056f55a 100644 (file)
@@ -59,9 +59,6 @@
                           2.  Changing name doesn't take any btus or $$
                           enables BLITZ updates, also turns on NOFOOD, below */
 
-/*#define START_UNITS  2 *//* How many free start units you get. Types are
-   specified in src/lib/global/constants.c */
-
 /* #define GO_RENEW *//* Gold and Oil are renewable resources */
 /* #define GUINEA_PIGS *//* Experimental stuff not ready for prime time */
 /* #define DEFENSE_INFRA *//* Allow the improvement of defensive infrastructure */
index cc608285da5d1f97daf00b272f36ce07f628f4b0..506d366b559e5567187778613cac53f565c071e1 100644 (file)
@@ -93,11 +93,6 @@ extern int opt_UPDATESCHED;
 #include "econfig-spec.h"
 #undef EMP_CONFIG_H_OUTPUT
 
-/* Game parameters that cannot be set in econfig (yet) */
-#ifdef START_UNITS
-int start_unit_type[];
-#endif
-
 /* Variables that get values derived from econfig */
 extern char *motdfil;
 extern char *downfil;
index e7ecb798128cdd059a23720c9c5bfbd49d328e28..2bf8290c4dbe015c552faad3915a8698b9c326e5 100644 (file)
@@ -47,9 +47,6 @@
 
 #include <fcntl.h>
 
-#ifdef START_UNITS
-static int deity_build_land(int, coord, coord, natid, int);
-#endif
 static int isok(int x, int y);
 static void ok(s_char *map, int x, int y);
 
@@ -208,10 +205,6 @@ new(void)
        natp->nat_b[i] = newrealms;
     natp->nat_tgms = 0;
     (void)close(open(mailbox(buf, num), O_RDWR | O_TRUNC | O_CREAT, 0660));
-#ifdef START_UNITS
-    for (n = 0; n < START_UNITS; n++)
-       deity_build_land(start_unit_type[n], x, y, num, 0);
-#endif /* START_UNITS */
     putnat(natp);
     return 0;
 }
@@ -287,78 +280,3 @@ ok(s_char *map, int x, int y)
     for (dir = DIR_FIRST; dir <= DIR_LAST; dir++)
        ok(map, diroff[dir][0] + x, diroff[dir][1] + y);
 }
-
-#ifdef START_UNITS
-static int
-deity_build_land(int type, coord x, coord y, natid own, int tlev)
-{
-    struct lndstr land;
-    struct lchrstr *lp;
-    struct nstr_item nstr;
-    struct natstr *natp;
-    int extend = 1;
-
-    natp = getnatp(own);
-
-    snxtitem_all(&nstr, EF_LAND);
-    while (nxtitem(&nstr, &land)) {
-       if (land.lnd_own == 0) {
-           extend = 0;
-           break;
-       }
-    }
-    if (extend)
-       ef_extend(EF_LAND, 50);
-    land.lnd_x = x;
-    land.lnd_y = y;
-    land.lnd_own = own;
-    land.lnd_mission = 0;
-    land.lnd_type = type;
-    land.lnd_effic = 100;
-    land.lnd_mobil = land_mob_max;
-    land.lnd_tech = tlev;
-    land.lnd_uid = nstr.cur;
-    land.lnd_army = ' ';
-    land.lnd_flags = 0;
-    land.lnd_ship = -1;
-    land.lnd_land = -1;
-    land.lnd_nland = 0;
-    land.lnd_harden = 0;
-    time(&land.lnd_access);
-
-    land.lnd_retreat = morale_base;
-
-    lp = &lchr[type];
-    land.lnd_fuel = lp->l_fuelc;
-    land.lnd_nxlight = 0;
-    land.lnd_rflags = 0;
-    memset(land.lnd_rpath, 0, sizeof(land.lnd_rpath));
-    land.lnd_rad_max = lp->l_rad;
-    memset(land.lnd_item, 0, sizeof(land.lnd_item));
-
-    land.lnd_att = (float)LND_ATTDEF(lp->l_att, tlev - lp->l_tech);
-    land.lnd_def = (float)LND_ATTDEF(lp->l_def, tlev - lp->l_tech);
-    land.lnd_vul = (int)LND_VUL(lp->l_vul, tlev - lp->l_tech);
-    land.lnd_spd = (int)LND_SPD(lp->l_spd, tlev - lp->l_tech);
-    land.lnd_vis = (int)LND_VIS(lp->l_vis, tlev - lp->l_tech);
-    land.lnd_spy = (int)LND_SPY(lp->l_spy, tlev - lp->l_tech);
-    land.lnd_rad = (int)LND_RAD(lp->l_rad, tlev - lp->l_tech);
-    land.lnd_frg = (int)LND_FRG(lp->l_frg, tlev - lp->l_tech);
-    land.lnd_acc = (int)LND_ACC(lp->l_acc, tlev - lp->l_tech);
-    land.lnd_dam = (int)LND_DAM(lp->l_dam, tlev - lp->l_tech);
-    land.lnd_ammo = (int)LND_AMM(lp->l_ammo, lp->l_dam, tlev - lp->l_tech);
-    land.lnd_aaf = (int)LND_AAF(lp->l_aaf, tlev - lp->l_tech);
-    land.lnd_fuelc = (int)LND_FC(lp->l_fuelc, tlev - lp->l_tech);
-    land.lnd_fuelu = (int)LND_FU(lp->l_fuelu, tlev - lp->l_tech);
-    land.lnd_maxlight = (int)LND_XPL(lp->l_nxlight, tlev - lp->l_tech);
-    land.lnd_maxland = (int)LND_MXL(lp->l_mxland, tlev - lp->l_tech);
-    land.lnd_item[I_FOOD] = lp->l_item[I_FOOD];
-
-    putland(land.lnd_uid, &land);
-    makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
-               land.lnd_y);
-    pr("%s", prland(&land));
-    pr(" built in sector %s\n", xyas(x, y, player->cnum));
-    return 1;
-}
-#endif /* START_UNITS */
index 5979a762644cf67eaa34a9291833d9fb07f0074c..fc9dd78d614051dcc66c3feb50db657eb6d0451a 100644 (file)
@@ -99,11 +99,6 @@ double people_damage = 1.00; /* Civs/mil/uw take this fraction of damage */
 double collateral_dam = 0.10;  /* Side effect damage to sector */
 double assault_penalty = 0.50; /* attack factor for para & assault troops */
 
-/* START_UNITS */
-#ifdef START_UNITS
-int start_unit_type[START_UNITS] = { 0, 1 };   /* type of unit */
-#endif /* START_UNITS */
-
 /* opt_FUEL */
 int fuel_mult = 10;            /* 1 fuel = 10 mob */