Author: cazfi
Date: Tue Apr 19 19:14:14 2016
New Revision: 32442

URL: http://svn.gna.org/viewcvs/freeciv?rev=32442&view=rev
Log:
Save documentation comment about 'policies' format to ruleset

See patch #7115

Modified:
    trunk/data/alien/governments.ruleset
    trunk/data/civ1/governments.ruleset
    trunk/data/civ2/governments.ruleset
    trunk/data/civ2civ3/governments.ruleset
    trunk/data/classic/governments.ruleset
    trunk/data/experimental/governments.ruleset
    trunk/data/multiplayer/governments.ruleset
    trunk/data/ruledit/comments.txt
    trunk/data/sandbox/governments.ruleset
    trunk/data/stub/governments.ruleset
    trunk/tools/ruledit/comments.c
    trunk/tools/ruledit/comments.h
    trunk/tools/ruledit/rulesave.c

Modified: trunk/data/alien/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/alien/governments.ruleset        (original)
+++ trunk/data/alien/governments.ruleset        Tue Apr 19 19:14:14 2016
@@ -186,11 +186,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/civ1/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/civ1/governments.ruleset (original)
+++ trunk/data/civ1/governments.ruleset Tue Apr 19 19:14:14 2016
@@ -202,11 +202,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/civ2/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/civ2/governments.ruleset (original)
+++ trunk/data/civ2/governments.ruleset Tue Apr 19 19:14:14 2016
@@ -229,11 +229,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/civ2civ3/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/civ2civ3/governments.ruleset     (original)
+++ trunk/data/civ2civ3/governments.ruleset     Tue Apr 19 19:14:14 2016
@@ -385,11 +385,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/classic/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/classic/governments.ruleset      (original)
+++ trunk/data/classic/governments.ruleset      Tue Apr 19 19:14:14 2016
@@ -196,11 +196,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/experimental/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/experimental/governments.ruleset (original)
+++ trunk/data/experimental/governments.ruleset Tue Apr 19 19:14:14 2016
@@ -200,11 +200,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/multiplayer/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/multiplayer/governments.ruleset  (original)
+++ trunk/data/multiplayer/governments.ruleset  Tue Apr 19 19:14:14 2016
@@ -224,11 +224,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/ruledit/comments.txt
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/ruledit/comments.txt?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/ruledit/comments.txt     (original)
+++ trunk/data/ruledit/comments.txt     Tue Apr 19 19:14:14 2016
@@ -166,3 +166,29 @@
 ;\n\
 ; */ <-- avoid gettext warnings\n\
 "
+
+policies = "\
+\n\
+; /* <-- avoid gettext warnings\n\
+;\n\
+; Multipliers (aka policies)\n\
+;\n\
+; name                    = translatable name as seen by user\n\
+; rule_name               = (optional) name for savegames, rulesets etc; if 
not\n\
+;                           present, 'name' is used. Since the name used in\n\
+;                           savegames must not change, use this when 
renaming\n\
+;                           a multiplier after a ruleset has been released.\n\
+; default                 = default value (as presented in UI)\n\
+; start                   = minimum value (as presented in UI)\n\
+; stop                    = maximum value (as presented in UI)\n\
+; step                    = minimum increase/decrease (as presented in UI)\n\
+; offset                  = offset/factor control how UI values are turned\n\
+; factor                  = into effect values for use in effects.ruleset.\n\
+;                           effect_value = (ui_value + offset) * 
(factor/100)\n\
+;                           Optional; by default offset=0, factor=100, so\n\
+;                           that UI values are used as-is.\n\
+; helptext                = optional help text string; should escape all raw\n\
+;                           newlines so that xgettext parsing works\n\
+;\n\
+; */ <-- avoid gettext warnings\n\
+"

Modified: trunk/data/sandbox/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/sandbox/governments.ruleset      (original)
+++ trunk/data/sandbox/governments.ruleset      Tue Apr 19 19:14:14 2016
@@ -388,11 +388,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/data/stub/governments.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/governments.ruleset?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/data/stub/governments.ruleset (original)
+++ trunk/data/stub/governments.ruleset Tue Apr 19 19:14:14 2016
@@ -90,11 +90,11 @@
 ; stop                    = maximum value (as presented in UI)
 ; step                    = minimum increase/decrease (as presented in UI)
 ; offset                  = offset/factor control how UI values are turned
-; factor                  =  into effect values for use in effects.ruleset.
-;                            effect_value = (ui_value + offset) * (factor/100)
-;                            Optional; by default offset=0, factor=100, so
-;                            that UI values are used as-is.
-; helptext                = optional help text string; should escape all raw 
+; factor                  = into effect values for use in effects.ruleset.
+;                           effect_value = (ui_value + offset) * (factor/100)
+;                           Optional; by default offset=0, factor=100, so
+;                           that UI values are used as-is.
+; helptext                = optional help text string; should escape all raw
 ;                           newlines so that xgettext parsing works
 ;
 ; */ <-- avoid gettext warnings

Modified: trunk/tools/ruledit/comments.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/comments.c?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/tools/ruledit/comments.c      (original)
+++ trunk/tools/ruledit/comments.c      Tue Apr 19 19:14:14 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
   char *buildings;
   char *techs;
   char *govs;
+  char *policies;
 } comments_storage;
 
 /**************************************************************************
@@ -52,6 +53,7 @@
   comments_storage.buildings = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.buildings"));
   comments_storage.techs = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.techs"));
   comments_storage.govs = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.governments"));
+  comments_storage.policies = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.policies"));
 
   secfile_check_unused(comment_file);
   secfile_destroy(comment_file);
@@ -112,3 +114,11 @@
 {
   comment_write(sfile, comments_storage.govs, "Governments");
 }
+
+/**************************************************************************
+  Write policies header.
+**************************************************************************/
+void comment_policies(struct section_file *sfile)
+{
+  comment_write(sfile, comments_storage.policies, "Policies");
+}

Modified: trunk/tools/ruledit/comments.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/comments.h?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/tools/ruledit/comments.h      (original)
+++ trunk/tools/ruledit/comments.h      Tue Apr 19 19:14:14 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
 void comment_buildings(struct section_file *sfile);
 void comment_techs(struct section_file *sfile);
 void comment_govs(struct section_file *sfile);
+void comment_policies(struct section_file *sfile);
 
 #ifdef __cplusplus
 }

Modified: trunk/tools/ruledit/rulesave.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruledit/rulesave.c?rev=32442&r1=32441&r2=32442&view=diff
==============================================================================
--- trunk/tools/ruledit/rulesave.c      (original)
+++ trunk/tools/ruledit/rulesave.c      Tue Apr 19 19:14:14 2016
@@ -1,4 +1,4 @@
-/**********************************************************************
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1306,6 +1306,8 @@
 
   } governments_iterate_end;
 
+  comment_policies(sfile);
+
   sect_idx = 0;
   multipliers_iterate(pmul) {
     char path[512];


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

Reply via email to