Author: cazfi
Date: Wed Apr 15 07:30:04 2015
New Revision: 28787

URL: http://svn.gna.org/viewcvs/freeciv?rev=28787&view=rev
Log:
Added tech flag "Claim_Ocean_Limited"

See patch #4629

Modified:
    trunk/common/tech.h
    trunk/data/alien/techs.ruleset
    trunk/data/civ2civ3/techs.ruleset
    trunk/data/classic/techs.ruleset
    trunk/data/experimental/techs.ruleset
    trunk/data/multiplayer/techs.ruleset
    trunk/data/stub/techs.ruleset
    trunk/fc_version
    trunk/server/maphand.c

Modified: trunk/common/tech.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/tech.h?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/common/tech.h (original)
+++ trunk/common/tech.h Wed Apr 15 07:30:04 2015
@@ -86,14 +86,18 @@
 /* Player can claim ocean tiles non-adjacent to border source */ 
 #define SPECENUM_VALUE3 TF_CLAIM_OCEAN
 #define SPECENUM_VALUE3NAME N_("Claim_Ocean")
-#define SPECENUM_VALUE4 TECH_USER_1
-#define SPECENUM_VALUE5 TECH_USER_2
-#define SPECENUM_VALUE6 TECH_USER_3
-#define SPECENUM_VALUE7 TECH_USER_4
-#define SPECENUM_VALUE8 TECH_USER_5
-#define SPECENUM_VALUE9 TECH_USER_6
-#define SPECENUM_VALUE10 TECH_USER_7
-#define SPECENUM_VALUE11 TECH_USER_LAST
+/* Player can claim ocean tiles non-adjacent to border source as long
+ * as source is ocean tile */
+#define SPECENUM_VALUE4 TF_CLAIM_OCEAN_LIMITED
+#define SPECENUM_VALUE4NAME N_("Claim_Ocean_Limited")
+#define SPECENUM_VALUE5 TECH_USER_1
+#define SPECENUM_VALUE6 TECH_USER_2
+#define SPECENUM_VALUE7 TECH_USER_3
+#define SPECENUM_VALUE8 TECH_USER_4
+#define SPECENUM_VALUE9 TECH_USER_5
+#define SPECENUM_VALUE10 TECH_USER_6
+#define SPECENUM_VALUE11 TECH_USER_7
+#define SPECENUM_VALUE12 TECH_USER_LAST
 /* Keep this last. */
 #define SPECENUM_COUNT TF_COUNT
 #define SPECENUM_BITVECTOR bv_tech_flags

Modified: trunk/data/alien/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/techs.ruleset?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/data/alien/techs.ruleset      (original)
+++ trunk/data/alien/techs.ruleset      Wed Apr 15 07:30:04 2015
@@ -65,8 +65,10 @@
 ; "Bridge"   = "Settler" unit types can build roads with "RequiresBridge" flag
 ;              over roads with "PreventsOtherRoads" flag (rivers)
 ; "Build_Airborne" = from now on can build air units (for use by AI)
-; "Claim_Ocean"    = Player claims ocean tiles even if they are not
-;                    adjacent to border source
+; "Claim_Ocean"         = Player claims ocean tiles even if they are not
+;                         adjacent to border source
+; "Claim_Ocean_Limited" = Oceanic border sources claim ocean tiles even if
+;                         they are not adjacent to border source
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ2civ3/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/techs.ruleset?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/data/civ2civ3/techs.ruleset   (original)
+++ trunk/data/civ2civ3/techs.ruleset   Wed Apr 15 07:30:04 2015
@@ -72,8 +72,10 @@
 ; "Bridge"   = "Settler" unit types can build roads with "RequiresBridge" flag
 ;              over roads with "PreventsOtherRoads" flag (rivers)
 ; "Build_Airborne" = from now on can build air units (for use by AI)
-; "Claim_Ocean"    = Player claims ocean tiles even if they are not
-;                    adjacent to border source
+; "Claim_Ocean"         = Player claims ocean tiles even if they are not
+;                         adjacent to border source
+; "Claim_Ocean_Limited" = Oceanic border sources claim ocean tiles even if
+;                         they are not adjacent to border source
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/classic/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/techs.ruleset?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/data/classic/techs.ruleset    (original)
+++ trunk/data/classic/techs.ruleset    Wed Apr 15 07:30:04 2015
@@ -72,8 +72,10 @@
 ; "Bridge"   = "Settler" unit types can build roads with "RequiresBridge" flag
 ;              over roads with "PreventsOtherRoads" flag (rivers)
 ; "Build_Airborne" = from now on can build air units (for use by AI)
