Author: cazfi
Date: Fri Dec 25 18:28:59 2015
New Revision: 31199

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

Reported by Jacob Nevins <jtn>

See bug #24012

Modified:
    branches/S2_6/common/movement.c
    branches/S2_6/common/road.h
    branches/S2_6/data/alien/terrain.ruleset
    branches/S2_6/data/civ1/terrain.ruleset
    branches/S2_6/data/civ2/terrain.ruleset
    branches/S2_6/data/civ2civ3/terrain.ruleset
    branches/S2_6/data/classic/terrain.ruleset
    branches/S2_6/data/experimental/terrain.ruleset
    branches/S2_6/data/multiplayer/terrain.ruleset
    branches/S2_6/data/sandbox/terrain.ruleset
    branches/S2_6/data/stub/terrain.ruleset
    branches/S2_6/fc_version

Modified: branches/S2_6/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/movement.c?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/common/movement.c     (original)
+++ branches/S2_6/common/movement.c     Fri Dec 25 18:28:59 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: branches/S2_6/common/road.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/road.h?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/common/road.h (original)
+++ branches/S2_6/common/road.h Fri Dec 25 18:28:59 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: branches/S2_6/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/alien/terrain.ruleset    (original)
+++ branches/S2_6/data/alien/terrain.ruleset    Fri Dec 25 18:28:59 2015
@@ -1103,6 +1103,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: branches/S2_6/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/civ1/terrain.ruleset     (original)
+++ branches/S2_6/data/civ1/terrain.ruleset     Fri Dec 25 18:28:59 2015
@@ -1086,6 +1086,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: branches/S2_6/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/civ2/terrain.ruleset     (original)
+++ branches/S2_6/data/civ2/terrain.ruleset     Fri Dec 25 18:28:59 2015
@@ -1236,6 +1236,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: branches/S2_6/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2civ3/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/civ2civ3/terrain.ruleset (original)
+++ branches/S2_6/data/civ2civ3/terrain.ruleset Fri Dec 25 18:28:59 2015
@@ -1687,6 +1687,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: branches/S2_6/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/classic/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/classic/terrain.ruleset  (original)
+++ branches/S2_6/data/classic/terrain.ruleset  Fri Dec 25 18:28:59 2015
@@ -1515,6 +1515,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: branches/S2_6/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/experimental/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/experimental/terrain.ruleset     (original)
+++ branches/S2_6/data/experimental/terrain.ruleset     Fri Dec 25 18:28:59 2015
@@ -1534,6 +1534,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: branches/S2_6/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/multiplayer/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/multiplayer/terrain.ruleset      (original)
+++ branches/S2_6/data/multiplayer/terrain.ruleset      Fri Dec 25 18:28:59 2015
@@ -1489,6 +1489,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: branches/S2_6/data/sandbox/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/sandbox/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/sandbox/terrain.ruleset  (original)
+++ branches/S2_6/data/sandbox/terrain.ruleset  Fri Dec 25 18:28:59 2015
@@ -1687,6 +1687,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: branches/S2_6/data/stub/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/stub/terrain.ruleset?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/data/stub/terrain.ruleset     (original)
+++ branches/S2_6/data/stub/terrain.ruleset     Fri Dec 25 18:28:59 2015
@@ -493,6 +493,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: branches/S2_6/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/fc_version?rev=31199&r1=31198&r2=31199&view=diff
==============================================================================
--- branches/S2_6/fc_version    (original)
+++ branches/S2_6/fc_version    Fri Dec 25 18:28:59 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-2.6-2015.Dec.24"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-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