]> git.pond.sub.org Git - empserver/commitdiff
Remove option LANDSPIES, customize table land-chr instead
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 22 May 2011 15:04:46 +0000 (17:04 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Jun 2011 14:53:02 +0000 (16:53 +0200)
Spy units are now enabled when a land unit type with capability spy
exists.  To disable them, deities have to customize table land-chr.

Before, spy units types were ignored when option LANDSPIES was
disabled.  Except for xdump land-chr, which happily dumped unusable
spy unit types.

include/econfig-spec.h
info/History.t
info/Options.t
info/Ship-types.t
info/version.t
src/lib/commands/buil.c
src/lib/commands/load.c
src/lib/global/options.c
src/lib/subs/show.c

index 0b0c8b157977419ec20472822597a10e75beb028..59e27c0104e537ce0eb131dbb0b8ccf856d7de86 100644 (file)
@@ -162,8 +162,6 @@ EMPCF_OPT("HIDDEN", opt_HIDDEN,
     "Hide information between players")
 EMPCF_OPT("INTERDICT_ATT", opt_INTERDICT_ATT,
     "Interdict post-attack move in")
     "Hide information between players")
 EMPCF_OPT("INTERDICT_ATT", opt_INTERDICT_ATT,
     "Interdict post-attack move in")
-EMPCF_OPT("LANDSPIES", opt_LANDSPIES,
-    "Enable the land unit type spies")
 EMPCF_OPT("LOANS", opt_LOANS,
     "Allow bailing out of other countries via S&L scandals")
 EMPCF_OPT("LOSE_CONTACT", opt_LOSE_CONTACT,
 EMPCF_OPT("LOANS", opt_LOANS,
     "Allow bailing out of other countries via S&L scandals")
 EMPCF_OPT("LOSE_CONTACT", opt_LOSE_CONTACT,
index fcf387e1e3755265dcc3cd0eead0b84d53aaeda4..ae504d83c95c2b6df63827828ec96f6ce03d3237 100644 (file)
@@ -239,7 +239,7 @@ NEW_STARVE, NEW_WORK, ORBIT and PLANENAMES are no longer configurable.
 Options NUKEFAILDETONATE, SLOW_WAR, SNEAK_ATTACK, FUEL, GRAB_THINGS
 and SHIP_DECAY are gone.  Options PINPOINTMISSILE, DEMANDUPDATE,
 UPDATESCHED, DRNUKE, TRADESHIPS, NONUKES, NEUTRON, BIG_CITY,
 Options NUKEFAILDETONATE, SLOW_WAR, SNEAK_ATTACK, FUEL, GRAB_THINGS
 and SHIP_DECAY are gone.  Options PINPOINTMISSILE, DEMANDUPDATE,
 UPDATESCHED, DRNUKE, TRADESHIPS, NONUKES, NEUTRON, BIG_CITY,
-DEFENSE_INFRA, NO_LCMS, NO_HCMS and NO_OIL
+DEFENSE_INFRA, LANDSPIES, NO_LCMS, NO_HCMS and NO_OIL
 got replaced by more flexible configuration.
 
 The xdump command lets client writers access more game more easily.
 got replaced by more flexible configuration.
 
 The xdump command lets client writers access more game more easily.
index b3a8eceaa066de41bb9ed02f994c6fc009bec6b2..1f1a1bfcbeb1adeb7ca49d03513dd25fc55ccd21 100644 (file)
@@ -36,7 +36,6 @@ GO_RENEW:       Gold and Oil are renewable resources.
 MOB_ACCESS:     Allows real-time updating of mobility.
 MARKET:         Time-delay market and trade.
 LOANS:          Allows S&L type interaction between countries.
 MOB_ACCESS:     Allows real-time updating of mobility.
 MARKET:         Time-delay market and trade.
 LOANS:          Allows S&L type interaction between countries.
-LANDSPIES:      Creates land unit style spies.
 NO_FORT_FIRE:   Forts cannot fire.
 RAILWAYS       Highways double as rail
 TECH_POP:       Technology costs more to make as your civilian population
 NO_FORT_FIRE:   Forts cannot fire.
 RAILWAYS       Highways double as rail
 TECH_POP:       Technology costs more to make as your civilian population
index 8cfa85b5dfdea38d6f32a126dc4f66682d503b43..6c67a58b1a709254d157c85e9c593529fd074ca9 100644 (file)
@@ -207,7 +207,7 @@ the number of guns the ship can fire at once
 .L lnd
 The number of land units the ship can carry.  No ship can carry 'heavy'
 units.  Only surface supply ships can carry units that are not 'light'.
 .L lnd
 The number of land units the ship can carry.  No ship can carry 'heavy'
 units.  Only surface supply ships can carry units that are not 'light'.
-If option LANDSPIES is enabled, submarines that can't normally carry
+Submarines that can't normally carry
 land units can carry up to two spies.
 .L pln
 The number of 'light' planes the ship can carry.
 land units can carry up to two spies.
 .L pln
 The number of 'light' planes the ship can carry.
index e76bd6c5c8134fcdee1d74d8d820b7816f81a5a0..8380175f2bd19231c3417b9587f36a43b7fb7f10 100644 (file)
@@ -76,7 +76,7 @@ You are disconnected after 15 minutes of idle time.
 
 Options enabled in this game:
        ALL_BLEED, BLITZ, EASY_BRIDGES, FALLOUT, GODNEWS, INTERDICT_ATT,
 
 Options enabled in this game:
        ALL_BLEED, BLITZ, EASY_BRIDGES, FALLOUT, GODNEWS, INTERDICT_ATT,
-       LANDSPIES, NOFOOD, NOMOBCOST, NO_PLAGUE, RAILWAYS, SAIL, TREATIES
+       NOFOOD, NOMOBCOST, NO_PLAGUE, RAILWAYS, SAIL, TREATIES
 
 Options disabled in this game:
        AUTO_POWER, BRIDGETOWERS, GO_RENEW, GUINEA_PIGS, HIDDEN, LOANS,
 
 Options disabled in this game:
        AUTO_POWER, BRIDGETOWERS, GO_RENEW, GUINEA_PIGS, HIDDEN, LOANS,
index 4c4c0299c06f8e9b80c0c07e40592e96e11d2ad9..01ac73ad7d1018b998ad86643ca8cf36f1683aa0 100644 (file)
@@ -134,11 +134,8 @@ buil(void)
        break;
     case 'l':
        type = ef_elt_byname(EF_LAND_CHR, p);
        break;
     case 'l':
        type = ef_elt_byname(EF_LAND_CHR, p);
-       if (type >= 0) {
+       if (type >= 0)
            rqtech = lchr[type].l_tech;
            rqtech = lchr[type].l_tech;
-           if ((lchr[type].l_flags & L_SPY) && !opt_LANDSPIES)
-               type = -1;
-       }
        break;
     case 'n':
        type = ef_elt_byname(EF_NUKE_CHR, p);
        break;
     case 'n':
        type = ef_elt_byname(EF_NUKE_CHR, p);
index 6b3886b52e2902d77b57a95c40c9c07fcf4f624b..dc0950f7fc12dcafd0f465c3f8359342e991c9b0 100644 (file)
@@ -518,16 +518,14 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
     int load_spy = 0;
 
     if (load_unload == LOAD) {
     int load_spy = 0;
 
     if (load_unload == LOAD) {
-       if (opt_LANDSPIES) {
-           if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
-               (mchr[(int)sp->shp_type].m_nland == 0)) {
-               if (shp_nland(sp) >= 2) {
-                   pr("Non-land unit carrying subs can only carry up to two spy units.\n");
-                   return 0;
-               }
-               /* Eh, let 'em load a spy only */
-               load_spy = 1;
+       if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
+           (mchr[(int)sp->shp_type].m_nland == 0)) {
+           if (shp_nland(sp) >= 2) {
+               pr("Non-land unit carrying subs can only carry up to two spy units.\n");
+               return 0;
            }
            }
+           /* Eh, let 'em load a spy only */
+           load_spy = 1;
        }
        if (!load_spy && shp_nland(sp) >= mchr[sp->shp_type].m_nland) {
            if (noisy) {
        }
        if (!load_spy && shp_nland(sp) >= mchr[sp->shp_type].m_nland) {
            if (noisy) {
@@ -612,16 +610,14 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
        /* Fit unit on ship */
        if (load_unload == LOAD) {
            /* We have to check again, since it may have changed */
        /* Fit unit on ship */
        if (load_unload == LOAD) {
            /* We have to check again, since it may have changed */
-           if (opt_LANDSPIES) {
-               if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
-                   (mchr[(int)sp->shp_type].m_nland == 0)) {
-                   if (shp_nland(sp) >= 2) {
-                       pr("Non-land unit carrying subs can only carry up to two spy units.\n");
-                       return 0;
-                   }
-                   /* Eh, let 'em load a spy only */
-                   load_spy = 1;
+           if ((mchr[(int)sp->shp_type].m_flags & M_SUB) &&
+               (mchr[(int)sp->shp_type].m_nland == 0)) {
+               if (shp_nland(sp) >= 2) {
+                   pr("Non-land unit carrying subs can only carry up to two spy units.\n");
+                   return 0;
                }
                }
+               /* Eh, let 'em load a spy only */
+               load_spy = 1;
            }
            if (!load_spy && shp_nland(sp) >= mchr[sp->shp_type].m_nland) {
                if (noisy) {
            }
            if (!load_spy && shp_nland(sp) >= mchr[sp->shp_type].m_nland) {
                if (noisy) {
index a9487ce91dabb08562ff684b37bfc8f03a8886ca..3968592c7c623b3065e3ce4229259402541e1927 100644 (file)
@@ -46,7 +46,6 @@ int opt_GO_RENEW = 0;
 int opt_GUINEA_PIGS = 0;
 int opt_HIDDEN = 0;
 int opt_INTERDICT_ATT = 1;
 int opt_GUINEA_PIGS = 0;
 int opt_HIDDEN = 0;
 int opt_INTERDICT_ATT = 1;
-int opt_LANDSPIES = 1;
 int opt_LOANS = 0;
 int opt_LOSE_CONTACT = 0;
 int opt_MARKET = 0;
 int opt_LOANS = 0;
 int opt_LOSE_CONTACT = 0;
 int opt_MARKET = 0;
index c8f7f791a8d7e10f55a43864f2ce4d04cf1365b1..3ff4972ef92fb26335425a92d6b7ee16b5daff91 100644 (file)
@@ -125,8 +125,6 @@ make_lchr_index(struct chr_index chridx[], int tlev)
            continue;
        if (lchr[i].l_tech > tlev)
            continue;
            continue;
        if (lchr[i].l_tech > tlev)
            continue;
-       if ((lchr[i].l_flags & L_SPY) && !opt_LANDSPIES)
-           continue;
        chridx[n].type = i;
        chridx[n].tech = lchr[i].l_tech;
        n++;
        chridx[n].type = i;
        chridx[n].tech = lchr[i].l_tech;
        n++;