[Freeciv-commits] r25247 - /trunk/data/misc/small.png

2014-06-23 Thread cazfi74
Author: cazfi
Date: Mon Jun 23 23:48:10 2014
New Revision: 25247

URL: http://svn.gna.org/viewcvs/freeciv?rev=25247view=rev
Log:
Replaced eco disaster icons with ones with more sensible color schemes
(warm colors for warming, cold for winter) by GriffonSpade.

See patch #4827

Modified:
trunk/data/misc/small.png

Modified: trunk/data/misc/small.png
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/small.png?rev=25247r1=25246r2=25247view=diff
==
Binary files - no diff available.


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


[Freeciv-commits] r25248 - /branches/S2_5/data/misc/small.png

2014-06-23 Thread cazfi74
Author: cazfi
Date: Mon Jun 23 23:48:15 2014
New Revision: 25248

URL: http://svn.gna.org/viewcvs/freeciv?rev=25248view=rev
Log:
Replaced eco disaster icons with ones with more sensible color schemes
(warm colors for warming, cold for winter) by GriffonSpade.

See patch #4827

Modified:
branches/S2_5/data/misc/small.png

Modified: branches/S2_5/data/misc/small.png
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/misc/small.png?rev=25248r1=25247r2=25248view=diff
==
Binary files - no diff available.


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


[Freeciv-commits] r25249 - in /trunk: client/ client/gui-gtk-2.0/ client/gui-gtk-3.0/ client/gui-qt/ client/gui-sdl/ client/gui-sdl2/ client/g...

2014-06-23 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 24 00:59:40 2014
New Revision: 25249

URL: http://svn.gna.org/viewcvs/freeciv?rev=25249view=rev
Log:
Only reduce fractional movement points to lowest terms for display when
talking about rulesets and unit types in the abstract; when talking
about a specific unit, don't reduce, to avoid confusing changes as a
unit moves.

Requested by Marko Lindqvist (cazfi@gna).

See gna bug #22194.

Modified:
trunk/client/gui-gtk-2.0/helpdlg.c
trunk/client/gui-gtk-3.0/helpdlg.c
trunk/client/gui-qt/dialogs.cpp
trunk/client/gui-sdl/citydlg.c
trunk/client/gui-sdl/dialogs.c
trunk/client/gui-sdl/helpdlg.c
trunk/client/gui-sdl/mapview.c
trunk/client/gui-sdl/wldlg.c
trunk/client/gui-sdl2/citydlg.c
trunk/client/gui-sdl2/dialogs.c
trunk/client/gui-sdl2/helpdlg.c
trunk/client/gui-sdl2/mapview.c
trunk/client/gui-sdl2/wldlg.c
trunk/client/gui-xaw/helpdlg.c
trunk/client/helpdata.c
trunk/common/movement.c
trunk/common/movement.h
trunk/common/unit.c
trunk/common/unittype.c

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/client/gui-gtk-2.0/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/helpdlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-gtk-3.0/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/helpdlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/citydlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/dialogs.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/helpdlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl/mapview.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/mapview.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl/wldlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/wldlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl2/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/citydlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl2/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/dialogs.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl2/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/helpdlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl2/mapview.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/mapview.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-sdl2/wldlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/wldlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/gui-xaw/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-xaw/helpdlg.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/movement.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/common/movement.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/movement.h?rev=25249r1=25248r2=25249view=diff

Modified: trunk/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=25249r1=25248r2=25249view=diff

Modified: trunk/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.c?rev=25249r1=25248r2=25249view=diff


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


[Freeciv-commits] r25250 - /trunk/server/ruleset.c

2014-06-23 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 24 00:59:44 2014
New Revision: 25250

URL: http://svn.gna.org/viewcvs/freeciv?rev=25250view=rev
Log:
Sanity check move_fragments and igter_cost on ruleset load.

Suggested by Emmet Hikory (persia@gna).

See gna patch #4834.

Modified:
trunk/server/ruleset.c

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=25250r1=25249r2=25250view=diff
==
--- trunk/server/ruleset.c  (original)
+++ trunk/server/ruleset.c  Tue Jun 24 00:59:44 2014
@@ -2614,10 +2614,20 @@
   terrain_control.move_fragments
 = secfile_lookup_int_default(file, 3,
  parameters.move_fragments);
