Author: sveinung
Date: Wed Mar 11 12:52:41 2015
New Revision: 28489

URL: http://svn.gna.org/viewcvs/freeciv?rev=28489&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:
    branches/S2_6/client/helpdata.c
    branches/S2_6/data/alien/units.ruleset
    branches/S2_6/data/civ1/units.ruleset
    branches/S2_6/data/civ2/units.ruleset
    branches/S2_6/data/civ2civ3/units.ruleset
    branches/S2_6/data/classic/units.ruleset
    branches/S2_6/data/experimental/units.ruleset
    branches/S2_6/data/multiplayer/units.ruleset

Modified: branches/S2_6/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/helpdata.c?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/client/helpdata.c     (original)
+++ branches/S2_6/client/helpdata.c     Wed Mar 11 12:52:41 2015
@@ -3948,13 +3948,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: branches/S2_6/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/alien/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/alien/units.ruleset      (original)
+++ branches/S2_6/data/alien/units.ruleset      Wed Mar 11 12:52:41 2015
@@ -12,7 +12,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: branches/S2_6/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/civ1/units.ruleset       (original)
+++ branches/S2_6/data/civ1/units.ruleset       Wed Mar 11 12:52:41 2015
@@ -21,7 +21,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: branches/S2_6/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/civ2/units.ruleset       (original)
+++ branches/S2_6/data/civ2/units.ruleset       Wed Mar 11 12:52:41 2015
@@ -26,7 +26,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: branches/S2_6/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2civ3/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/civ2civ3/units.ruleset   (original)
+++ branches/S2_6/data/civ2civ3/units.ruleset   Wed Mar 11 12:52:41 2015
@@ -30,7 +30,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")
   }
 
 [veteran_system]

Modified: branches/S2_6/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/classic/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/classic/units.ruleset    (original)
+++ branches/S2_6/data/classic/units.ruleset    Wed Mar 11 12:52:41 2015
@@ -31,7 +31,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: branches/S2_6/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/experimental/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/experimental/units.ruleset       (original)
+++ branches/S2_6/data/experimental/units.ruleset       Wed Mar 11 12:52:41 2015
@@ -34,7 +34,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: branches/S2_6/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/multiplayer/units.ruleset?rev=28489&r1=28488&r2=28489&view=diff
==============================================================================
--- branches/S2_6/data/multiplayer/units.ruleset        (original)
+++ branches/S2_6/data/multiplayer/units.ruleset        Wed Mar 11 12:52:41 2015
@@ -30,7 +30,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