Author: cazfi
Date: Tue Jun 28 08:59:47 2016
New Revision: 33077

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

See patch #7326

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

Modified: trunk/data/alien/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/alien/cities.ruleset     (original)
+++ trunk/data/alien/cities.ruleset     Tue Jun 28 08:59:47 2016
@@ -26,7 +26,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -41,8 +41,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/civ1/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/civ1/cities.ruleset      (original)
+++ trunk/data/civ1/cities.ruleset      Tue Jun 28 08:59:47 2016
@@ -22,7 +22,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -37,8 +37,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/civ2/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/civ2/cities.ruleset      (original)
+++ trunk/data/civ2/cities.ruleset      Tue Jun 28 08:59:47 2016
@@ -22,7 +22,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -37,8 +37,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/civ2civ3/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/civ2civ3/cities.ruleset  (original)
+++ trunk/data/civ2civ3/cities.ruleset  Tue Jun 28 08:59:47 2016
@@ -22,7 +22,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -37,8 +37,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/classic/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/classic/cities.ruleset   (original)
+++ trunk/data/classic/cities.ruleset   Tue Jun 28 08:59:47 2016
@@ -22,7 +22,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -37,8 +37,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/experimental/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/experimental/cities.ruleset      (original)
+++ trunk/data/experimental/cities.ruleset      Tue Jun 28 08:59:47 2016
@@ -24,7 +24,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -39,8 +39,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/multiplayer/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/multiplayer/cities.ruleset       (original)
+++ trunk/data/multiplayer/cities.ruleset       Tue Jun 28 08:59:47 2016
@@ -21,7 +21,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -36,8 +36,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/ruledit/comments.txt
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/ruledit/comments.txt?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/ruledit/comments.txt     (original)
+++ trunk/data/ruledit/comments.txt     Tue Jun 28 08:59:47 2016
@@ -866,3 +866,38 @@
 ;\n\
 ; */ <-- avoid gettext warnings\n\
 "
+
+specialists = "\
+\n\
+; /* <-- avoid gettext warnings\n\
+;\n\
+; A specialist is a city citizen who is not a tile worker.  Usually the\n\
+; player can control what specialist each citizen is, so long as the\n\
+; requirements for that specialist are met.\n\
+;\n\
+; Below are the entries for the specialists, one per specialist type.\n\
+; The tag name (in [specialist_*]) doesn't matter so long as it's unique.\n\
+; For each specialist the following fields may be set:\n\
+;\n\
+;\n\
+; name          = translatable (plural) 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 savegames\n\
+;                 must not change, this is used when renaming a specialist\n\
+;                 after a ruleset has been released. (The original 
specialist\n\
+;                 names in the default ruleset were not designed to be\n\
+;                 user-visible.)\n\
+; short_name    = one-character \"short name\" used (for instance) in 
cityrep;\n\
+;                 should be first character/abbrevation of \"name\"\n\
+; graphic_alt   = fallback graphic tag in case the specialist graphic isn't\n\
+;                 found. Example value: \"specialist.scientist_0\"\n\
+;                 The specialist graphic allow different images based on\n\
+;                 citizen number. The alt tag don't. To use another\n\
+;                 specialist's tag use specialist.<otherrulename>_<number>.\n\
+; reqs         = requirements to have the specialist pick (see\n\
+;                 effects.ruleset and README.effects for help on 
requirements)\n\
+; helptext      = optional help text string; should escape all raw newlines\n\
+;                 so that xgettext parsing works\n\
+;\n\
+; */ <-- avoid gettext warnings\n\
+"

Modified: trunk/data/sandbox/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/sandbox/cities.ruleset   (original)
+++ trunk/data/sandbox/cities.ruleset   Tue Jun 28 08:59:47 2016
@@ -22,7 +22,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -37,8 +37,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/data/stub/cities.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/cities.ruleset?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/data/stub/cities.ruleset      (original)
+++ trunk/data/stub/cities.ruleset      Tue Jun 28 08:59:47 2016
@@ -16,7 +16,7 @@
 ; The tag name (in [specialist_*]) doesn't matter so long as it's unique.
 ; For each specialist the following fields may be set:
 ;
-; 
+;
 ; name          = translatable (plural) name as seen by user
 ; rule_name     = (optional) name for savegames, rulesets etc; if not
 ;                 present, 'name' is used. Since the name used in savegames
@@ -31,8 +31,8 @@
 ;                 The specialist graphic allow different images based on
 ;                 citizen number. The alt tag don't. To use another
 ;                 specialist's tag use specialist.<otherrulename>_<number>.
-; reqs         = requirements to have the specialist pick (see
-;                effects.ruleset and README.effects for help on requirements)
+; reqs          = requirements to have the specialist pick (see
+;                 effects.ruleset and README.effects for help on requirements)
 ; helptext      = optional help text string; should escape all raw newlines
 ;                 so that xgettext parsing works
 ;

Modified: trunk/tools/ruleutil/comments.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruleutil/comments.c?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/tools/ruleutil/comments.c     (original)
+++ trunk/tools/ruleutil/comments.c     Tue Jun 28 08:59:47 2016
@@ -40,6 +40,7 @@
   char *achievements;
   char *goods;
   char *enablers;
+  char *specialists;
 } comments_storage;
 
 /**************************************************************************
@@ -79,6 +80,7 @@
                                                                
"typedoc.achievements"));
   comments_storage.goods = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.goods"));
   comments_storage.enablers = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.enablers"));
+  comments_storage.specialists = fc_strdup(secfile_lookup_str(comment_file, 
"typedoc.specialists"));
 
   secfile_check_unused(comment_file);
   secfile_destroy(comment_file);
@@ -243,3 +245,11 @@
 {
   comment_write(sfile, comments_storage.enablers, "Action Enablers");
 }
+
+/**************************************************************************
+  Write specialists header.
+**************************************************************************/
+void comment_specialists(struct section_file *sfile)
+{
+  comment_write(sfile, comments_storage.specialists, "Specialists");
+}

Modified: trunk/tools/ruleutil/comments.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruleutil/comments.h?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/tools/ruleutil/comments.h     (original)
+++ trunk/tools/ruleutil/comments.h     Tue Jun 28 08:59:47 2016
@@ -40,6 +40,7 @@
 void comment_achievements(struct section_file *sfile);
 void comment_goods(struct section_file *sfile);
 void comment_enablers(struct section_file *sfile);
+void comment_specialists(struct section_file *sfile);
 
 #ifdef __cplusplus
 }

Modified: trunk/tools/ruleutil/rulesave.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruleutil/rulesave.c?rev=33077&r1=33076&r2=33077&view=diff
==============================================================================
--- trunk/tools/ruleutil/rulesave.c     (original)
+++ trunk/tools/ruleutil/rulesave.c     Tue Jun 28 08:59:47 2016
@@ -576,6 +576,8 @@
   if (sfile == NULL) {
     return FALSE;
   }
+
+  comment_specialists(sfile);
 
   sect_idx = 0;
   specialist_type_iterate(sp) {


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

Reply via email to