-; "Claim_Ocean"    = Player claims ocean tiles even if they are not
-;                    adjacent to border source
+; "Claim_Ocean"         = Player claims ocean tiles even if they are not
+;                         adjacent to border source
+; "Claim_Ocean_Limited" = Oceanic border sources claim ocean tiles even if
+;                         they are not adjacent to border source
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/experimental/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/techs.ruleset?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/data/experimental/techs.ruleset       (original)
+++ trunk/data/experimental/techs.ruleset       Wed Apr 15 07:30:04 2015
@@ -74,8 +74,10 @@
 ; "Bridge"   = "Settler" unit types can build roads with "RequiresBridge" flag
 ;              over roads with "PreventsOtherRoads" flag (rivers)
 ; "Build_Airborne" = from now on can build air units (for use by AI)
-; "Claim_Ocean"    = Player claims ocean tiles even if they are not
-;                    adjacent to border source
+; "Claim_Ocean"         = Player claims ocean tiles even if they are not
+;                         adjacent to border source
+; "Claim_Ocean_Limited" = Oceanic border sources claim ocean tiles even if
+;                         they are not adjacent to border source
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/multiplayer/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/techs.ruleset?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/data/multiplayer/techs.ruleset        (original)
+++ trunk/data/multiplayer/techs.ruleset        Wed Apr 15 07:30:04 2015
@@ -72,8 +72,10 @@
 ; "Bridge"   = "Settler" unit types can build roads with "RequiresBridge" flag
 ;              over roads with "PreventsOtherRoads" flag (rivers)
 ; "Build_Airborne" = from now on can build air units (for use by AI)
-; "Claim_Ocean"    = Player claims ocean tiles even if they are not
-;                    adjacent to border source
+; "Claim_Ocean"         = Player claims ocean tiles even if they are not
+;                         adjacent to border source
+; "Claim_Ocean_Limited" = Oceanic border sources claim ocean tiles even if
+;                         they are not adjacent to border source
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/stub/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/techs.ruleset?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/data/stub/techs.ruleset       (original)
+++ trunk/data/stub/techs.ruleset       Wed Apr 15 07:30:04 2015
@@ -62,8 +62,10 @@
 ; "Bridge"   = "Settler" unit types can build roads with "RequiresBridge" flag
 ;              over roads with "PreventsOtherRoads" flag (rivers)
 ; "Build_Airborne" = from now on can build air units (for use by AI)
-; "Claim_Ocean"    = Player claims ocean tiles even if they are not
-;                    adjacent to border source
+; "Claim_Ocean"         = Player claims ocean tiles even if they are not
+;                         adjacent to border source
+; "Claim_Ocean_Limited" = Oceanic border sources claim ocean tiles even if
+;                         they are not adjacent to border source
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Wed Apr 15 07:30:04 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.10"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Apr.15"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/maphand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/maphand.c?rev=28787&r1=28786&r2=28787&view=diff
==============================================================================
--- trunk/server/maphand.c      (original)
+++ trunk/server/maphand.c      Wed Apr 15 07:30:04 2015
@@ -1803,6 +1803,7 @@
   b) it is adjacent to only one continent and not more than two ocean tiles
   c) It is one tile away from a border source
   d) Player knows tech with Claim_Ocean flag
+  e) Source itself is Oceanic tile and player knows tech with 
Claim_Ocean_Limited flag
   The source which claims the ocean has to be placed on the correct continent.
   in case a) The continent which surrounds the inland lake
   in case b) The only continent which is adjacent to the tile
@@ -1825,7 +1826,8 @@
     return TRUE;
   }
 
-  if (num_known_tech_with_flag(pplayer, TF_CLAIM_OCEAN) > 0) {
+  if (num_known_tech_with_flag(pplayer, TF_CLAIM_OCEAN) > 0
+      || (cont1 < 0 && num_known_tech_with_flag(pplayer, 
TF_CLAIM_OCEAN_LIMITED) > 0)) {
     return TRUE;
   }
 


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

Reply via email to