Author: sveinung
Date: Wed Mar 16 14:08:25 2016
New Revision: 32255

URL: http://svn.gna.org/viewcvs/freeciv?rev=32255&view=rev
Log:
Unhardcode the "needs a move to airlift" rule.

Add it back in all bundled rulesets.

See patch #7063

Modified:
    trunk/common/unit.c
    trunk/data/alien/game.ruleset
    trunk/data/civ1/game.ruleset
    trunk/data/civ2/game.ruleset
    trunk/data/civ2civ3/game.ruleset
    trunk/data/classic/game.ruleset
    trunk/data/experimental/game.ruleset
    trunk/data/multiplayer/game.ruleset
    trunk/data/sandbox/game.ruleset
    trunk/doc/README.actions
    trunk/fc_version
    trunk/server/rscompat.c

Modified: trunk/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/common/unit.c (original)
+++ trunk/common/unit.c Wed Mar 16 14:08:25 2016
@@ -71,7 +71,9 @@
   const struct player *punit_owner;
   enum unit_airlift_result ok_result = AR_OK;
 
-  if (0 == punit->moves_left) {
+  if (0 == punit->moves_left
+      && !utype_may_act_move_frags(unit_type_get(punit),
+                                   ACTION_AIRLIFT, 0)) {
     /* No moves left. */
     return AR_NO_MOVES;
   }

Modified: trunk/data/alien/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/alien/game.ruleset       (original)
+++ trunk/data/alien/game.ruleset       Wed Mar 16 14:08:25 2016
@@ -491,6 +491,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/civ1/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/civ1/game.ruleset        (original)
+++ trunk/data/civ1/game.ruleset        Wed Mar 16 14:08:25 2016
@@ -450,6 +450,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/civ2/game.ruleset        (original)
+++ trunk/data/civ2/game.ruleset        Wed Mar 16 14:08:25 2016
@@ -540,6 +540,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/civ2civ3/game.ruleset    (original)
+++ trunk/data/civ2civ3/game.ruleset    Wed Mar 16 14:08:25 2016
@@ -585,6 +585,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/classic/game.ruleset     (original)
+++ trunk/data/classic/game.ruleset     Wed Mar 16 14:08:25 2016
@@ -542,6 +542,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/experimental/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/experimental/game.ruleset        (original)
+++ trunk/data/experimental/game.ruleset        Wed Mar 16 14:08:25 2016
@@ -559,6 +559,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/multiplayer/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/multiplayer/game.ruleset (original)
+++ trunk/data/multiplayer/game.ruleset Wed Mar 16 14:08:25 2016
@@ -525,6 +525,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "Airliftable", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [borders]

Modified: trunk/data/sandbox/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/game.ruleset?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/data/sandbox/game.ruleset     (original)
+++ trunk/data/sandbox/game.ruleset     Wed Mar 16 14:08:25 2016
@@ -637,6 +637,7 @@
 actor_reqs    =
     { "type",          "name",        "range"
       "UnitClassFlag", "LightWeight", "Local"
+      "MinMoveFrags",  "1",           "Local"
     }
 
 [actionenabler_airlift_medium_unit]
@@ -646,6 +647,7 @@
       "UnitClassFlag", "MediumWeight",    "Local"
       "Tech",          "Advanced Flight", "Player"
       "Building",      "Airport",         "City"
+      "MinMoveFrags",  "1",               "Local"
     }
 target_reqs    =
     { "type",     "name",    "range"
@@ -658,7 +660,8 @@
     { "type",          "name",         "range"
       "UnitClassFlag", "HeavyWeight",  "Local"
       "Tech",          "Fusion Power", "Player"
-      "Building",      "Airport",       "City"
+      "Building",      "Airport",      "City"
+      "MinMoveFrags",  "1",            "Local"
     }
 target_reqs    =
     { "type",     "name",    "range"

Modified: trunk/doc/README.actions
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/doc/README.actions    (original)
+++ trunk/doc/README.actions    Wed Mar 16 14:08:25 2016
@@ -264,7 +264,6 @@
 
 "Airlift Unit" - Airlift actor unit to target city.
  * UI name can be set using ui_airlift_unit
- * the actor unit must have movement left
  * the actor unit isn't transporting another unit
  * the actor unit isn't inside the target city
  * the actor unit can exist in the target city (outside a transport)

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Wed Mar 16 14:08:25 2016
@@ -55,7 +55,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-2016.Mar.15b"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Mar.16"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/rscompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rscompat.c?rev=32255&r1=32254&r2=32255&view=diff
==============================================================================
--- trunk/server/rscompat.c     (original)
+++ trunk/server/rscompat.c     Wed Mar 16 14:08:25 2016
@@ -572,6 +572,11 @@
                               req_from_str("UnitClassFlag", "Local", FALSE,
                                            TRUE, TRUE, "Airliftable"));
 
+    /* The actor unit must have moves left. */
+    requirement_vector_append(&enabler->actor_reqs,
+                              req_from_str("MinMoveFrags", "Local", FALSE,
+                                           TRUE, TRUE, "1"));
+
     action_enabler_add(enabler);
 
     /* Update action enablers. */


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

Reply via email to