Author: sveinung
Date: Wed Mar 11 12:52:24 2015
New Revision: 28488

URL: http://svn.gna.org/viewcvs/freeciv?rev=28488&view=rev
Log:
Generated help: Add back how many shields "Help Wonder" provides.

The information about how many shields "Help Wonder" adds was removed when
patch #5639 unhardcoded the HelpWonder unit type flag. Bring it back.

See patch #5924

Modified:
    trunk/client/helpdata.c
    trunk/data/alien/units.ruleset
    trunk/data/civ1/units.ruleset
    trunk/data/civ2/units.ruleset
    trunk/data/civ2civ3/units.ruleset
    trunk/data/classic/units.ruleset
    trunk/data/experimental/units.ruleset
    trunk/data/multiplayer/units.ruleset

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Wed Mar 11 12:52:24 2015
@@ -3942,13 +3942,40 @@
     action_enabler_list_iterate(action_enablers_for_action(act), enabler) {
       if (requirement_fulfilled_by_unit_type(utype,
                                              &(enabler->actor_reqs))) {
-        const char *target_kind
-            = _(action_target_kind_name(action_get_target_kind(act)));
-
-        cat_snprintf(buf, bufsz,
-                     _("* Can do the action \'%s\' to some %s.\n"),
-                     action_get_ui_name(act),
-                     target_kind);
+        switch (act) {
+        case ACTION_HELP_WONDER:
+          cat_snprintf(buf, bufsz,
+                       /* TRANS: the first %s is the ruleset defined ui
+                        * name of the "Help Wonder" action, the next %s is
+                        * the name of its target kind ("individual cities")
+                        * and the %d is the number of shields the unit can
+                        * contribute. */
+                       _("* Can do the action \'%s\' to some %s"
+                         " (adds %d production).\n"),
+                       /* The action may have a ruleset defined ui name. */
+                       action_get_ui_name(act),
+                       /* Keep the style consistent with the help for the
+                        * other actions. */
+                       _(action_target_kind_name(
+                           action_get_target_kind(act))),
+                       /* The custom information. */
+                       utype_build_shield_cost(utype));
+          break;
+        default:
+          /* Generic action information. */
+          cat_snprintf(buf, bufsz,
+                       /* TRANS: the first %s is the action's ruleset
+                        * defined ui name and the next %s is the name of
+                        * its target kind. */
+                       _("* Can do the action \'%s\' to some %s.\n"),
+                       action_get_ui_name(act),
+                       _(action_target_kind_name(
+                           action_get_target_kind(act))));
+          break;
+        }
+
+        /* The unit's ability to perform this action was just documented.
+         * Move on to check if the unit can perform the next action too. */
         break;
       }
     } action_enabler_list_iterate_end;

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/alien/units.ruleset      (original)
+++ trunk/data/alien/units.ruleset      Wed Mar 11 12:52:24 2015
@@ -13,7 +13,7 @@
 flags =
   { "name", "helptxt"
     _("TradeRoute"), _("Can establish trade routes (must travel to target 
city).")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
     _("Capturer"),   _("Can capture some enemy units.")
     _("Capturable"), _("Can be captured by some enemy units.")
   }

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/civ1/units.ruleset       (original)
+++ trunk/data/civ1/units.ruleset       Wed Mar 11 12:52:24 2015
@@ -22,7 +22,7 @@
 flags =
   { "name", "helptxt"
     _("TradeRoute"), _("Can establish trade routes (must travel to target 
city).")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
   }
 
 [veteran_system]

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/civ2/units.ruleset       (original)
+++ trunk/data/civ2/units.ruleset       Wed Mar 11 12:52:24 2015
@@ -27,7 +27,7 @@
     _("Horse"), _("Attack value halved when attacking Pikemen.")
     _("Helicopter"), _("Defends very badly against Fighters.")
     _("TradeRoute"), _("Can establish trade routes (must travel to target 
city).")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
   }
 
 [veteran_system]

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Wed Mar 11 12:52:24 2015
@@ -31,7 +31,7 @@
     _("AirAttacker"), _("Very bad at attacking AEGIS.")
     _("Submarine"), _("Attack value halved when attacking Destroyer.")
     _("TradeRoute"), _("Can establish trade routes (must travel to target 
city).")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
     _("Capturer"),   _("Can capture some enemy units.")
     _("Capturable"), _("Can be captured by some enemy units.")
   }

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/classic/units.ruleset    (original)
+++ trunk/data/classic/units.ruleset    Wed Mar 11 12:52:24 2015
@@ -32,7 +32,7 @@
     _("Horse"), _("Attack value halved when attacking Pikemen.")
     _("Helicopter"), _("Defends very badly against Fighters.")
     _("TradeRoute"), _("Can establish trade routes (must travel to target 
city).")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
   }
 
 [veteran_system]

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/experimental/units.ruleset       (original)
+++ trunk/data/experimental/units.ruleset       Wed Mar 11 12:52:24 2015
@@ -35,7 +35,7 @@
     _("Horse"), _("Attack value halved when attacking Pikemen.")
     _("Helicopter"), _("Defends very badly against Fighters.")
     _("TradeRoute"), _("Can establish trade routes (must travel to target 
city).")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
   }
 
 [veteran_system]

Modified: trunk/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=28488&r1=28487&r2=28488&view=diff
==============================================================================
--- trunk/data/multiplayer/units.ruleset        (original)
+++ trunk/data/multiplayer/units.ruleset        Wed Mar 11 12:52:24 2015
@@ -31,7 +31,7 @@
     _("AirAttacker"), _("Very bad at attacking AEGIS.")
     _("Horse"), _("Attack value halved when attacking Pikemen.")
     _("Helicopter"), _("Defends very badly against Fighters.")
-    _("HelpWonder"), _("Can help build wonders (adding its full shield cost).")
+    _("HelpWonder")
   }
 
 [veteran_system]


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

Reply via email to