Author: cazfi
Date: Fri Dec 25 18:28:46 2015
New Revision: 31198

URL: http://svn.gna.org/viewcvs/freeciv?rev=31198&view=rev
Log:
Added support for road flags "JumpFrom" and "JumpTo"

Reported by Jacob Nevins <jtn>

See bug #24012

Modified:
    trunk/common/movement.c
    trunk/common/road.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/sandbox/terrain.ruleset
    trunk/data/stub/terrain.ruleset
    trunk/fc_version

Modified: trunk/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/movement.c?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/common/movement.c     (original)
+++ trunk/common/movement.c     Fri Dec 25 18:28:46 2015
@@ -354,6 +354,18 @@
     }
 
     proad = extra_road_get(pextra);
+
+    if (road_has_flag(proad, RF_JUMP_TO)) {
+      extra_type_list_iterate(punitclass->cache.native_tile_extras, jextra) {
+        if (pextra != jextra
+            && is_extra_caused_by(jextra, EC_ROAD)
+            && tile_has_extra(src_tile, jextra)
+            && road_has_flag(jextra->data.road, RF_JUMP_FROM)) {
+          return TRUE;
+        }
+      } extra_type_list_iterate_end;
+    }
+
     extra_type_list_iterate(proad->integrators, iextra) {
       if (!tile_has_extra(src_tile, iextra)) {
         continue;

Modified: trunk/common/road.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/road.h?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/common/road.h (original)
+++ trunk/common/road.h Fri Dec 25 18:28:46 2015
@@ -29,6 +29,10 @@
 #define SPECENUM_VALUE2NAME N_("River")
 #define SPECENUM_VALUE3 RF_UNRESTRICTED_INFRA
 #define SPECENUM_VALUE3NAME N_("UnrestrictedInfra")
+#define SPECENUM_VALUE4 RF_JUMP_FROM
+#define SPECENUM_VALUE4NAME N_("JumpFrom")
+#define SPECENUM_VALUE5 RF_JUMP_TO
+#define SPECENUM_VALUE5NAME N_("JumpTo")
 #define SPECENUM_COUNT RF_COUNT
 #define SPECENUM_BITVECTOR bv_road_flags
 #include "specenum_gen.h"

Modified: trunk/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/alien/terrain.ruleset    (original)
+++ trunk/data/alien/terrain.ruleset    Fri Dec 25 18:28:46 2015
@@ -1206,6 +1206,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/civ1/terrain.ruleset     (original)
+++ trunk/data/civ1/terrain.ruleset     Fri Dec 25 18:28:46 2015
@@ -1218,6 +1218,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/civ2/terrain.ruleset     (original)
+++ trunk/data/civ2/terrain.ruleset     Fri Dec 25 18:28:46 2015
@@ -1499,6 +1499,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/civ2civ3/terrain.ruleset (original)
+++ trunk/data/civ2civ3/terrain.ruleset Fri Dec 25 18:28:46 2015
@@ -1938,6 +1938,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/classic/terrain.ruleset  (original)
+++ trunk/data/classic/terrain.ruleset  Fri Dec 25 18:28:46 2015
@@ -1766,6 +1766,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/experimental/terrain.ruleset     (original)
+++ trunk/data/experimental/terrain.ruleset     Fri Dec 25 18:28:46 2015
@@ -1785,6 +1785,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/multiplayer/terrain.ruleset      (original)
+++ trunk/data/multiplayer/terrain.ruleset      Fri Dec 25 18:28:46 2015
@@ -1740,6 +1740,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/sandbox/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/sandbox/terrain.ruleset  (original)
+++ trunk/data/sandbox/terrain.ruleset  Fri Dec 25 18:28:46 2015
@@ -1938,6 +1938,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/data/stub/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/terrain.ruleset?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/data/stub/terrain.ruleset     (original)
+++ trunk/data/stub/terrain.ruleset     Fri Dec 25 18:28:46 2015
@@ -516,6 +516,10 @@
 ;                           flowing from land tiles to ocean
 ;   - "UnrestrictedInfra" = Use of the enemy owned road is not restricted
 ;                           even if server setting 'restrictinfra' is set
+;   - "JumpFrom"          = Move to a tile nativity providing "JumpTo"
+;                           road is considered native
+;   - "JumpTo"            = Move from a tile nativity providing "JumpFrom"
+;                           road is considered native
 ;
 ; */ <-- avoid gettext warnings
 

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=31198&r1=31197&r2=31198&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Fri Dec 25 18:28:46 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.Dec.24"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Dec.25"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""


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

Reply via email to