Author: cazfi
Date: Thu Apr  2 08:11:20 2015
New Revision: 28690

URL: http://svn.gna.org/viewcvs/freeciv?rev=28690&view=rev
Log:
Turned "ShowFlag" from bases flag to an extras flag any extra can have,
This also fixes problems in caching the extras with the flag in client side.

Problems with base flag reported by Jacob Nevins <jtn>

See bug #23312

Modified:
    trunk/client/tilespec.c
    trunk/common/base.h
    trunk/common/extras.h
    trunk/data/alien/terrain.ruleset
    trunk/data/civ1/terrain.ruleset
    trunk/data/civ2/terrain.ruleset
    trunk/data/civ2civ3/terrain.ruleset
    trunk/data/classic/terrain.ruleset
    trunk/data/experimental/terrain.ruleset
    trunk/data/multiplayer/terrain.ruleset
    trunk/data/stub/terrain.ruleset
    trunk/fc_version

Modified: trunk/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/client/tilespec.c     (original)
+++ trunk/client/tilespec.c     Thu Apr  2 08:11:20 2015
@@ -3031,7 +3031,6 @@
 {
   const int id = extra_index(pextra);
   enum extrastyle_id extrastyle;
-  struct base_type *pbase;
 
   if (!estyle_hash_lookup(t->estyle_hash, pextra->graphic_str,
                           &extrastyle)
@@ -3046,8 +3045,7 @@
 
   extra_type_list_append(t->style_lists[extrastyle], pextra);
 
-  pbase = extra_base_get(pextra);
-  if (pbase != NULL && base_has_flag(pbase, BF_SHOW_FLAG)) {
+  if (extra_has_flag(pextra, EF_SHOW_FLAG)) {
     extra_type_list_append(t->flagged_bases_list, pextra);
   }
 

Modified: trunk/common/base.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/base.h?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/common/base.h (original)
+++ trunk/common/base.h Thu Apr  2 08:11:20 2015
@@ -52,9 +52,6 @@
 /* Paratroopers can use base for paradrop */
 #define SPECENUM_VALUE3 BF_PARADROP_FROM
 #define SPECENUM_VALUE3NAME N_("ParadropFrom")
-/* Base will be built in cities automatically */
-#define SPECENUM_VALUE4 BF_SHOW_FLAG
-#define SPECENUM_VALUE4NAME N_("ShowFlag")
 #define SPECENUM_COUNT BF_COUNT
 #define SPECENUM_BITVECTOR bv_base_flags
 #include "specenum_gen.h"

Modified: trunk/common/extras.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/extras.h?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/common/extras.h       (original)
+++ trunk/common/extras.h       Thu Apr  2 08:11:20 2015
@@ -48,6 +48,9 @@
 /* Counts towards Nuclear Winter */
 #define SPECENUM_VALUE7 EF_NUCLEAR_WINTER
 #define SPECENUM_VALUE7NAME "NuclearWinter"
+/* Owner's flag will be shown on the tile */
+#define SPECENUM_VALUE8 EF_SHOW_FLAG
+#define SPECENUM_VALUE8NAME "ShowFlag"
 #define SPECENUM_COUNT EF_COUNT
 #define SPECENUM_BITVECTOR bv_extra_flags
 #include "specenum_gen.h"

Modified: trunk/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/alien/terrain.ruleset    (original)
+++ trunk/data/alien/terrain.ruleset    Thu Apr  2 08:11:20 2015
@@ -635,6 +635,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1023,7 +1024,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/civ1/terrain.ruleset     (original)
+++ trunk/data/civ1/terrain.ruleset     Thu Apr  2 08:11:20 2015
@@ -792,6 +792,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1002,7 +1003,6 @@
 ;   - "ClaimTerritory"    = Base will claim land ownership
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/civ2/terrain.ruleset     (original)
+++ trunk/data/civ2/terrain.ruleset     Thu Apr  2 08:11:20 2015
@@ -898,6 +898,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1163,7 +1164,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/civ2civ3/terrain.ruleset (original)
+++ trunk/data/civ2civ3/terrain.ruleset Thu Apr  2 08:11:20 2015
@@ -1087,6 +1087,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1396,6 +1397,7 @@
     }
 build_time     = 3
 removal_time   = 0
+flags          = "ShowFlag"
 helptext       = _("\
 Buoys may be built in the ocean (by units on a sea-going vessel).\
 ")
@@ -1583,7 +1585,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 
@@ -1615,7 +1616,6 @@
 extra          = "Buoy"
 gui_type       = "Fortress"
 vision_main_sq = 5
-flags          = "ShowFlag"
 
 [base_ruins]
 extra          = "Ruins"

Modified: trunk/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/classic/terrain.ruleset  (original)
+++ trunk/data/classic/terrain.ruleset  Thu Apr  2 08:11:20 2015
@@ -1077,6 +1077,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1298,6 +1299,7 @@
     }
 build_time     = 3
 removal_time   = 0
+flags          = "ShowFlag"
 helptext       = _("\
 Buoys may be built in the ocean (by units on a sea-going vessel).\
 ")
@@ -1432,7 +1434,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 
@@ -1451,7 +1452,6 @@
 extra          = "Buoy"
 gui_type       = "Fortress"
 vision_main_sq = 5
-flags          = "ShowFlag"
 
 [base_ruins]
 extra          = "Ruins"

Modified: trunk/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/experimental/terrain.ruleset     (original)
+++ trunk/data/experimental/terrain.ruleset     Thu Apr  2 08:11:20 2015
@@ -1053,6 +1053,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1274,6 +1275,7 @@
     }
 build_time     = 3
 removal_time   = 0