+  if (terrain_control.move_fragments  1) {
+ruleset_error(LOG_ERROR, \%s\: move_fragments must be at least 1,
+  filename);
+ok = FALSE;
+  }
   init_move_fragments();
   terrain_control.igter_cost
 = secfile_lookup_int_default(file, 1,
  parameters.igter_cost);
+  if (terrain_control.igter_cost  1) {
+ruleset_error(LOG_ERROR, \%s\: igter_cost must be at least 1,
+  filename);
+ok = FALSE;
+  }
   terrain_control.pythagorean_diagonal
 = secfile_lookup_bool_default(file, RS_DEFAULT_PYTHAGOREAN_DIAGONAL,
   parameters.pythagorean_diagonal);
@@ -2626,240 +2636,241 @@
 = secfile_lookup_bool_default(file, FALSE,
   parameters.ocean_resources);
 
-  /* terrain details */
-
-  terrain_type_iterate(pterrain) {
-const char **slist;
-const int i = terrain_index(pterrain);
-const char *tsection = terrain_sections[i * MAX_SECTION_LABEL];
-const char *cstr;
-
-sz_strlcpy(pterrain-graphic_str,
-  secfile_lookup_str(file,%s.graphic, tsection));
-sz_strlcpy(pterrain-graphic_alt,
-  secfile_lookup_str(file,%s.graphic_alt, tsection));
-
-pterrain-identifier
-  = secfile_lookup_str(file, %s.identifier, tsection)[0];
-if ('\0' == pterrain-identifier) {
-  ruleset_error(LOG_ERROR, \%s\ [%s] identifier missing value.,
-filename, tsection);
-  ok = FALSE;
-  break;
-}
-if (TERRAIN_UNKNOWN_IDENTIFIER == pterrain-identifier) {
-  ruleset_error(LOG_ERROR,
-\%s\ [%s] cannot use '%c' as an identifier;
- it is reserved for unknown terrain.,
-filename, tsection, pterrain-identifier);
-  ok = FALSE;
-  break;
-}
-for (j = T_FIRST; j  i; j++) {
-  if (pterrain-identifier == terrain_by_number(j)-identifier) {
+  if (ok) {
+/* terrain details */
+
+terrain_type_iterate(pterrain) {
+  const char **slist;
+  const int i = terrain_index(pterrain);
+  const char *tsection = terrain_sections[i * MAX_SECTION_LABEL];
+  const char *cstr;
+
+  sz_strlcpy(pterrain-graphic_str,
+ secfile_lookup_str(file,%s.graphic, tsection));
+  sz_strlcpy(pterrain-graphic_alt,
+ secfile_lookup_str(file,%s.graphic_alt, tsection));
+
+  pterrain-identifier
+= secfile_lookup_str(file, %s.identifier, tsection)[0];
+  if ('\0' == pterrain-identifier) {
+ruleset_error(LOG_ERROR, \%s\ [%s] identifier missing value.,
+  filename, tsection);
+ok = FALSE;
+break;
+  }
+  if (TERRAIN_UNKNOWN_IDENTIFIER == pterrain-identifier) {
 ruleset_error(LOG_ERROR,
-  \%s\ [%s] has the same identifier as [%s].,
-  filename,
-  tsection,
-  terrain_sections[j * MAX_SECTION_LABEL]);
-ok = FALSE;
-break;
-  }
-}
-
-if (!ok) {
-  break;
-}
-
-cstr = secfile_lookup_str(file, %s.class, tsection);
-pterrain-tclass = terrain_class_by_name(cstr, fc_strcasecmp);
-if (!terrain_class_is_valid(pterrain-tclass)) {
-  ruleset_error(LOG_ERROR, \%s\: [%s] unknown class \%s\,
-filename, tsection, cstr);
-  ok = FALSE;
-  break;
-}
-
-if (!secfile_lookup_int(file, pterrain-movement_cost,
-%s.movement_cost, tsection)
-|| !secfile_lookup_int(file, pterrain-defense_bonus,
-   %s.defense_bonus, tsection)) {
-  ruleset_error(LOG_ERROR, %s, secfile_error());
-  ok = FALSE;
-  break;
-}
-
-output_type_iterate(o) {
-  pterrain-output[o]
-   = secfile_lookup_int_default(file, 0, %s.%s, tsection,
-get_output_identifier(o));
-} output_type_iterate_end;
-
-res = secfile_lookup_str_vec(file, nval, %s.resources, tsection);
-pterrain-resources = fc_calloc(nval + 1, sizeof(*pterrain-resources));
-for (j = 0; j  nval; j++) {
-  pterrain-resources[j] = lookup_resource(filename, res[j], 

[Freeciv-commits] r25252 - /branches/S2_5/server/ruleset.c

2014-06-23 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 24 01:02:37 2014
New Revision: 25252

URL: http://svn.gna.org/viewcvs/freeciv?rev=25252view=rev
Log:
Sanity check move_fragments and igter_cost on ruleset load.

Suggested by Emmet Hikory (persia@gna).

See gna patch #4834.

Modified:
branches/S2_5/server/ruleset.c

Modified: branches/S2_5/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/ruleset.c?rev=25252r1=25251r2=25252view=diff
==
--- branches/S2_5/server/ruleset.c  (original)
+++ branches/S2_5/server/ruleset.c  Tue Jun 24 01:02:37 2014
@@ -2597,10 +2597,20 @@
   terrain_control.move_fragments
 = secfile_lookup_int_default(file, 3,
  parameters.move_fragments);
+  if (terrain_control.move_fragments  1) {
+ruleset_error(LOG_ERROR, \%s\: move_fragments must be at least 1,
+  filename);
+ok = FALSE;
+  }
   init_move_fragments();
   terrain_control.igter_cost
 = secfile_lookup_int_default(file, 1,
  parameters.igter_cost);
+  if (terrain_control.igter_cost  1) {
+ruleset_error(LOG_ERROR, \%s\: igter_cost must be at least 1,
+  filename);
+ok = FALSE;
+  }
   map.server.ocean_resources
 = secfile_lookup_bool_default(file, FALSE,
   parameters.ocean_resources);
@@ -2616,213 +2626,214 @@
   get_output_identifier(o));
   } output_type_iterate_end;
 
-  /* terrain details */
-
-  terrain_type_iterate(pterrain) {
-const char **slist;
-const int i = terrain_index(pterrain);
-const char *tsection = terrain_sections[i * MAX_SECTION_LABEL];
-const char *cstr;
-
-sz_strlcpy(pterrain-graphic_str,
-  secfile_lookup_str(file,%s.graphic, tsection));
-sz_strlcpy(pterrain-graphic_alt,
-  secfile_lookup_str(file,%s.graphic_alt, tsection));
-
-pterrain-identifier
-  = secfile_lookup_str(file, %s.identifier, tsection)[0];
-if ('\0' == pterrain-identifier) {
-  ruleset_error(LOG_ERROR, \%s\ [%s] identifier missing value.,
-filename, tsection);
-  ok = FALSE;
-  break;
-}
-if (TERRAIN_UNKNOWN_IDENTIFIER == pterrain-identifier) {
-  ruleset_error(LOG_ERROR,
-\%s\ [%s] cannot use '%c' as an identifier;
- it is reserved for unknown terrain.,
-filename, tsection, pterrain-identifier);
-  ok = FALSE;
-  break;
-}
-for (j = T_FIRST; j  i; j++) {
-  if (pterrain-identifier == terrain_by_number(j)-identifier) {
+  if (ok) {
+/* terrain details */
+
+terrain_type_iterate(pterrain) {
+  const char **slist;
+  const int i = terrain_index(pterrain);
+  const char *tsection = terrain_sections[i * MAX_SECTION_LABEL];
+  const char *cstr;
+
+  sz_strlcpy(pterrain-graphic_str,
+ secfile_lookup_str(file,%s.graphic, tsection));
+  sz_strlcpy(pterrain-graphic_alt,
+ secfile_lookup_str(file,%s.graphic_alt, tsection));
+
+  pterrain-identifier
+= secfile_lookup_str(file, %s.identifier, tsection)[0];
+  if ('\0' == pterrain-identifier) {
+ruleset_error(LOG_ERROR, \%s\ [%s] identifier missing value.,
+  filename, tsection);
+ok = FALSE;
+break;
+  }
+  if (TERRAIN_UNKNOWN_IDENTIFIER == pterrain-identifier) {
 ruleset_error(LOG_ERROR,
-  \%s\ [%s] has the same identifier as [%s].,
-  filename,
-  tsection,
-  terrain_sections[j * MAX_SECTION_LABEL]);
-ok = FALSE;
-break;
-  }
-}
-
-if (!ok) {
-  break;
-}
-
-cstr = secfile_lookup_str(file, %s.class, tsection);
-pterrain-tclass = terrain_class_by_name(cstr, fc_strcasecmp);
-if (!terrain_class_is_valid(pterrain-tclass)) {
-  ruleset_error(LOG_ERROR, \%s\: [%s] unknown class \%s\,
-filename, tsection, cstr);
-  ok = FALSE;
-  break;
-}
-
-if (!secfile_lookup_int(file, pterrain-movement_cost,
-%s.movement_cost, tsection)
-|| !secfile_lookup_int(file, pterrain-defense_bonus,
-   %s.defense_bonus, tsection)) {
-  ruleset_error(LOG_ERROR, %s, secfile_error());
-  ok = FALSE;
-  break;
-}
-
-output_type_iterate(o) {
-  pterrain-output[o]
-   = secfile_lookup_int_default(file, 0, %s.%s, tsection,
-get_output_identifier(o));
-} output_type_iterate_end;
-
-res = secfile_lookup_str_vec(file, nval, %s.resources, tsection);
-pterrain-resources = fc_calloc(nval + 1, sizeof(*pterrain-resources));
-for (j = 0; j  nval; j++) {
-  pterrain-resources[j] = lookup_resource(filename, res[j], tsection);
-}
-

[Freeciv-commits] r25251 - in /branches/S2_5: client/ client/gui-gtk-2.0/ client/gui-gtk-3.0/ client/gui-qt/ client/gui-sdl/ client/gui-xaw/ c...

2014-06-23 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 24 01:02:34 2014
New Revision: 25251

URL: http://svn.gna.org/viewcvs/freeciv?rev=25251view=rev
Log:
Only reduce fractional movement points to lowest terms for display when
talking about rulesets and unit types in the abstract; when talking
about a specific unit, don't reduce, to avoid confusing changes as a
unit moves.

Requested by Marko Lindqvist (cazfi@gna).

See gna bug #22194.

Modified:
branches/S2_5/client/gui-gtk-2.0/helpdlg.c
branches/S2_5/client/gui-gtk-3.0/helpdlg.c
branches/S2_5/client/gui-qt/dialogs.cpp
branches/S2_5/client/gui-sdl/citydlg.c
branches/S2_5/client/gui-sdl/dialogs.c
branches/S2_5/client/gui-sdl/helpdlg.c
branches/S2_5/client/gui-sdl/mapview.c
branches/S2_5/client/gui-sdl/wldlg.c
branches/S2_5/client/gui-xaw/helpdlg.c
branches/S2_5/client/helpdata.c
branches/S2_5/common/movement.c
branches/S2_5/common/movement.h
branches/S2_5/common/unit.c
branches/S2_5/common/unittype.c

Modified: branches/S2_5/client/gui-gtk-2.0/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/helpdlg.c?rev=25251r1=25250r2=25251view=diff
==
--- branches/S2_5/client/gui-gtk-2.0/helpdlg.c  (original)
+++ branches/S2_5/client/gui-gtk-2.0/helpdlg.c  Tue Jun 24 01:02:34 2014
@@ -856,7 +856,7 @@
 gtk_label_set_text(GTK_LABEL(help_ulabel[0][4]), buf);
 sprintf(buf, %d, utype-defense_strength);
 gtk_label_set_text(GTK_LABEL(help_ulabel[1][1]), buf);
-sprintf(buf, %s, move_points_text(utype-move_rate, NULL, NULL, FALSE));
+sprintf(buf, %s, move_points_text(utype-move_rate, TRUE));
 gtk_label_set_text(GTK_LABEL(help_ulabel[1][4]), buf);
 sprintf(buf, %d, utype-firepower);
 gtk_label_set_text(GTK_LABEL(help_ulabel[2][1]), buf);

Modified: branches/S2_5/client/gui-gtk-3.0/helpdlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/helpdlg.c?rev=25251r1=25250r2=25251view=diff
==
--- branches/S2_5/client/gui-gtk-3.0/helpdlg.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/helpdlg.c  Tue Jun 24 01:02:34 2014
@@ -877,7 +877,7 @@
 gtk_label_set_text(GTK_LABEL(help_ulabel[0][4]), buf);
 sprintf(buf, %d, utype-defense_strength);
 gtk_label_set_text(GTK_LABEL(help_ulabel[1][1]), buf);
-sprintf(buf, %s, move_points_text(utype-move_rate, NULL, NULL, FALSE));
+sprintf(buf, %s, move_points_text(utype-move_rate, TRUE));
 gtk_label_set_text(GTK_LABEL(help_ulabel[1][4]), buf);
 sprintf(buf, %d, utype-firepower);
 gtk_label_set_text(GTK_LABEL(help_ulabel[2][1]), buf);

Modified: branches/S2_5/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/dialogs.cpp?rev=25251r1=25250r2=25251view=diff
==
--- branches/S2_5/client/gui-qt/dialogs.cpp (original)
+++ branches/S2_5/client/gui-qt/dialogs.cpp Tue Jun 24 01:02:34 2014
@@ -1792,10 +1792,9 @@
 }
 
 if (utype_fuel(unit_type(punit))) {
-  str = QString(move_points_text
-   ((rate * f) + punit-moves_left, NULL, NULL, false));
+  str = QString(move_points_text((rate * f) + punit-moves_left, false));
 } else {
-  str = QString(move_points_text(punit-moves_left, NULL, NULL, false));
+  str = QString(move_points_text(punit-moves_left, false));
 }
 /* TRANS: MP = Movement points */
 str = QString(_(MP:)) + str;

Modified: branches/S2_5/client/gui-sdl/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/citydlg.c?rev=25251r1=25250r2=25251view=diff
==
--- branches/S2_5/client/gui-sdl/citydlg.c  (original)
+++ branches/S2_5/client/gui-sdl/citydlg.c  Tue Jun 24 01:02:34 2014
@@ -725,7 +725,7 @@
 utype_name_translation(pUType),
 pUType-attack_strength,
 pUType-defense_strength,
-move_points_text(pUType-move_rate, NULL, NULL, FALSE),
+move_points_text(pUType-move_rate, FALSE),
 (vetname != NULL ? \n : ),
 (vetname != NULL ? vetname : ),
 unit_activity_text(pUnit),

Modified: branches/S2_5/client/gui-sdl/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-sdl/dialogs.c?rev=25251r1=25250r2=25251view=diff
==
--- branches/S2_5/client/gui-sdl/dialogs.c  (original)
+++ branches/S2_5/client/gui-sdl/dialogs.c  Tue Jun 24 01:02:34 2014
@@ -1116,7 +1116,7 @@
   utype_name_translation(pUnitType),
   pUnitType-attack_strength,
   pUnitType-defense_strength,
-  

[Freeciv-commits] r25253 - in /trunk: ai/classic/classicai.c ai/threaded/threadedai.c common/ai.h doc/README.AI_modules server/plrhand.c

2014-06-23 Thread cazfi74
Author: cazfi
Date: Tue Jun 24 01:54:43 2014
New Revision: 25253

URL: http://svn.gna.org/viewcvs/freeciv?rev=25253view=rev
Log:
Civil war related AI callback API changes
- Added parameter telling the created player to split_by_civil_war
- Added callback created_by_civil_war, called for created player 

See patch #4829

Modified:
trunk/ai/classic/classicai.c
trunk/ai/threaded/threadedai.c
trunk/common/ai.h
trunk/doc/README.AI_modules
trunk/server/plrhand.c

Modified: trunk/ai/classic/classicai.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/classic/classicai.c?rev=25253r1=25252r2=25253view=diff
==
--- trunk/ai/classic/classicai.c(original)
+++ trunk/ai/classic/classicai.cTue Jun 24 01:54:43 2014
@@ -124,6 +124,17 @@
 /**
   Call default ai with classic ai type as parameter.
 **/
+static void cai_split_by_civil_war(struct player *original,
+   struct player *created)
+{
+  struct ai_type *deftype = classic_ai_get_self();
+
+  dai_assess_danger_player(deftype, original);
+}
+
+/**
+  Call default ai with classic ai type as parameter.
+**/
 static void cai_data_phase_begin(struct player *pplayer, bool is_new_phase)
 {
   struct ai_type *deftype = classic_ai_get_self();
@@ -532,7 +543,8 @@
   ai-funcs.player_load = cai_player_load;
   ai-funcs.gained_control = cai_assess_danger_player;
   /* ai-funcs.lost_control = NULL; */
-  ai-funcs.split_by_civil_war = cai_assess_danger_player;
+  ai-funcs.split_by_civil_war = cai_split_by_civil_war;
+  /* ai-funcs.created_by_civil_war = NULL; */
 
   ai-funcs.phase_begin = cai_data_phase_begin;
   ai-funcs.phase_finished = cai_data_phase_finished;

Modified: trunk/ai/threaded/threadedai.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/threaded/threadedai.c?rev=25253r1=25252r2=25253view=diff
==
--- trunk/ai/threaded/threadedai.c  (original)
+++ trunk/ai/threaded/threadedai.c  Tue Jun 24 01:54:43 2014
@@ -128,10 +128,11 @@
 /**
   Call default ai with threaded ai type as parameter.
 **/
-static void twai_split_by_civil_war(struct player *pplayer)
-{
-  TAI_AIT;
-  TAI_DFUNC(dai_assess_danger_player, pplayer);
+static void twai_split_by_civil_war(struct player *original,
+struct player *created)
+{
+  TAI_AIT;
+  TAI_DFUNC(dai_assess_danger_player, original);
 }
 
 /**

Modified: trunk/common/ai.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/ai.h?rev=25253r1=25252r2=25253view=diff
==
--- trunk/common/ai.h   (original)
+++ trunk/common/ai.h   Tue Jun 24 01:54:43 2014
@@ -22,7 +22,7 @@
 
 /* Update this capability string when ever there is changes to ai_type
structure below */
-#define FC_AI_MOD_CAPSTR +Freeciv-ai-module-2014.Feb.25
+#define FC_AI_MOD_CAPSTR +Freeciv-ai-module-2014.Jun.20
 
 /* Timers for all AI activities. Define it to get statistics about the AI. */
 #ifdef DEBUG
@@ -76,7 +76,10 @@
 void (*lost_control)(struct player *pplayer);
 
 /* Called for AI type of the player who gets split to two. */
-void (*split_by_civil_war)(struct player *pplayer);
+void (*split_by_civil_war)(struct player *original, struct player 
*created);
+
+   /* Called for AI type of the player who got created from the split. */
+void (*created_by_civil_war)(struct player *original, struct player 
*created);
 
 /* Called for player AI type when player phase begins. This is in the
  * beginning of phase setup. See also first_activities. */

Modified: trunk/doc/README.AI_modules
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.AI_modules?rev=25253r1=25252r2=25253view=diff
==
--- trunk/doc/README.AI_modules (original)
+++ trunk/doc/README.AI_modules Tue Jun 24 01:54:43 2014
@@ -6,6 +6,7 @@
 2. Using freeciv built with AI-modules support
 3. Building freeciv with AI-modules support
 4. Coding new AI module
+5. Callback interface ChangeLog
 
 
 1. Default build
@@ -89,3 +90,13 @@
 
 For --LoadAI modulename to find the AI module, it must reside in 
${libdir}/fcai/
 (/usr/lib/fcai by default) under name fc_ai_modulename.so
+
+
+5. Callback interface ChangeLog
+---
+
+New in Freeciv 2.6:
+---
+-