Author: sveinung
Date: Sat Dec 27 20:35:24 2014
New Revision: 27424

URL: http://svn.gna.org/viewcvs/freeciv?rev=27424&view=rev
Log:
ruledit: store loaded action UI names.

Even if ruledit can't change action UI names it self it may load a ruleset
where one or more action UI name(s) have been changed. Write action UI names
when storing a ruleset to prevent data loss when a ruleset like that is
edited.

See bug #23112

Modified:
    trunk/tools/ruledit/rulesave.c

Modified: trunk/tools/ruledit/rulesave.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/rulesave.c?rev=27424&r1=27423&r2=27424&view=diff
==============================================================================
--- trunk/tools/ruledit/rulesave.c      (original)
+++ trunk/tools/ruledit/rulesave.c      Sat Dec 27 20:35:24 2014
@@ -777,6 +777,49 @@
                     RS_DEFAULT_SLOW_INVASIONS,
                     "global_unit_options.slow_invasions", NULL);
 
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_POISON)->ui_name,
+                     "actions.ui_name_posion_city");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_SABOTAGE_UNIT)->ui_name,
+                     "actions.ui_name_sabotage_unit");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_BRIBE_UNIT)->ui_name,
+                     "actions.ui_name_bribe_unit");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_SABOTAGE_CITY)->ui_name,
+                     "actions.ui_name_sabotage_city");
+  secfile_insert_str(sfile,
+                     
action_by_number(ACTION_SPY_TARGETED_SABOTAGE_CITY)->ui_name,
+                     "actions.ui_name_targeted_sabotage_city");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_INCITE_CITY)->ui_name,
+                     "actions.ui_name_incite_city");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_ESTABLISH_EMBASSY)->ui_name,
+                     "actions.ui_name_establish_embassy");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_STEAL_TECH)->ui_name,
+                     "actions.ui_name_steal_tech");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_TARGETED_STEAL_TECH)->ui_name,
+                     "actions.ui_name_targeted_steal_tech");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_INVESTIGATE_CITY)->ui_name,
+                     "actions.ui_name_investigate_city");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_SPY_STEAL_GOLD)->ui_name,
+                     "actions.ui_name_steal_gold");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_TRADE_ROUTE)->ui_name,
+                     "actions.ui_name_establish_trade_route");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_MARKETPLACE)->ui_name,
+                     "actions.ui_name_enter_marketplace");
+  secfile_insert_str(sfile,
+                     action_by_number(ACTION_HELP_WONDER)->ui_name,
+                     "actions.ui_name_help_wonder");
+
   sect_idx = 0;
   action_enablers_iterate(pae) {
     char path[512];


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

Reply via email to