+flags          = "ShowFlag"
 helptext       = _("\
 Buoys may be built in the ocean (by units on a sea-going vessel).\
 ")
@@ -1451,7 +1453,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 
@@ -1470,7 +1471,6 @@
 extra          = "Buoy"
 gui_type       = "Fortress"
 vision_main_sq = 5
-flags          = "ShowFlag"
 
 [base_ruins]
 extra          = "Ruins"

Modified: trunk/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/multiplayer/terrain.ruleset      (original)
+++ trunk/data/multiplayer/terrain.ruleset      Thu Apr  2 08:11:20 2015
@@ -1051,6 +1051,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -1272,6 +1273,7 @@
     }
 build_time     = 3
 removal_time   = 0
+flags          = "ShowFlag"
 helptext       = _("\
 Buoys may be built in the ocean (by units on a sea-going vessel).\
 ")
@@ -1406,7 +1408,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 
@@ -1425,7 +1426,6 @@
 extra          = "Buoy"
 gui_type       = "Fortress"
 vision_main_sq = 5
-flags          = "ShowFlag"
 
 [base_ruins]
 extra          = "Ruins"

Modified: trunk/data/stub/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/terrain.ruleset?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/data/stub/terrain.ruleset     (original)
+++ trunk/data/stub/terrain.ruleset     Thu Apr  2 08:11:20 2015
@@ -348,6 +348,7 @@
 ;                           Global Warming
 ;   - "NuclearWinter"     = Instances of this extra on map count towards
 ;                           Nuclear Winter
+;   - "ShowFlag"          = Draw owner's flag
 ; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
@@ -424,7 +425,6 @@
 ;   - "NoStackDeath"      = Units inside do not die all at once when attacked
 ;   - "DiplomatDefense"   = Diplomats inside get bonus to diplomatic defense
 ;   - "ParadropFrom"      = Paradrop can be initiated from base
-;   - "ShowFlag"          = Draw owner's flag
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=28690&r1=28689&r2=28690&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Thu Apr  2 08:11:20 2015
@@ -54,7 +54,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Apr.01b"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Apr.02"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to