[Freeciv-commits] r24749 - /branches/S2_4/po/fr.po

2014-04-06 Thread 0jacobnk . gna
Author: jtn
Date: Sun Apr  6 14:47:36 2014
New Revision: 24749

URL: http://svn.gna.org/viewcvs/freeciv?rev=24749view=rev
Log:
Updated French translation by Igx, The Dreaming Drummer...
100%: 7133 translated messages.

Modified:
branches/S2_4/po/fr.po

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

Modified: branches/S2_4/po/fr.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/po/fr.po?rev=24749r1=24748r2=24749view=diff


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


[Freeciv-commits] r24754 - /trunk/common/unit.c

2014-04-10 Thread 0jacobnk . gna
Author: jtn
Date: Fri Apr 11 00:59:16 2014
New Revision: 24754

URL: http://svn.gna.org/viewcvs/freeciv?rev=24754view=rev
Log:
Fix crash in is_my_zoc() associated with unknown terrain.

Report and patch by pepeto (pepeto@gna).

See gna bug #21894.

Modified:
trunk/common/unit.c

Modified: trunk/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=24754r1=24753r2=24754view=diff
==
--- trunk/common/unit.c (original)
+++ trunk/common/unit.c Fri Apr 11 00:59:16 2014
@@ -1706,8 +1706,12 @@
 **/
 bool is_my_zoc(const struct player *pplayer, const struct tile *ptile0)
 {
+  struct terrain *pterrain;
+
   square_iterate(ptile0, 1, ptile) {
-if (terrain_has_flag(tile_terrain(ptile), TER_NO_ZOC)) {
+pterrain = tile_terrain(ptile);
+if (T_UNKNOWN == pterrain
+|| terrain_has_flag(pterrain, TER_NO_ZOC)) {
   continue;
 }
 


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


[Freeciv-commits] r24785 - in /trunk/common: base.c extras.c map.h metaknowledge.c requirements.c requirements.h road.c terrain.c

2014-04-21 Thread 0jacobnk . gna
Author: jtn
Date: Mon Apr 21 15:47:08 2014
New Revision: 24785

URL: http://svn.gna.org/viewcvs/freeciv?rev=24785view=rev
Log:
Requirements with Adjacent/CAdjacent ranges always check the centre tile too.
Fixed the TerrainClass, Extra, TerrainFlag, BaseFlag, RoadFlag, CityTile,
and MaxUnitsOnTile requirements.
Also, TerrainClass/TerrainFlag City-ranged requirements now cope with
unknown terrain within the city radius.

See gna bug #21470.

Modified:
trunk/common/base.c
trunk/common/extras.c
trunk/common/map.h
trunk/common/metaknowledge.c
trunk/common/requirements.c
trunk/common/requirements.h
trunk/common/road.c
trunk/common/terrain.c

Modified: trunk/common/base.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/base.c?rev=24785r1=24784r2=24785view=diff
==
--- trunk/common/base.c (original)
+++ trunk/common/base.c Mon Apr 21 15:47:08 2014
@@ -38,7 +38,7 @@
 
 /
   Returns TRUE iff any cardinally adjacent tile contains a base with
-  the given flag
+  the given flag (does not check ptile itself)
 /
 bool is_base_flag_card_near(const struct tile *ptile, enum base_flag_id flag)
 {
@@ -55,6 +55,7 @@
 
 /
   Returns TRUE iff any adjacent tile contains a base with the given flag
+  (does not check ptile itself)
 /
 bool is_base_flag_near_tile(const struct tile *ptile, enum base_flag_id flag)
 {

Modified: trunk/common/extras.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/extras.c?rev=24785r1=24784r2=24785view=diff
==
--- trunk/common/extras.c   (original)
+++ trunk/common/extras.c   Mon Apr 21 15:47:08 2014
@@ -314,6 +314,7 @@
 
 /
   Is there extra of the given type cardinally near tile?
+  (Does not check ptile itself.)
 /
 bool is_extra_card_near(const struct tile *ptile, const struct extra_type 
*pextra)
 {
@@ -328,6 +329,7 @@
 
 /
   Is there extra of the given type near tile?
+  (Does not check ptile itself.)
 /
 bool is_extra_near_tile(const struct tile *ptile, const struct extra_type 
*pextra)
 {

Modified: trunk/common/map.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/map.h?rev=24785r1=24784r2=24785view=diff
==
--- trunk/common/map.h  (original)
+++ trunk/common/map.h  Mon Apr 21 15:47:08 2014
@@ -376,10 +376,10 @@
 
 extern struct terrain_misc terrain_control;
 
-/* This iterates outwards from the starting point. Every tile within max_dist
- * will show up exactly once, in an outward (based on real map distance)
- * order.  The returned values are always real and are normalized.  The
- * starting position must be normal.
+/* This iterates outwards from the starting point.  Every tile within max_dist
+ * (including the starting tile) will show up exactly once, in an outward
+ * (based on real map distance) order.  The returned values are always real
+ * and are normalized.  The starting position must be normal.
  *
  * See also iterate_outward() */
 #define iterate_outward_dxy(start_tile, max_dist, _tile, _x, _y)   \
@@ -468,8 +468,9 @@
   } square_dxy_iterate_end;\
 }
 
-/* Iterate through all map positions adjacent to the given center map
- * position, with normalization.  The order of positions is unspecified. */
+/* Iterate itr_tile through all map tiles adjacent to the given center map
+ * position, with normalization.  Does not include the center position.
+ * The order of positions is unspecified. */
 #define adjc_iterate(center_tile, itr_tile)\
 {  \
   /* Written as a wrapper to adjc_dir_iterate since it's the cleanest and   \
@@ -480,12 +481,14 @@
   } adjc_dir_iterate_end;   \
 }
 
+/* As adjc_iterate() but also set direction8 iterator variable dir_itr */
 #define adjc_dir_iterate(center_tile, itr_tile, dir_itr)   \
   adjc_dirlist_iterate(center_tile, itr_tile, dir_itr, \
   map.valid_dirs, map.num_valid_dirs)
 
 #define adjc_dir_iterate_end adjc_dirlist_iterate_end
 
+/* Only set direction8 dir_itr (not tile) */
 #define 

[Freeciv-commits] r24786 - in /branches/S2_5/common: base.c map.h requirements.c requirements.h road.c terrain.c

2014-04-21 Thread 0jacobnk . gna
Author: jtn
Date: Mon Apr 21 15:56:18 2014
New Revision: 24786

URL: http://svn.gna.org/viewcvs/freeciv?rev=24786view=rev
Log:
Requirements with Adjacent/CAdjacent ranges always check the centre tile too.
Fixed the TerrainClass, Base, Road, TerrainFlag, and CityTile requirements.
Also, TerrainClass/TerrainFlag City-ranged requirements now cope with
unknown terrain within the city radius.

See gna bug #21470.

Modified:
branches/S2_5/common/base.c
branches/S2_5/common/map.h
branches/S2_5/common/requirements.c
branches/S2_5/common/requirements.h
branches/S2_5/common/road.c
branches/S2_5/common/terrain.c

Modified: branches/S2_5/common/base.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/base.c?rev=24786r1=24785r2=24786view=diff
==
--- branches/S2_5/common/base.c (original)
+++ branches/S2_5/common/base.c Mon Apr 21 15:56:18 2014
@@ -128,6 +128,7 @@
 
 /
   Is there base of the given type cardinally near tile?
+  (Does not check ptile itself.)
 /
 bool is_base_card_near(const struct tile *ptile, const struct base_type *pbase)
 {
@@ -142,6 +143,7 @@
 
 /
   Is there base of the given type near tile?
+  (Does not check ptile itself.)
 /
 bool is_base_near_tile(const struct tile *ptile, const struct base_type *pbase)
 {

Modified: branches/S2_5/common/map.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/map.h?rev=24786r1=24785r2=24786view=diff
==
--- branches/S2_5/common/map.h  (original)
+++ branches/S2_5/common/map.h  Mon Apr 21 15:56:18 2014
@@ -377,10 +377,10 @@
 
 extern struct terrain_misc terrain_control;
 
-/* This iterates outwards from the starting point. Every tile within max_dist
- * will show up exactly once, in an outward (based on real map distance)
- * order.  The returned values are always real and are normalized.  The
- * starting position must be normal.
+/* This iterates outwards from the starting point.  Every tile within max_dist
+ * (including the starting tile) will show up exactly once, in an outward
+ * (based on real map distance) order.  The returned values are always real
+ * and are normalized.  The starting position must be normal.
  *
  * See also iterate_outward() */
 #define iterate_outward_dxy(start_tile, max_dist, _tile, _x, _y)   \
@@ -469,8 +469,9 @@
   } square_dxy_iterate_end;\
 }
 
-/* Iterate through all map positions adjacent to the given center map
- * position, with normalization.  The order of positions is unspecified. */
+/* Iterate itr_tile through all map tiles adjacent to the given center map
+ * position, with normalization.  Does not include the center position.
+ * The order of positions is unspecified. */
 #define adjc_iterate(center_tile, itr_tile)\
 {  \
   /* Written as a wrapper to adjc_dir_iterate since it's the cleanest and   \
@@ -481,12 +482,14 @@
   } adjc_dir_iterate_end;   \
 }
 
+/* As adjc_iterate() but also set direction8 iterator variable dir_itr */
 #define adjc_dir_iterate(center_tile, itr_tile, dir_itr)   \
   adjc_dirlist_iterate(center_tile, itr_tile, dir_itr, \
   map.valid_dirs, map.num_valid_dirs)
 
 #define adjc_dir_iterate_end adjc_dirlist_iterate_end
 
+/* Only set direction8 dir_itr (not tile) */
 #define adjc_dir_base_iterate(center_tile, dir_itr)
\
   adjc_dirlist_base_iterate(center_tile, dir_itr,  
\
 map.valid_dirs, map.num_valid_dirs)
@@ -494,18 +497,23 @@
 #define adjc_dir_base_iterate_end  
\
   adjc_dirlist_base_iterate_end
 
+/* Iterate itr_tile through all map tiles cardinally adjacent to the given
+ * center map position, with normalization.  Does not include the center
+ * position.  The order of positions is unspecified. */
 #define cardinal_adjc_iterate(center_tile, itr_tile)   \
   adjc_dirlist_iterate(center_tile, itr_tile, _dir_itr,
\
   map.cardinal_dirs, map.num_cardinal_dirs)
 
 #define cardinal_adjc_iterate_end adjc_dirlist_iterate_end
 
+/* As cardinal_adjc_iterate but also set direction8 variable dir_itr */
 #define cardinal_adjc_dir_iterate(center_tile, itr_tile, dir_itr)  \
   adjc_dirlist_iterate(center_tile, itr_tile, dir_itr,   

[Freeciv-commits] r24787 - in /branches/S2_4/common: base.c map.h requirements.c requirements.h terrain.c

2014-04-21 Thread 0jacobnk . gna
Author: jtn
Date: Mon Apr 21 16:06:03 2014
New Revision: 24787

URL: http://svn.gna.org/viewcvs/freeciv?rev=24787view=rev
Log:
Requirements with Adjacent/CAdjacent ranges always check the centre tile too.
Fixed the TerrainClass, Base, and CityTile requirement types.

See gna bug #21470.

Modified:
branches/S2_4/common/base.c
branches/S2_4/common/map.h
branches/S2_4/common/requirements.c
branches/S2_4/common/requirements.h
branches/S2_4/common/terrain.c

Modified: branches/S2_4/common/base.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/common/base.c?rev=24787r1=24786r2=24787view=diff
==
--- branches/S2_4/common/base.c (original)
+++ branches/S2_4/common/base.c Mon Apr 21 16:06:03 2014
@@ -131,6 +131,7 @@
 
 /
   Is there base of the given type cardinally near tile?
+  (Does not check ptile itself.)
 /
 bool is_base_card_near(const struct tile *ptile, const struct base_type *pbase)
 {
@@ -145,6 +146,7 @@
 
 /
   Is there base of the given type near tile?
+  (Does not check ptile itself.)
 /
 bool is_base_near_tile(const struct tile *ptile, const struct base_type *pbase)
 {

Modified: branches/S2_4/common/map.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/common/map.h?rev=24787r1=24786r2=24787view=diff
==
--- branches/S2_4/common/map.h  (original)
+++ branches/S2_4/common/map.h  Mon Apr 21 16:06:03 2014
@@ -378,10 +378,10 @@
 
 extern struct terrain_misc terrain_control;
 
-/* This iterates outwards from the starting point. Every tile within max_dist
- * will show up exactly once, in an outward (based on real map distance)
- * order.  The returned values are always real and are normalized.  The
- * starting position must be normal.
+/* This iterates outwards from the starting point.  Every tile within max_dist
+ * (including the starting tile) will show up exactly once, in an outward
+ * (based on real map distance) order.  The returned values are always real
+ * and are normalized.  The starting position must be normal.
  *
  * See also iterate_outward() */
 #define iterate_outward_dxy(start_tile, max_dist, _tile, _x, _y)   \
@@ -470,8 +470,9 @@
   } square_dxy_iterate_end;\
 }
 
-/* Iterate through all map positions adjacent to the given center map
- * position, with normalization.  The order of positions is unspecified. */
+/* Iterate itr_tile through all map tiles adjacent to the given center map
+ * position, with normalization.  Does not include the center position.
+ * The order of positions is unspecified. */
 #define adjc_iterate(center_tile, itr_tile)\
 {  \
   /* Written as a wrapper to adjc_dir_iterate since it's the cleanest and   \
@@ -482,12 +483,14 @@
   } adjc_dir_iterate_end;   \
 }
 
+/* As adjc_iterate() but also set direction8 iterator variable dir_itr */
 #define adjc_dir_iterate(center_tile, itr_tile, dir_itr)   \
   adjc_dirlist_iterate(center_tile, itr_tile, dir_itr, \
   map.valid_dirs, map.num_valid_dirs)
 
 #define adjc_dir_iterate_end adjc_dirlist_iterate_end
 
+/* Only set direction8 dir_itr (not tile) */
 #define adjc_dir_base_iterate(center_tile, dir_itr)
\
   adjc_dirlist_base_iterate(center_tile, dir_itr,  
\
 map.valid_dirs, map.num_valid_dirs)
@@ -495,18 +498,23 @@
 #define adjc_dir_base_iterate_end  
\
   adjc_dirlist_base_iterate_end
 
+/* Iterate itr_tile through all map tiles cardinally adjacent to the given
+ * center map position, with normalization.  Does not include the center
+ * position.  The order of positions is unspecified. */
 #define cardinal_adjc_iterate(center_tile, itr_tile)   \
   adjc_dirlist_iterate(center_tile, itr_tile, _dir_itr,
\
   map.cardinal_dirs, map.num_cardinal_dirs)
 
 #define cardinal_adjc_iterate_end adjc_dirlist_iterate_end
 
+/* As cardinal_adjc_iterate but also set direction8 variable dir_itr */
 #define cardinal_adjc_dir_iterate(center_tile, itr_tile, dir_itr)  \
   adjc_dirlist_iterate(center_tile, itr_tile, dir_itr, \
   map.cardinal_dirs, map.num_cardinal_dirs)
 
 #define cardinal_adjc_dir_iterate_end adjc_dirlist_iterate_end
 
+/* Only set 

[Freeciv-commits] r24791 - in /trunk: client/helpdata.c common/improvement.c common/improvement.h common/requirements.c server/cityturn.c

2014-04-23 Thread 0jacobnk . gna
Author: jtn
Date: Wed Apr 23 22:10:53 2014
New Revision: 24791

URL: http://svn.gna.org/viewcvs/freeciv?rev=24791view=rev
Log:
Fix numerous issues in textual descriptions of requirements.

See gna patch #4400.

Modified:
trunk/client/helpdata.c
trunk/common/improvement.c
trunk/common/improvement.h
trunk/common/requirements.c
trunk/server/cityturn.c

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

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

Modified: trunk/common/improvement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/improvement.c?rev=24791r1=24790r2=24791view=diff

Modified: trunk/common/improvement.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/improvement.h?rev=24791r1=24790r2=24791view=diff

Modified: trunk/common/requirements.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/requirements.c?rev=24791r1=24790r2=24791view=diff

Modified: trunk/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/cityturn.c?rev=24791r1=24790r2=24791view=diff


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


[Freeciv-commits] r24792 - in /branches/S2_5: client/helpdata.c common/improvement.c common/improvement.h common/requirements.c server/cityturn.c

2014-04-23 Thread 0jacobnk . gna
Author: jtn
Date: Wed Apr 23 22:12:15 2014
New Revision: 24792

URL: http://svn.gna.org/viewcvs/freeciv?rev=24792view=rev
Log:
Fix numerous issues in textual descriptions of requirements.

See gna patch #4400.

Modified:
branches/S2_5/client/helpdata.c
branches/S2_5/common/improvement.c
branches/S2_5/common/improvement.h
branches/S2_5/common/requirements.c
branches/S2_5/server/cityturn.c

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

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=24792r1=24791r2=24792view=diff

Modified: branches/S2_5/common/improvement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/improvement.c?rev=24792r1=24791r2=24792view=diff

Modified: branches/S2_5/common/improvement.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/improvement.h?rev=24792r1=24791r2=24792view=diff

Modified: branches/S2_5/common/requirements.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/requirements.c?rev=24792r1=24791r2=24792view=diff

Modified: branches/S2_5/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/cityturn.c?rev=24792r1=24791r2=24792view=diff


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


[Freeciv-commits] r24793 - /branches/S2_4/client/helpdata.c

2014-04-23 Thread 0jacobnk . gna
Author: jtn
Date: Wed Apr 23 22:20:36 2014
New Revision: 24793

URL: http://svn.gna.org/viewcvs/freeciv?rev=24793view=rev
Log:
Added helptext descriptions for negated requirements.

Patch by Emmet Hikory (persia@gna).

See gna patch #3841.

Modified:
branches/S2_4/client/helpdata.c

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

Modified: branches/S2_4/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=24793r1=24792r2=24793view=diff


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


[Freeciv-commits] r24803 - in /trunk: ./ ai/default/ client/ common/ doc/

2014-04-25 Thread 0jacobnk . gna
Author: jtn
Date: Fri Apr 25 21:20:54 2014
New Revision: 24803

URL: http://svn.gna.org/viewcvs/freeciv?rev=24803view=rev
Log:
Add Team requirement range.

See gna patch #4388.

Modified:
trunk/ai/default/aicity.c
trunk/client/helpdata.c
trunk/common/metaknowledge.c
trunk/common/requirements.c
trunk/common/requirements.h
trunk/doc/README.effects
trunk/fc_version

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

Modified: trunk/ai/default/aicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aicity.c?rev=24803r1=24802r2=24803view=diff

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

Modified: trunk/common/metaknowledge.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/metaknowledge.c?rev=24803r1=24802r2=24803view=diff

Modified: trunk/common/requirements.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/requirements.c?rev=24803r1=24802r2=24803view=diff

Modified: trunk/common/requirements.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/requirements.h?rev=24803r1=24802r2=24803view=diff

Modified: trunk/doc/README.effects
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.effects?rev=24803r1=24802r2=24803view=diff

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=24803r1=24802r2=24803view=diff


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


[Freeciv-commits] r24898 - /trunk/doc/CodingStyle

2014-05-19 Thread 0jacobnk . gna
Author: jtn
Date: Mon May 19 22:21:58 2014
New Revision: 24898

URL: http://svn.gna.org/viewcvs/freeciv?rev=24898view=rev
Log:
Some updates to CodingStyle from http://www.freeciv.org/wiki/Coding_Style
and other cleanups.

See gna patch #4689.

Modified:
trunk/doc/CodingStyle

Modified: trunk/doc/CodingStyle
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/CodingStyle?rev=24898r1=24897r2=24898view=diff
==
--- trunk/doc/CodingStyle   (original)
+++ trunk/doc/CodingStyle   Mon May 19 22:21:58 2014
@@ -254,6 +254,25 @@
   int build = pcity-shield_stock;
 }
 
+- When declaring a pointer, there should be a space before '*' and no space
+  after, except if it is a second '*'.
+
+struct unit *find_random_unit(struct unit **array, size_t num)
+{
+  struct unit *const *prand = array + fc_rand(num);
+
+  return *prand;
+}
+
+  instead of
+
+struct unit* find_random_unit(struct unit* *array, size_t num)
+{
+  struct unit * const* prand = array + fc_rand(num);
+
+  return *prand;
+}
+
 
 
   Bracing
@@ -261,14 +280,14 @@
 
 - Function braces begin and end in the first column:
 
-int foo()
+int foo(void)
 {
   return 0;
 }
 
   instead of
 
-int foo() {
+int foo(void) {
   return 0;
 }
 
@@ -315,7 +334,7 @@
 - Avoid storing magic values in external processes. For example, savegames
   shouldn't contain any enumerators as magic numbers. They should be saved
   as strings, to keep compatibility when their definition is changed. For
-  doing this, there are some tools in utility/specenum_gen.h; have a look on
+  doing this, there are some tools in utility/specenum_gen.h; have a look at
   it.
 
 - Avoid the usage of the default case in switch statements, if possible. The
@@ -367,7 +386,7 @@
 #include myfileheader.h
 
 - For headers within a subdirectory path, the common rule is to set them
-  in a additional group, after the same group (don't forget the location
+  in an additional group, after the same group (don't forget the location
   comment).
 
 /* common */
@@ -377,7 +396,7 @@
 #include pf_tools.h
 
   However, there is an exception to this. The last group is always the one
-  we are working on it. So, if we are working on the common part, the order
+  we are working on. So, if we are working on the common part, the order
   should be:
 
 /* common/aicore */
@@ -474,8 +493,8 @@
   Miscellaneous
 
 
-- If an empty block is needed you should put an explanatory comment in an
-  empty block (i.e. {}):
+- If an empty statement is needed, you should put an explanatory comment
+  in an empty block (i.e. {}):
 
 while (*i++) {
   /* Do nothing. */
@@ -496,11 +515,11 @@
 
 - Try to use static inline functions and const data instead of macros.
 
-- If helper functions internal to freeciv are added use the prefix 'fc_'.
-  Do not use 'my_' because it is also used by MYSQL and could be included
-  in some libs.
-
-- Do not use assert(), neither die() but the macros defined within
+- If helper functions internal to freeciv are added, prefix their names
+  with 'fc_'. Do not use 'my_' because it is also used by MySQL and could
+  be included in some libs.
+
+- Do not use assert() or die(); instead use the macros defined within
   utility/log.h:
 
 fc_assert(condition)
@@ -517,6 +536,8 @@
 
   This way error conditions can be handled gracefully while still enforcing
   invariants you expect not to be violated in the code.
+  (By default execution will continue with a warning, but it can be made
+  to halt by specifying the '-F' option to the client or server.)
 
 int foo_get_id(const struct foo *pfoo)
 {


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


[Freeciv-commits] r24899 - /branches/S2_5/doc/CodingStyle

2014-05-19 Thread 0jacobnk . gna
Author: jtn
Date: Mon May 19 22:23:20 2014
New Revision: 24899

URL: http://svn.gna.org/viewcvs/freeciv?rev=24899view=rev
Log:
Some updates to CodingStyle from http://www.freeciv.org/wiki/Coding_Style
and other cleanups.

See gna patch #4689.

Modified:
branches/S2_5/doc/CodingStyle

Modified: branches/S2_5/doc/CodingStyle
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/doc/CodingStyle?rev=24899r1=24898r2=24899view=diff
==
--- branches/S2_5/doc/CodingStyle   (original)
+++ branches/S2_5/doc/CodingStyle   Mon May 19 22:23:20 2014
@@ -254,6 +254,25 @@
   int build = pcity-shield_stock;
 }
 
+- When declaring a pointer, there should be a space before '*' and no space
+  after, except if it is a second '*'.
+
+struct unit *find_random_unit(struct unit **array, size_t num)
+{
+  struct unit *const *prand = array + fc_rand(num);
+
+  return *prand;
+}
+
+  instead of
+
+struct unit* find_random_unit(struct unit* *array, size_t num)
+{
+  struct unit * const* prand = array + fc_rand(num);
+
+  return *prand;
+}
+
 
 
   Bracing
@@ -261,14 +280,14 @@
 
 - Function braces begin and end in the first column:
 
-int foo()
+int foo(void)
 {
   return 0;
 }
 
   instead of
 
-int foo() {
+int foo(void) {
   return 0;
 }
 
@@ -315,7 +334,7 @@
 - Avoid storing magic values in external processes. For example, savegames
   shouldn't contain any enumerators as magic numbers. They should be saved
   as strings, to keep compatibility when their definition is changed. For
-  doing this, there are some tools in utility/specenum_gen.h; have a look on
+  doing this, there are some tools in utility/specenum_gen.h; have a look at
   it.
 
 - Avoid the usage of the default case in switch statements, if possible. The
@@ -367,7 +386,7 @@
 #include myfileheader.h
 
 - For headers within a subdirectory path, the common rule is to set them
-  in a additional group, after the same group (don't forget the location
+  in an additional group, after the same group (don't forget the location
   comment).
 
 /* common */
@@ -377,7 +396,7 @@
 #include pf_tools.h
 
   However, there is an exception to this. The last group is always the one
-  we are working on it. So, if we are working on the common part, the order
+  we are working on. So, if we are working on the common part, the order
   should be:
 
 /* common/aicore */
@@ -474,8 +493,8 @@
   Miscellaneous
 
 
-- If an empty block is needed you should put an explanatory comment in an
-  empty block (i.e. {}):
+- If an empty statement is needed, you should put an explanatory comment
+  in an empty block (i.e. {}):
 
 while (*i++) {
   /* Do nothing. */
@@ -496,11 +515,11 @@
 
 - Try to use static inline functions and const data instead of macros.
 
-- If helper functions internal to freeciv are added use the prefix 'fc_'.
-  Do not use 'my_' because it is also used by MYSQL and could be included
-  in some libs.
-
-- Do not use assert(), neither die() but the macros defined within
+- If helper functions internal to freeciv are added, prefix their names
+  with 'fc_'. Do not use 'my_' because it is also used by MySQL and could
+  be included in some libs.
+
+- Do not use assert() or die(); instead use the macros defined within
   utility/log.h:
 
 fc_assert(condition)
@@ -517,6 +536,8 @@
 
   This way error conditions can be handled gracefully while still enforcing
   invariants you expect not to be violated in the code.
+  (By default execution will continue with a warning, but it can be made
+  to halt by specifying the '-F' option to the client or server.)
 
 int foo_get_id(const struct foo *pfoo)
 {


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


[Freeciv-commits] r25018 - in /trunk/client: gui-sdl/repodlgs.c gui-sdl2/repodlgs.c

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:07:07 2014
New Revision: 25018

URL: http://svn.gna.org/viewcvs/freeciv?rev=25018view=rev
Log:
Fix compilation of SDL clients, broken by patch #4727.

Reported by Marko Lindqvist (cazfi@gna).

See gna bug #22129.

Modified:
trunk/client/gui-sdl/repodlgs.c
trunk/client/gui-sdl2/repodlgs.c

Modified: trunk/client/gui-sdl/repodlgs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/repodlgs.c?rev=25018r1=25017r2=25018view=diff
==
--- trunk/client/gui-sdl/repodlgs.c (original)
+++ trunk/client/gui-sdl/repodlgs.c Mon Jun  2 23:07:07 2014
@@ -2633,11 +2633,11 @@
  get_theme_color(COLOR_THEME_SCIENCEDLG_FRAME));
   
 if (cost  adj_size(286)) {
-  cost = (adj_size(286)
+  cost = adj_size(286)
   * ((float) research_get(client_player())-bulbs_researched
  / cost);
 } else {
-  cost = ((float) cost
+  cost = (float) cost
   * ((float) research_get(client_player())-bulbs_researched
  / cost);
 }

Modified: trunk/client/gui-sdl2/repodlgs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/repodlgs.c?rev=25018r1=25017r2=25018view=diff
==
--- trunk/client/gui-sdl2/repodlgs.c(original)
+++ trunk/client/gui-sdl2/repodlgs.cMon Jun  2 23:07:07 2014
@@ -2667,11 +2667,11 @@
 #endif
   
 if (cost  adj_size(286)) {
-  cost = (adj_size(286)
+  cost = adj_size(286)
   * ((float) research_get(client_player())-bulbs_researched
  / cost);
 } else {
-  cost = ((float) cost
+  cost = (float) cost
   * ((float) research_get(client_player())-bulbs_researched
  / cost);
 }


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


[Freeciv-commits] r25019 - in /trunk/client/gui-qt: plrdlg.cpp repodlgs.cpp

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:21:22 2014
New Revision: 25019

URL: http://svn.gna.org/viewcvs/freeciv?rev=25019view=rev
Log:
Fix compilation of QT client after patch #4727.

Reported by Marko Lindqvist (cazfi@gna).

See gna bug #22129.

Modified:
trunk/client/gui-qt/plrdlg.cpp
trunk/client/gui-qt/repodlgs.cpp

Modified: trunk/client/gui-qt/plrdlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/plrdlg.cpp?rev=25019r1=25018r2=25019view=diff
==
--- trunk/client/gui-qt/plrdlg.cpp  (original)
+++ trunk/client/gui-qt/plrdlg.cpp  Mon Jun  2 23:21:22 2014
@@ -327,7 +327,7 @@
   QModelIndexList indexes = sl.indexes();
   struct city *pcity;
   const struct player_diplstate *state;
-  struct player_research *research;
+  struct research *research;
   char tbuf[256];
   QString res;
   QString sp =  ;
@@ -356,7 +356,7 @@
 return;
   }
   pcity = player_capital(pplayer);
-  research = player_research_get(pplayer);
+  research = research_get(pplayer);
 
   switch (research-researching) {
   case A_UNKNOWN:

Modified: trunk/client/gui-qt/repodlgs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/repodlgs.cpp?rev=25019r1=25018r2=25019view=diff
==
--- trunk/client/gui-qt/repodlgs.cpp(original)
+++ trunk/client/gui-qt/repodlgs.cppMon Jun  2 23:21:22 2014
@@ -218,7 +218,7 @@
 void science_report::update_report()
 {
 
-  struct player_research *research = player_research_get(client_player());
+  struct research *research = research_get(client_player());
   const char *text;
   int total;
   int done = research-bulbs_researched;


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


[Freeciv-commits] r25022 - in /trunk/data: civ1/ civ2/ classic/ experimental/ multiplayer/

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:27:09 2014
New Revision: 25022

URL: http://svn.gna.org/viewcvs/freeciv?rev=25022view=rev
Log:
Tweak Barracks effect exclusions so that in the rare case older
buildings coexist with newer ones, the older ones are treated as
redundant in the UI.

See gna bug #22080.

Modified:
trunk/data/civ1/effects.ruleset
trunk/data/civ2/effects.ruleset
trunk/data/classic/effects.ruleset
trunk/data/experimental/effects.ruleset
trunk/data/multiplayer/effects.ruleset

Modified: trunk/data/civ1/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/effects.ruleset?rev=25022r1=25021r2=25022view=diff
==
--- trunk/data/civ1/effects.ruleset (original)
+++ trunk/data/civ1/effects.ruleset Mon Jun  2 23:27:09 2014
@@ -552,8 +552,10 @@
 type= Veteran_Build
 value  = 1
 reqs   =
-{ type, name, range
-  Building, Barracks, City
+{ type, name, range, present
+  Building, Barracks, City, TRUE
+  Building, Barracks II, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_ii]
@@ -562,17 +564,15 @@
 reqs   =
 { type, name, range, present
   Building, Barracks II, City, TRUE
-  Building, Barracks, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_iii]
 type= Veteran_Build
 value  = 1
 reqs   =
-{ type, name, range, present
-  Building, Barracks III, City, TRUE
-  Building, Barracks, City, FALSE
-  Building, Barracks II, City, FALSE
+{ type, name, range
+  Building, Barracks III, City
 }
 
 [effect_cathedral]

Modified: trunk/data/civ2/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/effects.ruleset?rev=25022r1=25021r2=25022view=diff
==
--- trunk/data/civ2/effects.ruleset (original)
+++ trunk/data/civ2/effects.ruleset Mon Jun  2 23:27:09 2014
@@ -911,15 +911,19 @@
   UnitClass, Land, Local, TRUE
   UnitFlag, NonMil, Local, FALSE
   UnitFlag, NoVeteran, Local, FALSE
+  Building, Barracks II, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_1]
 type= HP_Regen
 value  = 100
 reqs   =
-{ type, name, range
-  Building, Barracks, City
-  UnitClass, Land, Local
+{ type, name, range, present
+  Building, Barracks, City, TRUE
+  UnitClass, Land, Local, TRUE
+  Building, Barracks II, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_ii]
@@ -931,16 +935,17 @@
   UnitClass, Land, Local, TRUE
   UnitFlag, NonMil, Local, FALSE
   UnitFlag, NoVeteran, Local, FALSE
-  Building, Barracks, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_ii_1]
 type= HP_Regen
 value  = 100
 reqs   =
-{ type, name, range
-  Building, Barracks II, City
-  UnitClass, Land, Local
+{ type, name, range, present
+  Building, Barracks II, City, TRUE
+  UnitClass, Land, Local, TRUE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_iii]
@@ -952,8 +957,6 @@
   UnitClass, Land, Local, TRUE
   UnitFlag, NonMil, Local, FALSE
   UnitFlag, NoVeteran, Local, FALSE
-  Building, Barracks, City, FALSE
-  Building, Barracks II, City, FALSE
 }
 
 [effect_barracks_iii_1]

Modified: trunk/data/classic/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/effects.ruleset?rev=25022r1=25021r2=25022view=diff
==
--- trunk/data/classic/effects.ruleset  (original)
+++ trunk/data/classic/effects.ruleset  Mon Jun  2 23:27:09 2014
@@ -793,15 +793,19 @@
   UnitClass, Land, Local, TRUE
   UnitFlag, NonMil, Local, FALSE
   UnitFlag, NoVeteran, Local, FALSE
+  Building, Barracks II, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_1]
 type= HP_Regen
 value  = 100
 reqs   =
-{ type, name, range
-  Building, Barracks, City
-  UnitClass, Land, Local
+{ type, name, range, present
+  Building, Barracks, City, TRUE
+  UnitClass, Land, Local, TRUE
+  Building, Barracks II, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_ii]
@@ -813,16 +817,17 @@
   UnitClass, Land, Local, TRUE
   UnitFlag, NonMil, Local, FALSE
   UnitFlag, NoVeteran, Local, FALSE
-  Building, Barracks, City, FALSE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_ii_1]
 type= HP_Regen
 value  = 100
 reqs   =
-{ type, name, range
-  Building, Barracks II, City
-  UnitClass, Land, Local
+{ type, name, range, present
+  Building, Barracks II, City, TRUE
+  UnitClass, Land, Local, TRUE
+  Building, Barracks III, City, FALSE
 }
 
 [effect_barracks_iii]
@@ -834,8 

[Freeciv-commits] r25023 - /trunk/server/cityturn.c

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:27:12 2014
New Revision: 25023

URL: http://svn.gna.org/viewcvs/freeciv?rev=25023view=rev
Log:
Reorder disaster effects so that city destroyed by population loss is
not subsequently referenced.

See gna bug #22083.

Modified:
trunk/server/cityturn.c

Modified: trunk/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/cityturn.c?rev=25023r1=25022r2=25023view=diff
==
--- trunk/server/cityturn.c (original)
+++ trunk/server/cityturn.c Mon Jun  2 23:27:12 2014
@@ -3051,7 +3051,6 @@
   struct player *pplayer = city_owner(pcity);
   struct tile *ptile = city_tile(pcity);
   bool had_effect = FALSE;
-  struct city *city_or_null = pcity;
 
   log_debug(%s at %s, disaster_rule_name(pdis), city_name(pcity));
 
@@ -3061,25 +3060,18 @@
 _(%s was hit by %s.), city_name(pcity),
 disaster_rule_name(pdis));
 
-  if (disaster_has_effect(pdis, DE_DESTROY_BUILDING)) {
-int total = 0;
-struct impr_type *imprs[B_LAST];
-
-city_built_iterate(pcity, pimprove) {
-  if (is_improvement(pimprove)) {
-imprs[total++] = pimprove;
-  }
-} city_built_iterate_end;
-
-if (total  0) {
-  int num = fc_rand(total);
-
-  building_lost(pcity, imprs[num]);
-
+  if (disaster_has_effect(pdis, DE_POLLUTION)) {
+if (place_pollution(pcity, EC_POLLUTION)) {
   notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(%s destroyed.),
-improvement_name_translation(imprs[num]));
-
+_(Tile polluted));
+  had_effect = TRUE;
+}
+  }
+
+  if (disaster_has_effect(pdis, DE_FALLOUT)) {
+if (place_pollution(pcity, EC_FALLOUT)) {
+  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
+_(Fallout contaminated tile.));
   had_effect = TRUE;
 }
   }
@@ -3090,7 +3082,7 @@
 if (!city_reduce_size(pcity, 1, NULL)) {
   notify_player(pplayer, ptile, E_DISASTER, ftc_server,
 _(City got destroyed completely.));
-  city_or_null = NULL;
+  pcity = NULL;
 } else {
   notify_player(pplayer, ptile, E_DISASTER, ftc_server,
 _(Some population lost.));
@@ -3099,7 +3091,30 @@
 had_effect = TRUE;
   }
 
-  if (disaster_has_effect(pdis, DE_EMPTY_FOODSTOCK)) {
+  if (pcity  disaster_has_effect(pdis, DE_DESTROY_BUILDING)) {
+int total = 0;
+struct impr_type *imprs[B_LAST];
+
+city_built_iterate(pcity, pimprove) {
+  if (is_improvement(pimprove)) {
+imprs[total++] = pimprove;
+  }
+} city_built_iterate_end;
+
+if (total  0) {
+  int num = fc_rand(total);
+
+  building_lost(pcity, imprs[num]);
+
+  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
+_(%s destroyed.),
+improvement_name_translation(imprs[num]));
+
+  had_effect = TRUE;
+}
+  }
+
+  if (pcity  disaster_has_effect(pdis, DE_EMPTY_FOODSTOCK)) {
 if (pcity-food_stock  0) {
   pcity-food_stock = 0;
 
@@ -3110,7 +3125,7 @@
 }
   }
 
-  if (disaster_has_effect(pdis, DE_EMPTY_PRODSTOCK)) {
+  if (pcity  disaster_has_effect(pdis, DE_EMPTY_PRODSTOCK)) {
 if (pcity-shield_stock  0) {
   pcity-shield_stock = 0;
 
@@ -3119,22 +3134,6 @@
 
   had_effect = TRUE;
 
-}
-  }
-
-  if (disaster_has_effect(pdis, DE_POLLUTION)) {
-if (place_pollution(pcity, EC_POLLUTION)) {
-  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(Tile polluted));
-  had_effect = TRUE;
-}
-  }
-
-  if (disaster_has_effect(pdis, DE_FALLOUT)) {
-if (place_pollution(pcity, EC_FALLOUT)) {
-  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(Fallout contaminated tile.));
-  had_effect = TRUE;
 }
   }
 
@@ -3145,7 +3144,7 @@
 
   script_server_signal_emit(disaster, 2,
 API_TYPE_DISASTER, pdis,
-API_TYPE_CITY, city_or_null);
+API_TYPE_CITY, pcity);
 }
 
 /**


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


[Freeciv-commits] r25027 - /branches/S2_5/server/cityturn.c

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:28:48 2014
New Revision: 25027

URL: http://svn.gna.org/viewcvs/freeciv?rev=25027view=rev
Log:
Reorder disaster effects code for consistency with trunk, and so that if
assertion fails, NULL pointer isn't dereferenced.

See gna bug #22083.

Modified:
branches/S2_5/server/cityturn.c

Modified: branches/S2_5/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/cityturn.c?rev=25027r1=25026r2=25027view=diff
==
--- branches/S2_5/server/cityturn.c (original)
+++ branches/S2_5/server/cityturn.c Mon Jun  2 23:28:48 2014
@@ -2924,7 +2924,6 @@
   struct player *pplayer = city_owner(pcity);
   struct tile *ptile = city_tile(pcity);
   bool had_effect = FALSE;
-  struct city *city_or_null = pcity;
 
   log_debug(%s at %s, disaster_rule_name(pdis), city_name(pcity));
 
@@ -2934,65 +2933,6 @@
 _(%s was hit by %s.), city_name(pcity),
 disaster_rule_name(pdis));
 
-  if (disaster_has_effect(pdis, DE_DESTROY_BUILDING)) {
-int total = 0;
-struct impr_type *imprs[B_LAST];
-
-city_built_iterate(pcity, pimprove) {
-  if (is_improvement(pimprove)) {
-imprs[total++] = pimprove;
-  }
-} city_built_iterate_end;
-
-if (total  0) {
-  int num = fc_rand(total);
-
-  building_lost(pcity, imprs[num]);
-
-  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(%s destroyed.),
-improvement_name_translation(imprs[num]));
-
-  had_effect = TRUE;
-}
-  }
-
-  if (disaster_has_effect(pdis, DE_REDUCE_POP)
-   pcity-size  1) {
-if (!city_reduce_size(pcity, 1, NULL)) {
-  fc_assert(FALSE);
-  city_or_null = NULL;
-} else {
-  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(Some population lost.));
-}
-
-had_effect = TRUE;
-  }
-
-  if (disaster_has_effect(pdis, DE_EMPTY_FOODSTOCK)) {
-if (pcity-food_stock  0) {
-  pcity-food_stock = 0;
-
-  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(Foodbox emptied.));
-
-  had_effect = TRUE;
-}
-  }
-
-  if (disaster_has_effect(pdis, DE_EMPTY_PRODSTOCK)) {
-if (pcity-shield_stock  0) {
-  pcity-shield_stock = 0;
-
-  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
-_(Production box emptied.));
-
-  had_effect = TRUE;
-
-}
-  }
-
   if (disaster_has_effect(pdis, DE_POLLUTION)) {
 if (place_pollution(pcity, S_POLLUTION)) {
   notify_player(pplayer, ptile, E_DISASTER, ftc_server,
@@ -3009,6 +2949,65 @@
 }
   }
 
+  if (disaster_has_effect(pdis, DE_REDUCE_POP)
+   pcity-size  1) {
+if (!city_reduce_size(pcity, 1, NULL)) {
+  fc_assert(FALSE);
+  pcity = NULL;
+} else {
+  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
+_(Some population lost.));
+}
+
+had_effect = TRUE;
+  }
+
+  if (pcity  disaster_has_effect(pdis, DE_DESTROY_BUILDING)) {
+int total = 0;
+struct impr_type *imprs[B_LAST];
+
+city_built_iterate(pcity, pimprove) {
+  if (is_improvement(pimprove)) {
+imprs[total++] = pimprove;
+  }
+} city_built_iterate_end;
+
+if (total  0) {
+  int num = fc_rand(total);
+
+  building_lost(pcity, imprs[num]);
+
+  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
+_(%s destroyed.),
+improvement_name_translation(imprs[num]));
+
+  had_effect = TRUE;
+}
+  }
+
+  if (pcity  disaster_has_effect(pdis, DE_EMPTY_FOODSTOCK)) {
+if (pcity-food_stock  0) {
+  pcity-food_stock = 0;
+
+  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
+_(Foodbox emptied.));
+
+  had_effect = TRUE;
+}
+  }
+
+  if (pcity  disaster_has_effect(pdis, DE_EMPTY_PRODSTOCK)) {
+if (pcity-shield_stock  0) {
+  pcity-shield_stock = 0;
+
+  notify_player(pplayer, ptile, E_DISASTER, ftc_server,
+_(Production box emptied.));
+
+  had_effect = TRUE;
+
+}
+  }
+
   if (!had_effect) {
 notify_player(pplayer, ptile, E_DISASTER, ftc_server,
   _(We survived the disaster without serious damages.));
@@ -3016,7 +3015,7 @@
 
   script_server_signal_emit(disaster, 2,
 API_TYPE_DISASTER, pdis,
-API_TYPE_CITY, city_or_null);
+API_TYPE_CITY, pcity);
 }
 
 /**


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


[Freeciv-commits] r25024 - /branches/S2_5/data/civ2/effects.ruleset

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:28:38 2014
New Revision: 25024

URL: http://svn.gna.org/viewcvs/freeciv?rev=25024view=rev
Log:
Reduce maximum traderoutes in civ2 ruleset from 4 to 3.

See gna bug #22085.

Modified:
branches/S2_5/data/civ2/effects.ruleset

Modified: branches/S2_5/data/civ2/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/effects.ruleset?rev=25024r1=25023r2=25024view=diff
==
--- branches/S2_5/data/civ2/effects.ruleset (original)
+++ branches/S2_5/data/civ2/effects.ruleset Mon Jun  2 23:28:38 2014
@@ -329,7 +329,7 @@
 
 [effect_trade_routes]
 type= Max_Trade_Routes
-value   = 4
+value   = 3
 
 [effect_republic]
 type= Make_Content_Mil


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


[Freeciv-commits] r25026 - in /branches/S2_5/data: civ1/ civ2/ classic/ experimental/ multiplayer/

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  2 23:28:45 2014
New Revision: 25026

URL: http://svn.gna.org/viewcvs/freeciv?rev=25026view=rev
Log:
Tweak Barracks effect exclusions so that in the rare case older
buildings coexist with newer ones, the older ones are treated as
redundant in the UI.

See gna bug #22080.

Modified:
branches/S2_5/data/civ1/effects.ruleset
branches/S2_5/data/civ2/effects.ruleset
branches/S2_5/data/classic/effects.ruleset
branches/S2_5/data/experimental/effects.ruleset
branches/S2_5/data/multiplayer/effects.ruleset

Modified: branches/S2_5/data/civ1/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/effects.ruleset?rev=25026r1=25025r2=25026view=diff
==
--- branches/S2_5/data/civ1/effects.ruleset (original)
+++ branches/S2_5/data/civ1/effects.ruleset Mon Jun  2 23:28:45 2014
@@ -571,6 +571,11 @@
 { type, name, range
   Building, Barracks, City
 }
+nreqs   =
+{ type, name, range
+  Building, Barracks II, City
+  Building, Barracks III, City
+}
 
 [effect_barracks_ii]
 type= Veteran_Build
@@ -581,7 +586,7 @@
 }
 nreqs   =
 { type, name, range
-  Building, Barracks, City
+  Building, Barracks III, City
 }
 
 [effect_barracks_iii]
@@ -590,11 +595,6 @@
 reqs   =
 { type, name, range
   Building, Barracks III, City
-}
-nreqs   =
-{ type, name, range
-  Building, Barracks, City
-  Building, Barracks II, City
 }
 
 [effect_cathedral]

Modified: branches/S2_5/data/civ2/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/effects.ruleset?rev=25026r1=25025r2=25026view=diff
==
--- branches/S2_5/data/civ2/effects.ruleset (original)
+++ branches/S2_5/data/civ2/effects.ruleset Mon Jun  2 23:28:45 2014
@@ -939,6 +939,8 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
+  Building, Barracks II, City
+  Building, Barracks III, City
 }
 
 [effect_barracks_1]
@@ -949,6 +951,11 @@
   Building, Barracks, City
   UnitClass, Land, Local
 }
+nreqs   =
+{ type, name, range
+  Building, Barracks II, City
+  Building, Barracks III, City
+}
 
 [effect_barracks_ii]
 type= Veteran_Build
@@ -962,7 +969,7 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
-  Building, Barracks, City
+  Building, Barracks III, City
 }
 
 [effect_barracks_ii_1]
@@ -973,6 +980,10 @@
   Building, Barracks II, City
   UnitClass, Land, Local
 }
+nreqs   =
+{ type, name, range
+  Building, Barracks III, City
+}
 
 [effect_barracks_iii]
 type= Veteran_Build
@@ -986,8 +997,6 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
-  Building, Barracks, City
-  Building, Barracks II, City
 }
 
 [effect_barracks_iii_1]

Modified: branches/S2_5/data/classic/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/effects.ruleset?rev=25026r1=25025r2=25026view=diff
==
--- branches/S2_5/data/classic/effects.ruleset  (original)
+++ branches/S2_5/data/classic/effects.ruleset  Mon Jun  2 23:28:45 2014
@@ -821,6 +821,8 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
+  Building, Barracks II, City
+  Building, Barracks III, City
 }
 
 [effect_barracks_1]
@@ -831,6 +833,11 @@
   Building, Barracks, City
   UnitClass, Land, Local
 }
+nreqs   =
+{ type, name, range
+  Building, Barracks II, City
+  Building, Barracks III, City
+}
 
 [effect_barracks_ii]
 type= Veteran_Build
@@ -844,7 +851,7 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
-  Building, Barracks, City
+  Building, Barracks III, City
 }
 
 [effect_barracks_ii_1]
@@ -855,6 +862,10 @@
   Building, Barracks II, City
   UnitClass, Land, Local
 }
+nreqs   =
+{ type, name, range
+  Building, Barracks III, City
+}
 
 [effect_barracks_iii]
 type= Veteran_Build
@@ -868,8 +879,6 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
-  Building, Barracks, City
-  Building, Barracks II, City
 }
 
 [effect_barracks_iii_1]

Modified: branches/S2_5/data/experimental/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/effects.ruleset?rev=25026r1=25025r2=25026view=diff
==
--- branches/S2_5/data/experimental/effects.ruleset (original)
+++ branches/S2_5/data/experimental/effects.ruleset Mon Jun  2 23:28:45 2014
@@ -898,6 +898,8 @@
 { type, name, 

[Freeciv-commits] r25032 - in /trunk: ai/default/aicity.c common/effects.c common/effects.h

2014-06-02 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun  3 00:33:25 2014
New Revision: 25032

URL: http://svn.gna.org/viewcvs/freeciv?rev=25032view=rev
Log:
Logic that checks whether an effect is prevented (in AI and UI) now
checks present=FALSE requirements as well as nreqs.

Reported by Emmet Hikory (persia@gna).

See gna bug #21992.

Modified:
trunk/ai/default/aicity.c
trunk/common/effects.c
trunk/common/effects.h

Modified: trunk/ai/default/aicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aicity.c?rev=25032r1=25031r2=25032view=diff
==
--- trunk/ai/default/aicity.c   (original)
+++ trunk/ai/default/aicity.c   Tue Jun  3 00:33:25 2014
@@ -1920,11 +1920,11 @@
 bool present = TRUE;
 bool impossible_to_get = FALSE;
 
-if (is_effect_disabled(pplayer, NULL, pcity, pimprove,
-  NULL, NULL, NULL, NULL,
-  peffect, RPT_CERTAIN)) {
-  /* We believe that effect if disabled only if there is no change that it
-   * is not. This should lead AI using wider spectrum of improvements.
+if (is_effect_prevented(pplayer, NULL, pcity, pimprove,
+NULL, NULL, NULL, NULL,
+peffect, RPT_CERTAIN)) {
+  /* We believe that effect is disabled only if there is no chance that it
+   * is not. This should lead to AI using wider spectrum of improvements.
*
* TODO: Select between RPT_POSSIBLE and RPT_CERTAIN dynamically
* depending how much AI can take risks. */

Modified: trunk/common/effects.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/effects.c?rev=25032r1=25031r2=25032view=diff
==
--- trunk/common/effects.c  (original)
+++ trunk/common/effects.c  Tue Jun  3 00:33:25 2014
@@ -445,25 +445,39 @@
 
 /**
   Return TRUE iff any of the disabling requirements for this effect are
-  active (an effect is active if all of its enabling requirements and
-  none of its disabling ones are active).
-**/
-bool is_effect_disabled(const struct player *target_player,
-   const struct player *other_player,
-   const struct city *target_city,
-   const struct impr_type *target_building,
-   const struct tile *target_tile,
-   const struct unit_type *target_unittype,
-   const struct output_type *target_output,
-   const struct specialist *target_specialist,
-   const struct effect *peffect,
-const enum   req_problem_type prob_type)
-{
+  active, which would prevent it from taking effect.
+  (Assumes that any requirement specified in the ruleset with a negative
+  sense is an impediment.)
+**/
+bool is_effect_prevented(const struct player *target_player,
+ const struct player *other_player,
+ const struct city *target_city,
+ const struct impr_type *target_building,
+ const struct tile *target_tile,
+ const struct unit_type *target_unittype,
+ const struct output_type *target_output,
+ const struct specialist *target_specialist,
+ const struct effect *peffect,
+ const enum   req_problem_type prob_type)
+{
+  requirement_list_iterate(peffect-reqs, preq) {
+/* Only check present=FALSE requirements; these will return _FALSE_
+ * from is_req_active() if met, and need reversed prob_type */
+if (!preq-present
+ !is_req_active(target_player, other_player, target_city,
+  target_building, target_tile, target_unittype,
+  target_output, target_specialist,
+  preq, REVERSED_RPT(prob_type))) {
+  return TRUE;
+}
+  } requirement_list_iterate_end;
   requirement_list_iterate(peffect-nreqs, preq) {
-if (is_req_active(target_player, other_player, target_city,
-  target_building, target_tile, target_unittype,
-  target_output, target_specialist,
- preq, prob_type)) {
+/* Only check present=TRUE nreqs */
+if (preq-present
+ is_req_active(target_player, other_player, target_city,
+ target_building, target_tile, target_unittype,
+ target_output, target_specialist,
+ preq, prob_type)) {
   return TRUE;
 }
   } requirement_list_iterate_end;
@@ -471,36 +485,9 @@
 }
 
 

[Freeciv-commits] r25040 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-03 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun  3 21:54:24 2014
New Revision: 25040

URL: http://svn.gna.org/viewcvs/freeciv?rev=25040view=rev
Log:
Improve documentation of road and base ruleset definitions, especially
cross-referencing.

See gna bug #22120.

Modified:
trunk/data/alien/techs.ruleset
trunk/data/alien/terrain.ruleset
trunk/data/civ1/terrain.ruleset
trunk/data/civ2/terrain.ruleset
trunk/data/civ2civ3/techs.ruleset
trunk/data/civ2civ3/terrain.ruleset
trunk/data/classic/techs.ruleset
trunk/data/classic/terrain.ruleset
trunk/data/experimental/techs.ruleset
trunk/data/experimental/terrain.ruleset
trunk/data/multiplayer/techs.ruleset
trunk/data/multiplayer/terrain.ruleset

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

Modified: trunk/data/alien/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/techs.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/terrain.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/terrain.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/civ2civ3/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/techs.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/classic/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/techs.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/experimental/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/techs.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/multiplayer/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/techs.ruleset?rev=25040r1=25039r2=25040view=diff

Modified: trunk/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=25040r1=25039r2=25040view=diff


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


[Freeciv-commits] r25039 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-03 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun  3 21:54:21 2014
New Revision: 25039

URL: http://svn.gna.org/viewcvs/freeciv?rev=25039view=rev
Log:
Fix cross-references in ruleset comments from 'default' to 'classic'
ruleset, and other tweaks.

See gna bug #22119.

Modified:
trunk/data/alien/units.ruleset
trunk/data/civ1/nations.ruleset
trunk/data/civ1/techs.ruleset
trunk/data/civ1/units.ruleset
trunk/data/civ2/nations.ruleset
trunk/data/civ2/techs.ruleset
trunk/data/civ2/units.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25039r1=25038r2=25039view=diff
==
--- trunk/data/alien/units.ruleset  (original)
+++ trunk/data/alien/units.ruleset  Tue Jun  3 21:54:21 2014
@@ -257,7 +257,7 @@
 ; AddToCity  = can disband to add a single point of population to a city
 ;(see cities.ruleset for limitation of this ability)
 ; Fanatic= can only be built by governments that allow them
-;(see data/civ2/governments.ruleset, Fanaticism government)
+;(see civ2/governments.ruleset, Fundamentalism government)
 ; Unique = a player can only have one of these units in the game at
 ;the same time; barbarians cannot use this at present
 ; GameLoss   = losing one of these units means you lose the game, but it

Modified: trunk/data/civ1/nations.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/nations.ruleset?rev=25039r1=25038r2=25039view=diff
==
--- trunk/data/civ1/nations.ruleset (original)
+++ trunk/data/civ1/nations.ruleset Tue Jun  3 21:54:21 2014
@@ -7,7 +7,8 @@
 ; command rulesetdir mysubdir in the server to have freeciv
 ; use your new customized file.
 
-; See data/default/nations.ruleset for more information.
+; See classic/nations.ruleset and default/nationlist.ruleset for more
+; information.
 
 [datafile]
 description=Civ1-equivalent nations data for Freeciv

Modified: trunk/data/civ1/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/techs.ruleset?rev=25039r1=25038r2=25039view=diff
==
--- trunk/data/civ1/techs.ruleset   (original)
+++ trunk/data/civ1/techs.ruleset   Tue Jun  3 21:54:21 2014
@@ -40,7 +40,7 @@
 ; root_req  = advance required before acquiring this one, inherited
 ; by all techs that require this tech in turn unless
 ; None is given explicitly
-; flags = special flag strings (see default/techs.ruleset)
+; flags = special flag strings (see classic/techs.ruleset)
 ; graphic   = icon for technology
 ; graphic_alt   = alternate icon
 ; helptext = optional help text string (set units ruleset for examples)

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25039r1=25038r2=25039view=diff
==
--- trunk/data/civ1/units.ruleset   (original)
+++ trunk/data/civ1/units.ruleset   Tue Jun  3 21:54:21 2014
@@ -7,7 +7,7 @@
 ; command rulesetdir mysubdir in the server to have freeciv
 ; use your new customized file.
 
-; See data/classic/units.ruleset for more information.
+; See classic/units.ruleset for more information.
 
 [datafile]
 description=Civ1-style unit_type data for Freeciv

Modified: trunk/data/civ2/nations.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/nations.ruleset?rev=25039r1=25038r2=25039view=diff
==
--- trunk/data/civ2/nations.ruleset (original)
+++ trunk/data/civ2/nations.ruleset Tue Jun  3 21:54:21 2014
@@ -7,7 +7,8 @@
 ; command rulesetdir mysubdir in the server to have freeciv
 ; use your new customized file.
 
-; See data/default/nations.ruleset for more information.
+; See classic/nations.ruleset and default/nationlist.ruleset for more
+; information.
 
 ; Note: The list is based on Civ2-ToT.
 

Modified: trunk/data/civ2/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/techs.ruleset?rev=25039r1=25038r2=25039view=diff
==
--- trunk/data/civ2/techs.ruleset   (original)
+++ trunk/data/civ2/techs.ruleset   Tue Jun  3 21:54:21 2014
@@ -40,7 +40,7 @@
 ; root_req  = advance required before acquiring this one, inherited
 ; by all techs that require this tech in turn unless
 ; None is given explicitly
-; flags = special flag strings (see default/techs.ruleset)
+; 

[Freeciv-commits] r25041 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-03 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun  3 21:55:36 2014
New Revision: 25041

URL: http://svn.gna.org/viewcvs/freeciv?rev=25041view=rev
Log:
Document numbers of user ruleset flags available, and generally improve
user flag documentation.

See gna bug #22118.

Modified:
branches/S2_5/data/alien/techs.ruleset
branches/S2_5/data/alien/terrain.ruleset
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ1/techs.ruleset
branches/S2_5/data/civ1/terrain.ruleset
branches/S2_5/data/civ1/units.ruleset
branches/S2_5/data/civ2/techs.ruleset
branches/S2_5/data/civ2/terrain.ruleset
branches/S2_5/data/civ2/units.ruleset
branches/S2_5/data/civ2civ3/techs.ruleset
branches/S2_5/data/civ2civ3/terrain.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/techs.ruleset
branches/S2_5/data/classic/terrain.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/techs.ruleset
branches/S2_5/data/experimental/terrain.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/techs.ruleset
branches/S2_5/data/multiplayer/terrain.ruleset
branches/S2_5/data/multiplayer/units.ruleset

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

Modified: branches/S2_5/data/alien/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ1/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ2/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ2civ3/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/classic/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/experimental/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/multiplayer/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/techs.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/terrain.ruleset?rev=25041r1=25040r2=25041view=diff

Modified: branches/S2_5/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/units.ruleset?rev=25041r1=25040r2=25041view=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org

[Freeciv-commits] r25043 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-03 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun  3 21:55:44 2014
New Revision: 25043

URL: http://svn.gna.org/viewcvs/freeciv?rev=25043view=rev
Log:
Improve documentation of road and base ruleset definitions, especially
cross-referencing.

See gna bug #22120.

Modified:
branches/S2_5/data/alien/techs.ruleset
branches/S2_5/data/alien/terrain.ruleset
branches/S2_5/data/civ1/terrain.ruleset
branches/S2_5/data/civ2/terrain.ruleset
branches/S2_5/data/civ2civ3/techs.ruleset
branches/S2_5/data/civ2civ3/terrain.ruleset
branches/S2_5/data/classic/techs.ruleset
branches/S2_5/data/classic/terrain.ruleset
branches/S2_5/data/experimental/techs.ruleset
branches/S2_5/data/experimental/terrain.ruleset
branches/S2_5/data/multiplayer/techs.ruleset
branches/S2_5/data/multiplayer/terrain.ruleset

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

Modified: branches/S2_5/data/alien/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/techs.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/terrain.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/terrain.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/terrain.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/civ2civ3/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/techs.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/terrain.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/classic/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/techs.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/terrain.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/experimental/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/techs.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/terrain.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/multiplayer/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/techs.ruleset?rev=25043r1=25042r2=25043view=diff

Modified: branches/S2_5/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/terrain.ruleset?rev=25043r1=25042r2=25043view=diff


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


[Freeciv-commits] r25042 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-03 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun  3 21:55:40 2014
New Revision: 25042

URL: http://svn.gna.org/viewcvs/freeciv?rev=25042view=rev
Log:
Fix cross-references in ruleset comments from 'default' to 'classic'
ruleset, and other tweaks.

See gna bug #22119.

Modified:
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ1/nations.ruleset
branches/S2_5/data/civ1/techs.ruleset
branches/S2_5/data/civ1/units.ruleset
branches/S2_5/data/civ2/nations.ruleset
branches/S2_5/data/civ2/techs.ruleset
branches/S2_5/data/civ2/units.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25042r1=25041r2=25042view=diff
==
--- branches/S2_5/data/alien/units.ruleset  (original)
+++ branches/S2_5/data/alien/units.ruleset  Tue Jun  3 21:55:40 2014
@@ -254,7 +254,7 @@
 ; AddToCity  = can disband to add a single point of population to a city
 ;(see cities.ruleset for limitation of this ability)
 ; Fanatic= can only be built by governments that allow them
-;(see data/civ2/governments.ruleset, Fanaticism government)
+;(see civ2/governments.ruleset, Fundamentalism government)
 ; Unique = a player can only have one of these units in the game at
 ;the same time; barbarians cannot use this at present
 ; GameLoss   = losing one of these units means you lose the game, but it

Modified: branches/S2_5/data/civ1/nations.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/nations.ruleset?rev=25042r1=25041r2=25042view=diff
==
--- branches/S2_5/data/civ1/nations.ruleset (original)
+++ branches/S2_5/data/civ1/nations.ruleset Tue Jun  3 21:55:40 2014
@@ -7,7 +7,8 @@
 ; command rulesetdir mysubdir in the server to have freeciv
 ; use your new customized file.
 
-; See data/default/nations.ruleset for more information.
+; See classic/nations.ruleset and default/nationlist.ruleset for more
+; information.
 
 [datafile]
 description=Civ1-equivalent nations data for Freeciv

Modified: branches/S2_5/data/civ1/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/techs.ruleset?rev=25042r1=25041r2=25042view=diff
==
--- branches/S2_5/data/civ1/techs.ruleset   (original)
+++ branches/S2_5/data/civ1/techs.ruleset   Tue Jun  3 21:55:40 2014
@@ -40,7 +40,7 @@
 ; root_req  = advance required before acquiring this one, inherited
 ; by all techs that require this tech in turn unless
 ; None is given explicitly
-; flags = special flag strings (see default/techs.ruleset)
+; flags = special flag strings (see classic/techs.ruleset)
 ; graphic   = icon for technology
 ; graphic_alt   = alternate icon
 ; helptext = optional help text string (set units ruleset for examples)

Modified: branches/S2_5/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25042r1=25041r2=25042view=diff
==
--- branches/S2_5/data/civ1/units.ruleset   (original)
+++ branches/S2_5/data/civ1/units.ruleset   Tue Jun  3 21:55:40 2014
@@ -7,7 +7,7 @@
 ; command rulesetdir mysubdir in the server to have freeciv
 ; use your new customized file.
 
-; See data/classic/units.ruleset for more information.
+; See classic/units.ruleset for more information.
 
 [datafile]
 description=Civ1-style unit_type data for Freeciv

Modified: branches/S2_5/data/civ2/nations.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/nations.ruleset?rev=25042r1=25041r2=25042view=diff
==
--- branches/S2_5/data/civ2/nations.ruleset (original)
+++ branches/S2_5/data/civ2/nations.ruleset Tue Jun  3 21:55:40 2014
@@ -7,7 +7,8 @@
 ; command rulesetdir mysubdir in the server to have freeciv
 ; use your new customized file.
 
-; See data/default/nations.ruleset for more information.
+; See classic/nations.ruleset and default/nationlist.ruleset for more
+; information.
 
 ; Note: The list is based on Civ2-ToT.
 

Modified: branches/S2_5/data/civ2/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/techs.ruleset?rev=25042r1=25041r2=25042view=diff
==
--- branches/S2_5/data/civ2/techs.ruleset   (original)
+++ branches/S2_5/data/civ2/techs.ruleset   Tue Jun  3 21:55:40 2014

[Freeciv-commits] r25073 - /trunk/data/experimental/units.ruleset

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:43:08 2014
New Revision: 25073

URL: http://svn.gna.org/viewcvs/freeciv?rev=25073view=rev
Log:
Correct experimental Partisan description to reflect partisan appearance
based on nationality.

See gna bug #22141.

Modified:
trunk/data/experimental/units.ruleset

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25073r1=25072r2=25073view=diff
==
--- trunk/data/experimental/units.ruleset   (original)
+++ trunk/data/experimental/units.ruleset   Sat Jun  7 11:43:08 2014
@@ -733,7 +733,7 @@
  city -- they automatically assume defensive positions in the\
  surrounding countryside -- but only under these conditions:\n\
  - Guerilla Warfare must be known by at least one player.\n\
- - You must be the player who originally built the city.\n\
+ - At least three quarters of the citizens must have your nationality.\n\
  - You must know about Communism and Gunpowder.\n\
  - You must run either a Democracy or a Communist government.\
 )


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


[Freeciv-commits] r25074 - /trunk/server/unithand.c

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:43:10 2014
New Revision: 25074

URL: http://svn.gna.org/viewcvs/freeciv?rev=25074view=rev
Log:
Fix MR_CANNOT_DISEMBARK message to mention unloading in cities.

See gna bug #22142.

Modified:
trunk/server/unithand.c

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=25074r1=25073r2=25074view=diff
==
--- trunk/server/unithand.c (original)
+++ trunk/server/unithand.c Sat Jun  7 11:43:10 2014
@@ -1458,11 +1458,11 @@
 
   case MR_CANNOT_DISEMBARK:
 notify_player(unit_owner(punit), src_tile, E_BAD_COMMAND, ftc_server,
-  _(%s cannot disembark without a native base for 
-%s on the tile.),
-unit_link(punit),
-utype_name_translation(
-unit_type(unit_transport_get(punit;
+  _(%s cannot disembark outside of a city or a native base 
+for %s.),
+  unit_link(punit),
+  utype_name_translation(
+  unit_type(unit_transport_get(punit;
 break;
 
   case MR_NON_NATIVE_MOVE:


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


[Freeciv-commits] r25075 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:43:13 2014
New Revision: 25075

URL: http://svn.gna.org/viewcvs/freeciv?rev=25075view=rev
Log:
Improve ruleset comments for Unreachable/embarks/disembarks.

See gna patch #4773.

Modified:
trunk/data/alien/units.ruleset
trunk/data/civ1/units.ruleset
trunk/data/civ2/units.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25075r1=25074r2=25075view=diff
==
--- trunk/data/alien/units.ruleset  (original)
+++ trunk/data/alien/units.ruleset  Sat Jun  7 11:43:13 2014
@@ -75,8 +75,11 @@
 ; CanOccupyCity  = Military units of this class can occupy enemy cities
 ; Missile= Unit is destroyed when it attacks
 ; BuildAnywhere  = Unit can be built even in the middle of non-native terrain
-; Unreachable= Unit can be attacked only by units with AttackAny flag 
or on
-;city or airbase
+; Unreachable= Unit can be attacked only by units explicitly listing this
+;class in its 'targets', unless on a city or native base.
+;For class members which are transports, cargo cannot load/
+;unload except in a city or native base, unless that unit
+;explicitly lists this class in its 'embarks'/'disembarks'.
 ; CollectRansom  = Unit can collect ransom when killing lone barbarian leader
 ; ZOC= Unit is subject to ZOC rules. Unit type flag IgZOC can
 ;override this
@@ -187,10 +190,12 @@
 ; city_size = Initial size of the cities Settlers type unit builds
 ; targets   = list of unit classes this unit can attack against even
 ; if they have Unreachable unit class flag
-; embarks   = list of unit classes this unit may embark upon even if they
-; have Unreachable unit class flag and are not in native base
-; disembarks= list of unit classes this unit may disembark from even if 
they
-; have Unreachable unit class flag and are not in native base
+; embarks   = list of unit classes this unit may load into while not in
+; native base or city even if transporter has Unreachable unit
+; class flag
+; disembarks= list of unit classes this unit may unload from while not in
+; native base or city even if transporter has Unreachable unit
+; class flag
 ; bonuses   = definitions of combat bonuses against specific other units
 ; bonuses.flag  = flag of the unit that bonus applies against
 ; bonuses.type  = type of the bonus. See below

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25075r1=25074r2=25075view=diff
==
--- trunk/data/civ1/units.ruleset   (original)
+++ trunk/data/civ1/units.ruleset   Sat Jun  7 11:43:13 2014
@@ -84,8 +84,11 @@
 ; CanOccupyCity = Military units of this class can occupy enemy cities
 ; Missile   = Unit is destroyed when it attacks
 ; BuildAnywhere = Unit can be built even in the middle of non-native terrain
-; Unreachable   = Unit can be attacked only by units explicitly listing this 
class as target
-;   or on city or airbase
+; Unreachable   = Unit can be attacked only by units explicitly listing this
+;   class in its 'targets', unless on a city or native base.
+;   For class members which are transports, cargo cannot load/
+;   unload except in a city or native base, unless that unit
+;   explicitly lists this class in its 'embarks'/'disembarks'.
 ; CollectRansom = Unit can collect ransom when killing lone barbarian leader
 ; ZOC   = Unit is subject to ZOC rules. Unit type flag IgZOC can
 ;   override this
@@ -178,10 +181,12 @@
 ; city_size = Initial size of the cities Settlers type unit builds
 ; targets   = list of unit classes this unit can attack against even
 ; if they have Unreachable unit class flag
-; embarks   = list of unit classes this unit may embark upon even if they
-; have Unreachable unit class flag and are not in native base
-; disembarks= list of unit classes this unit may disembark from even if 
they
-; have Unreachable unit class flag and are not in native base
+; embarks   = list of unit classes this unit may load into while not in
+; native base or city even if transporter has Unreachable unit
+; class flag
+; disembarks= list of unit classes this unit may unload from while not in
+; native 

[Freeciv-commits] r25076 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:47:48 2014
New Revision: 25076

URL: http://svn.gna.org/viewcvs/freeciv?rev=25076view=rev
Log:
*Correctly* document limits on tech and terrain user flags.

See gna bug #22118.

Modified:
branches/S2_5/data/alien/techs.ruleset
branches/S2_5/data/alien/terrain.ruleset
branches/S2_5/data/civ1/techs.ruleset
branches/S2_5/data/civ1/terrain.ruleset
branches/S2_5/data/civ2/techs.ruleset
branches/S2_5/data/civ2/terrain.ruleset
branches/S2_5/data/civ2civ3/techs.ruleset
branches/S2_5/data/civ2civ3/terrain.ruleset
branches/S2_5/data/classic/techs.ruleset
branches/S2_5/data/classic/terrain.ruleset
branches/S2_5/data/experimental/techs.ruleset
branches/S2_5/data/experimental/terrain.ruleset
branches/S2_5/data/multiplayer/techs.ruleset
branches/S2_5/data/multiplayer/terrain.ruleset

Modified: branches/S2_5/data/alien/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/techs.ruleset?rev=25076r1=25075r2=25076view=diff
==
--- branches/S2_5/data/alien/techs.ruleset  (original)
+++ branches/S2_5/data/alien/techs.ruleset  Sat Jun  7 11:47:48 2014
@@ -5,7 +5,7 @@
 options=+Freeciv-2.5-ruleset
 
 [control]
-; Names for custom tech flags. There can be up to 7 of these.
+; Names for custom tech flags. There can be up to 8 of these.
 ; name  = rule name; not translateable, but may be displayed in
 ; some circumstances
 ; helptxt   = displayed in the help for advances with this flag

Modified: branches/S2_5/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/terrain.ruleset?rev=25076r1=25075r2=25076view=diff
==
--- branches/S2_5/data/alien/terrain.ruleset(original)
+++ branches/S2_5/data/alien/terrain.rulesetSat Jun  7 11:47:48 2014
@@ -5,7 +5,7 @@
 options=+Freeciv-2.5-ruleset
 
 [control]
-; Names for custom terrain flags. There can be up to 7 of these.
+; Names for custom terrain flags. There can be up to 8 of these.
 ; name  = rule name; not translateable, but may be displayed in
 ; some circumstances
 ; helptxt   = displayed in the help for terrains with this flag

Modified: branches/S2_5/data/civ1/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/techs.ruleset?rev=25076r1=25075r2=25076view=diff
==
--- branches/S2_5/data/civ1/techs.ruleset   (original)
+++ branches/S2_5/data/civ1/techs.ruleset   Sat Jun  7 11:47:48 2014
@@ -12,7 +12,7 @@
 options=+Freeciv-2.5-ruleset
 
 [control]
-; Names for custom tech flags. There can be up to 7 of these.
+; Names for custom tech flags. There can be up to 8 of these.
 ; name  = rule name; not translateable, but may be displayed in
 ; some circumstances
 ; helptxt   = displayed in the help for advances with this flag

Modified: branches/S2_5/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/terrain.ruleset?rev=25076r1=25075r2=25076view=diff
==
--- branches/S2_5/data/civ1/terrain.ruleset (original)
+++ branches/S2_5/data/civ1/terrain.ruleset Sat Jun  7 11:47:48 2014
@@ -15,7 +15,7 @@
 options=+Freeciv-2.5-ruleset
 
 [control]
-; Names for custom terrain flags. There can be up to 7 of these.
+; Names for custom terrain flags. There can be up to 8 of these.
 ; name  = rule name; not translateable, but may be displayed in
 ; some circumstances
 ; helptxt   = displayed in the help for terrains with this flag

Modified: branches/S2_5/data/civ2/techs.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/techs.ruleset?rev=25076r1=25075r2=25076view=diff
==
--- branches/S2_5/data/civ2/techs.ruleset   (original)
+++ branches/S2_5/data/civ2/techs.ruleset   Sat Jun  7 11:47:48 2014
@@ -12,7 +12,7 @@
 options=+Freeciv-2.5-ruleset
 
 [control]
-; Names for custom tech flags. There can be up to 7 of these.
+; Names for custom tech flags. There can be up to 8 of these.
 ; name  = rule name; not translateable, but may be displayed in
 ; some circumstances
 ; helptxt   = displayed in the help for advances with this flag

Modified: branches/S2_5/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/terrain.ruleset?rev=25076r1=25075r2=25076view=diff
==
--- branches/S2_5/data/civ2/terrain.ruleset (original)
+++ branches/S2_5/data/civ2/terrain.ruleset Sat Jun  7 11:47:48 2014
@@ -15,7 +15,7 @@
 

[Freeciv-commits] r25077 - /branches/S2_5/server/unittools.c

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:47:52 2014
New Revision: 25077

URL: http://svn.gna.org/viewcvs/freeciv?rev=25077view=rev
Log:
Remove redundant check for existing mine while executing orders.
No functional effect.

See gna bug #22137.

Modified:
branches/S2_5/server/unittools.c

Modified: branches/S2_5/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unittools.c?rev=25077r1=25076r2=25077view=diff
==
--- branches/S2_5/server/unittools.c(original)
+++ branches/S2_5/server/unittools.cSat Jun  7 11:47:52 2014
@@ -3818,9 +3818,7 @@
|| (ACTIVITY_IRRIGATE == activity
 (tile_has_special(unit_tile(punit), S_FARMLAND)
|| tile_has_special(unit_tile(punit),
-   S_IRRIGATION)))
-   || (ACTIVITY_MINE == activity
-tile_has_special(unit_tile(punit), S_MINE))) {
+   S_IRRIGATION {
   break; /* Already built, let's continue. */
 }
   }


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


[Freeciv-commits] r25078 - /branches/S2_5/data/experimental/units.ruleset

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:47:54 2014
New Revision: 25078

URL: http://svn.gna.org/viewcvs/freeciv?rev=25078view=rev
Log:
Correct experimental Partisan description to reflect partisan appearance
based on nationality.

See gna bug #22141.

Modified:
branches/S2_5/data/experimental/units.ruleset

Modified: branches/S2_5/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25078r1=25077r2=25078view=diff
==
--- branches/S2_5/data/experimental/units.ruleset   (original)
+++ branches/S2_5/data/experimental/units.ruleset   Sat Jun  7 11:47:54 2014
@@ -730,7 +730,7 @@
  city -- they automatically assume defensive positions in the\
  surrounding countryside -- but only under these conditions:\n\
  - Guerilla Warfare must be known by at least one player.\n\
- - You must be the player who originally built the city.\n\
+ - At least three quarters of the citizens must have your nationality.\n\
  - You must know about Communism and Gunpowder.\n\
  - You must run either a Democracy or a Communist government.\
 )


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


[Freeciv-commits] r25080 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:48:00 2014
New Revision: 25080

URL: http://svn.gna.org/viewcvs/freeciv?rev=25080view=rev
Log:
Improve ruleset comments for Unreachable/embarks/disembarks.

See gna patch #4773.

Modified:
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ1/units.ruleset
branches/S2_5/data/civ2/units.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25080r1=25079r2=25080view=diff
==
--- branches/S2_5/data/alien/units.ruleset  (original)
+++ branches/S2_5/data/alien/units.ruleset  Sat Jun  7 11:48:00 2014
@@ -75,8 +75,11 @@
 ; CanOccupyCity  = Military units of this class can occupy enemy cities
 ; Missile= Unit is destroyed when it attacks
 ; BuildAnywhere  = Unit can be built even in the middle of non-native terrain
-; Unreachable= Unit can be attacked only by units with AttackAny flag 
or on
-;city or airbase
+; Unreachable= Unit can be attacked only by units explicitly listing this
+;class in its 'targets', unless on a city or native base.
+;For class members which are transports, cargo cannot load/
+;unload except in a city or native base, unless that unit
+;explicitly lists this class in its 'embarks'/'disembarks'.
 ; CollectRansom  = Unit can collect ransom when killing lone barbarian leader
 ; ZOC= Unit is subject to ZOC rules. Unit type flag IgZOC can
 ;override this
@@ -186,10 +189,12 @@
 ; city_size = Initial size of the cities Settlers type unit builds
 ; targets   = list of unit classes this unit can attack against even
 ; if they have Unreachable unit class flag
-; embarks   = list of unit classes this unit may embark upon even if they
-; have Unreachable unit class flag and are not in native base
-; disembarks= list of unit classes this unit may disembark from even if 
they
-; have Unreachable unit class flag and are not in native base
+; embarks   = list of unit classes this unit may load into while not in
+; native base or city even if transporter has Unreachable unit
+; class flag
+; disembarks= list of unit classes this unit may unload from while not in
+; native base or city even if transporter has Unreachable unit
+; class flag
 ; bonuses   = definitions of combat bonuses against specific other units
 ; bonuses.flag  = flag of the unit that bonus applies against
 ; bonuses.type  = type of the bonus. See below

Modified: branches/S2_5/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25080r1=25079r2=25080view=diff
==
--- branches/S2_5/data/civ1/units.ruleset   (original)
+++ branches/S2_5/data/civ1/units.ruleset   Sat Jun  7 11:48:00 2014
@@ -84,8 +84,11 @@
 ; CanOccupyCity = Military units of this class can occupy enemy cities
 ; Missile   = Unit is destroyed when it attacks
 ; BuildAnywhere = Unit can be built even in the middle of non-native terrain
-; Unreachable   = Unit can be attacked only by units explicitly listing this 
class as target
-;   or on city or airbase
+; Unreachable   = Unit can be attacked only by units explicitly listing this
+;   class in its 'targets', unless on a city or native base.
+;   For class members which are transports, cargo cannot load/
+;   unload except in a city or native base, unless that unit
+;   explicitly lists this class in its 'embarks'/'disembarks'.
 ; CollectRansom = Unit can collect ransom when killing lone barbarian leader
 ; ZOC   = Unit is subject to ZOC rules. Unit type flag IgZOC can
 ;   override this
@@ -177,10 +180,12 @@
 ; city_size = Initial size of the cities Settlers type unit builds
 ; targets   = list of unit classes this unit can attack against even
 ; if they have Unreachable unit class flag
-; embarks   = list of unit classes this unit may embark upon even if they
-; have Unreachable unit class flag and are not in native base
-; disembarks= list of unit classes this unit may disembark from even if 
they
-; have Unreachable unit class flag and are not in native base
+; embarks   = list of unit classes this unit may load into while not in
+; native base or city even if transporter has Unreachable unit
+;

[Freeciv-commits] r25079 - /branches/S2_5/server/unithand.c

2014-06-07 Thread 0jacobnk . gna
Author: jtn
Date: Sat Jun  7 11:47:57 2014
New Revision: 25079

URL: http://svn.gna.org/viewcvs/freeciv?rev=25079view=rev
Log:
Fix MR_CANNOT_DISEMBARK message to mention unloading in cities.

See gna bug #22142.

Modified:
branches/S2_5/server/unithand.c

Modified: branches/S2_5/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unithand.c?rev=25079r1=25078r2=25079view=diff
==
--- branches/S2_5/server/unithand.c (original)
+++ branches/S2_5/server/unithand.c Sat Jun  7 11:47:57 2014
@@ -1347,11 +1347,11 @@
 
   case MR_CANNOT_DISEMBARK:
 notify_player(unit_owner(punit), src_tile, E_BAD_COMMAND, ftc_server,
-  _(%s cannot disembark without a native base for 
-%s on the tile.),
-unit_link(punit),
-utype_name_translation(
-unit_type(unit_transport_get(punit;
+  _(%s cannot disembark outside of a city or a native base 
+for %s.),
+  unit_link(punit),
+  utype_name_translation(
+  unit_type(unit_transport_get(punit;
 break;
 
   default:


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


[Freeciv-commits] r25092 - /trunk/server/commands.c

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:14 2014
New Revision: 25092

URL: http://svn.gna.org/viewcvs/freeciv?rev=25092view=rev
Log:
Remove mention of /debug player command, which hasn't existed since
2005 (r9497).

See gna bug #22150.

Modified:
trunk/server/commands.c

Modified: trunk/server/commands.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/commands.c?rev=25092r1=25091r2=25092view=diff
==
--- trunk/server/commands.c (original)
+++ trunk/server/commands.c Mon Jun  9 10:46:14 2014
@@ -199,7 +199,6 @@
/* TRANS: translate text between  only */
N_(debug diplomacy player\n
   debug ferries\n
-  debug player player\n
   debug tech player\n
   debug city x y\n
   debug units x y\n


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


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

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:43 2014
New Revision: 25099

URL: http://svn.gna.org/viewcvs/freeciv?rev=25099view=rev
Log:
Fix various small icons that were offset by one pixel in r23178.

See gna bug #22157.

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=25099r1=25098r2=25099view=diff
==
Binary files - no diff available.


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


[Freeciv-commits] r25100 - in /trunk/data: hex2t/tiles.png isophex/darkness.png

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:47 2014
New Revision: 25100

URL: http://svn.gna.org/viewcvs/freeciv?rev=25100view=rev
Log:
Modify hex2t and isophex darkness sprites to cover whole tile, mainly as
an example of how to do it.
No visible effect (would have to set darkness_layer=1).

See gna patch #4657.

Modified:
trunk/data/hex2t/tiles.png
trunk/data/isophex/darkness.png

Modified: trunk/data/hex2t/tiles.png
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/hex2t/tiles.png?rev=25100r1=25099r2=25100view=diff
==
Binary files - no diff available.

Modified: trunk/data/isophex/darkness.png
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/isophex/darkness.png?rev=25100r1=25099r2=25100view=diff
==
Binary files - no diff available.


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


[Freeciv-commits] r25097 - in /trunk/data: civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:35 2014
New Revision: 25097

URL: http://svn.gna.org/viewcvs/freeciv?rev=25097view=rev
Log:
Rename AirUnit user flag to AirAttacker in supplied rulesets.
Remove it from AWACS to avoid spurious comments in help.

See gna bug #22155.

Modified:
trunk/data/civ2/units.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25097r1=25096r2=25097view=diff
==
--- trunk/data/civ2/units.ruleset   (original)
+++ trunk/data/civ2/units.ruleset   Mon Jun  9 10:46:35 2014
@@ -22,7 +22,7 @@
   { name, helptxt
 Airbase, _(Can build Airbases.) 
 Transform, _(Can transform terrain.)
-AirUnit, _(Very bad at attacking AEGIS.)
+AirAttacker, _(Very bad at attacking AEGIS.)
 Horse, _(Attack value halved when attacking Pikemen.)
 Helicopter, _(Defends very badly against Fighters.)
   }
@@ -1197,7 +1197,7 @@
  Helicopter, DefenseDivider, 1
  Helicopter, Firepower1, 1
}
-flags = AirUnit
+flags = AirAttacker
 roles = 
 helptext  = _(\
 Fighters are your first airborne units. They can\
@@ -1229,7 +1229,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, AirUnit
+flags = FieldUnit, OneAttack, AirAttacker
 roles = 
 helptext  = _(\
 Bombers are specialized airborne units that may\
@@ -1263,7 +1263,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, Helicopter, AirUnit
+flags = FieldUnit, OneAttack, Helicopter, AirAttacker
 roles = 
 helptext  = _(\
 The Helicopter is a very powerful unit, as it can both fly and\
@@ -1304,7 +1304,7 @@
  Helicopter, DefenseDivider, 1
  Helicopter, Firepower1, 1
}
-flags = AirUnit
+flags = AirAttacker
 roles = 
 helptext  = _(\
 An improved Fighter, with improved attack and a higher movement\
@@ -1336,7 +1336,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, AirUnit
+flags = FieldUnit, OneAttack, AirAttacker
 roles = 
 helptext  = _(\
 An improved Bomber, with improved attack and a higher movement\
@@ -1604,7 +1604,7 @@
 uk_gold   = 0
 bonuses   =
{ flag, type, value
- AirUnit, DefenseMultiplier, 4
+ AirAttacker, DefenseMultiplier, 4
}
 flags = BadCityDefender
 roles = 
@@ -1774,7 +1774,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, AirUnit
+flags = FieldUnit, OneAttack, AirAttacker
 roles = 
 helptext  = _(\
 The Cruise Missile is a long-distance missile\
@@ -1809,7 +1809,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, Nuclear, AirUnit
+flags = FieldUnit, OneAttack, Nuclear, AirAttacker
 roles = 
 helptext  = _(\
 You can build Nuclear units when you have the required advance, and\

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25097r1=25096r2=25097view=diff
==
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Mon Jun  9 10:46:35 2014
@@ -27,7 +27,7 @@
   { name, helptxt
 Airbase, _(Can build Airbases.) 
 Transform, _(Can transform terrain.)
-AirUnit, _(Very bad at attacking AEGIS.)
+AirAttacker, _(Very bad at attacking AEGIS.)
 Submarine, _(Attack value halved when attacking Destroyer)
 Unbribable, _(May not be bribed.)
   }
@@ -1387,7 +1387,7 @@
 uk_food   = 1
 uk_gold   = 1
 targets   = Air, Missile, Helicopter
-flags = AirUnit
+flags = AirAttacker
 roles = DefendOk
 helptext  = _(\
 Fighters are your first airborne units. They can\
@@ -1419,7 +1419,7 @@
 uk_shield = 1
 uk_food   = 1
 uk_gold   = 1
-flags = FieldUnit, OneAttack, AirUnit, Bombarder
+flags = FieldUnit, OneAttack, AirAttacker, Bombarder
 roles = 
 helptext  = _(\
 Bombers are specialized airborne units that may\
@@ -1454,7 +1454,7 @@
 uk_food   = 1
 uk_gold   = 1
 cargo = Land
-flags = OneAttack, AirUnit, Bombarder
+flags = OneAttack, AirAttacker, Bombarder
 roles = 
 helptext  = _(\
 The Helicopter can transport one unit of infantry, and it can bombard\
@@ -1490,7 +1490,7 @@
 uk_food   = 1
 uk_gold   = 1
 targets   = Air, Missile, Helicopter
-flags = Partial_Invis, AirUnit
+flags = Partial_Invis, AirAttacker
 roles = DefendGood
 

[Freeciv-commits] r25094 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:25 2014
New Revision: 25094

URL: http://svn.gna.org/viewcvs/freeciv?rev=25094view=rev
Log:
Update ruleset comments for move_fragments, plus generally clarify which
items use whole / fractional MP.

See gna bug #22151.

Modified:
trunk/data/alien/game.ruleset
trunk/data/alien/terrain.ruleset
trunk/data/alien/units.ruleset
trunk/data/civ1/game.ruleset
trunk/data/civ1/terrain.ruleset
trunk/data/civ1/units.ruleset
trunk/data/civ2/game.ruleset
trunk/data/civ2/terrain.ruleset
trunk/data/civ2/units.ruleset
trunk/data/civ2civ3/game.ruleset
trunk/data/civ2civ3/terrain.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/game.ruleset
trunk/data/classic/terrain.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/game.ruleset
trunk/data/experimental/terrain.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/game.ruleset
trunk/data/multiplayer/terrain.ruleset
trunk/data/multiplayer/units.ruleset

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

Modified: trunk/data/alien/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ1/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/experimental/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/multiplayer/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/game.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=25094r1=25093r2=25094view=diff

Modified: trunk/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=25094r1=25093r2=25094view=diff


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


[Freeciv-commits] r25096 - in /trunk: client/helpdata.c common/unit.c common/unittype.c common/unittype.h

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:32 2014
New Revision: 25096

URL: http://svn.gna.org/viewcvs/freeciv?rev=25096view=rev
Log:
Document embark/disembark restrictions and exceptions in autogenerated
unit help.

See gna bug #22143.

Modified:
trunk/client/helpdata.c
trunk/common/unit.c
trunk/common/unittype.c
trunk/common/unittype.h

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25096r1=25095r2=25096view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Mon Jun  9 10:46:32 2014
@@ -2895,9 +2895,143 @@
  utype-transport_capacity),
  utype-transport_capacity, astr_str(list));
 astr_free(list);
+if (uclass_has_flag(utype_class(utype), UCF_UNREACHABLE)) {
+  /* Document restrictions on when units can load/unload */
+  bool has_restricted_load = FALSE, has_unrestricted_load = FALSE,
+   has_restricted_unload = FALSE, has_unrestricted_unload = FALSE;
+  unit_type_iterate(pcargo) {
+if (can_unit_type_transport(utype, utype_class(pcargo))) {
+  if (utype_can_freely_load(pcargo, utype)) {
+has_unrestricted_load = TRUE;
+  } else {
+has_restricted_load = TRUE;
+  }
+  if (utype_can_freely_unload(pcargo, utype)) {
+has_unrestricted_unload = TRUE;
+  } else {
+has_restricted_unload = TRUE;
+  }
+}
+  } unit_type_iterate_end;
+  if (has_restricted_load) {
+if (has_unrestricted_load) {
+  /* At least one type of cargo can load onto us freely.
+   * The specific exceptions will be documented in cargo help. */
+  CATLSTR(buf, bufsz,
+  _(  * Some cargo cannot be loaded except in a city or a 
+base native to this transport.\n));
+} else {
+  /* No exceptions */
+  CATLSTR(buf, bufsz,
+  _(  * Cargo cannot be loaded except in a city or a 
+base native to this transport.\n));
+}
+  } /* else, no restricted cargo exists; keep quiet */
+  if (has_restricted_unload) {
+if (has_unrestricted_unload) {
+  /* At least one type of cargo can unload from us freely. */
+  CATLSTR(buf, bufsz,
+  _(  * Some cargo cannot be unloaded except in a city or a 
+base native to this transport.\n));
+} else {
+  /* No exceptions */
+  CATLSTR(buf, bufsz,
+  _(  * Cargo cannot be unloaded except in a city or a 
+base native to this transport.\n));
+}
+  } /* else, no restricted cargo exists; keep quiet */
+}
   }
   if (utype_has_flag(utype, UTYF_TRIREME)) {
 CATLSTR(buf, bufsz, _(* Must stay next to coast.\n));
+  }
+  {
+/* Document exceptions to embark/disembark restrictions that we
+ * have as cargo. */
+bv_unit_classes embarks, disembarks;
+BV_CLR_ALL(embarks);
+BV_CLR_ALL(disembarks);
+/* Determine which of our transport classes have restrictions in the first
+ * place (that is, contain at least one transport which carries at least
+ * one type of cargo which is restricted).
+ * We'll suppress output for classes not in this set, since this cargo
+ * type is not behaving exceptionally in such cases. */
+unit_type_iterate(utrans) {
+  const Unit_Class_id trans_class = uclass_index(utype_class(utrans));
+  /* Don't waste time repeating checks on classes we've already checked,
+   * or weren't under consideration in the first place */
+  if (!BV_ISSET(embarks, trans_class)
+   BV_ISSET(utype-embarks, trans_class)) {
+unit_type_iterate(other_cargo) {
+  if (can_unit_type_transport(utrans, utype_class(other_cargo))
+   !utype_can_freely_load(other_cargo, utrans)) {
+/* At least one load restriction in transport class, which
+ * we aren't subject to */
+BV_SET(embarks, trans_class);
+  }
+} unit_type_iterate_end; /* cargo */
+  }
+  if (!BV_ISSET(disembarks, trans_class)
+   BV_ISSET(utype-disembarks, trans_class)) {
+unit_type_iterate(other_cargo) {
+  if (can_unit_type_transport(utrans, utype_class(other_cargo))
+   !utype_can_freely_unload(other_cargo, utrans)) {
+/* At least one load restriction in transport class, which
+ * we aren't subject to */
+BV_SET(disembarks, trans_class);
+  }
+} unit_type_iterate_end; /* cargo */
+  }
+} unit_class_iterate_end; /* transports */
+
+if (BV_ISSET_ANY(embarks)) {
+  /* Build list of embark exceptions */
+  const char *eclasses[uclass_count()];
+  int i = 0;
+  struct astring elist = ASTRING_INIT;
+
+  

[Freeciv-commits] r25093 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:20 2014
New Revision: 25093

URL: http://svn.gna.org/viewcvs/freeciv?rev=25093view=rev
Log:
Adding missing item comments to units.ruleset, plus general cleanup.

See gna bug #22153.

Modified:
trunk/data/alien/units.ruleset
trunk/data/civ1/units.ruleset
trunk/data/civ2/units.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

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

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25093r1=25092r2=25093view=diff

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25093r1=25092r2=25093view=diff

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25093r1=25092r2=25093view=diff

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25093r1=25092r2=25093view=diff

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25093r1=25092r2=25093view=diff

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25093r1=25092r2=25093view=diff

Modified: trunk/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=25093r1=25092r2=25093view=diff


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


[Freeciv-commits] r25095 - in /trunk: client/helpdata.c data/alien/units.ruleset

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:46:28 2014
New Revision: 25095

URL: http://svn.gna.org/viewcvs/freeciv?rev=25095view=rev
Log:
Document initial population of cities built by units.

See gna bug #22152.

Modified:
trunk/client/helpdata.c
trunk/data/alien/units.ruleset

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25095r1=25094r2=25095view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Mon Jun  9 10:46:28 2014
@@ -2922,7 +2922,11 @@
   production cost.\n));
   }
   if (utype_has_flag(utype, UTYF_CITIES)) {
-CATLSTR(buf, bufsz, _(* Can build new cities.\n));
+cat_snprintf(buf, bufsz,
+ PL_(* Can build new cities (initial population %d).\n,
+ * Can build new cities (initial population %d).\n,
+ utype-city_size),
+ utype-city_size);
   }
   if (utype_has_flag(utype, UTYF_ADD_TO_CITY)) {
 cat_snprintf(buf, bufsz,

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25095r1=25094r2=25095view=diff
==
--- trunk/data/alien/units.ruleset  (original)
+++ trunk/data/alien/units.ruleset  Mon Jun  9 10:46:28 2014
@@ -511,7 +511,7 @@
 roles = Cities, Settlers
 helptext  = _(\
 Amphibious Engineer that can also establish new cities on Ocean.\
-Cities it builds, start at size 2.)
+)
 
 [unit_star_marines]
 name  = _(Star Marines)


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


[Freeciv-commits] r25102 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:09 2014
New Revision: 25102

URL: http://svn.gna.org/viewcvs/freeciv?rev=25102view=rev
Log:
Adding missing item comments to units.ruleset, plus general cleanup.

See gna bug #22153.

Modified:
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ1/units.ruleset
branches/S2_5/data/civ2/units.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

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

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25102r1=25101r2=25102view=diff

Modified: branches/S2_5/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25102r1=25101r2=25102view=diff

Modified: branches/S2_5/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25102r1=25101r2=25102view=diff

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25102r1=25101r2=25102view=diff

Modified: branches/S2_5/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25102r1=25101r2=25102view=diff

Modified: branches/S2_5/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25102r1=25101r2=25102view=diff

Modified: branches/S2_5/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/units.ruleset?rev=25102r1=25101r2=25102view=diff


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


[Freeciv-commits] r25101 - /branches/S2_5/server/commands.c

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:06 2014
New Revision: 25101

URL: http://svn.gna.org/viewcvs/freeciv?rev=25101view=rev
Log:
Remove mention of /debug player command, which hasn't existed since
2005 (r9497).

See gna bug #22150.

Modified:
branches/S2_5/server/commands.c

Modified: branches/S2_5/server/commands.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/commands.c?rev=25101r1=25100r2=25101view=diff
==
--- branches/S2_5/server/commands.c (original)
+++ branches/S2_5/server/commands.c Mon Jun  9 10:49:06 2014
@@ -199,7 +199,6 @@
/* TRANS: translate text between  only */
N_(debug diplomacy player\n
   debug ferries\n
-  debug player player\n
   debug tech player\n
   debug city x y\n
   debug units x y\n


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


[Freeciv-commits] r25103 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:13 2014
New Revision: 25103

URL: http://svn.gna.org/viewcvs/freeciv?rev=25103view=rev
Log:
Update ruleset comments for move_fragments, plus generally clarify which
items use whole / fractional MP.

See gna bug #22151.

Modified:
branches/S2_5/data/alien/game.ruleset
branches/S2_5/data/alien/terrain.ruleset
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ1/game.ruleset
branches/S2_5/data/civ1/terrain.ruleset
branches/S2_5/data/civ1/units.ruleset
branches/S2_5/data/civ2/game.ruleset
branches/S2_5/data/civ2/terrain.ruleset
branches/S2_5/data/civ2/units.ruleset
branches/S2_5/data/civ2civ3/game.ruleset
branches/S2_5/data/civ2civ3/terrain.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/game.ruleset
branches/S2_5/data/classic/terrain.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/game.ruleset
branches/S2_5/data/experimental/terrain.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/game.ruleset
branches/S2_5/data/multiplayer/terrain.ruleset
branches/S2_5/data/multiplayer/units.ruleset

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

Modified: branches/S2_5/data/alien/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ1/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ1/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ2/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/experimental/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/multiplayer/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/game.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/terrain.ruleset?rev=25103r1=25102r2=25103view=diff

Modified: branches/S2_5/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/units.ruleset?rev=25103r1=25102r2=25103view=diff


___
Freeciv-commits mailing list
Freeciv-commits@gna.org

[Freeciv-commits] r25107 - /branches/S2_5/server/settings.c

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:28 2014
New Revision: 25107

URL: http://svn.gna.org/viewcvs/freeciv?rev=25107view=rev
Log:
Rework 'techlossforgiveness' and 'techlossrestore' help.
They no longer contradict each other.

See gna bug #22098.

Modified:
branches/S2_5/server/settings.c

Modified: branches/S2_5/server/settings.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/settings.c?rev=25107r1=25106r2=25107view=diff
==
--- branches/S2_5/server/settings.c (original)
+++ branches/S2_5/server/settings.c Mon Jun  9 10:49:28 2014
@@ -1513,21 +1513,25 @@
 
   GEN_INT(techlossforgiveness, game.server.techloss_forgiveness,
  SSET_RULES, SSET_SCIENCE, SSET_RARE, SSET_TO_CLIENT,
- N_(Negative bulbs allowed before losing tech),
-  N_(When your number of bulbs gets negative value lower than 
- this percentage of current research cost, you lose one 
- tech and number of bulbs is restored to 0. Special value -1 
- disables tech loss completely.),
+ N_(Research point debt threshold for losing tech),
+  N_(When you have negative research points, and your shortfall is 
+ greater than this percentage of the cost of your current 
+ research, you forget a technology you already knew.\n
+ The special value -1 prevents loss of technology regardless of 
+ research points.),
   NULL, NULL,
  GAME_MIN_TECHLOSSFG, GAME_MAX_TECHLOSSFG,
  GAME_DEFAULT_TECHLOSSFG)
 
  GEN_INT(techlossrestore, game.server.techloss_restore,
  SSET_RULES, SSET_SCIENCE, SSET_RARE, SSET_TO_CLIENT,
- N_(Bulbs restored when one loses a tech),
-  N_(When you lose a tech, this percentage of its research 
- cost gets restored. Special value -1 means that 
- bulb count is always restored to zero.),
+ N_(Research points restored after losing a tech),
+  N_(When you lose a technology due to a negative research balance 
+ (see 'techlossforgiveness'), this percentage of its research 
+ cost is credited to your research balance (this may not be 
+ sufficient to make it positive).\n
+ The special value -1 means that your research balance is always 
+ restored to zero, regardless of your previous shortfall.),
   NULL, NULL,
  GAME_MIN_TECHLOSSREST, GAME_MAX_TECHLOSSREST,
  GAME_DEFAULT_TECHLOSSREST)


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


[Freeciv-commits] r25106 - in /branches/S2_5/data: civ2/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:24 2014
New Revision: 25106

URL: http://svn.gna.org/viewcvs/freeciv?rev=25106view=rev
Log:
Rename AirUnit user flag to AirAttacker in supplied rulesets.
Remove it from AWACS to avoid spurious comments in help.

See gna bug #22155.

Modified:
branches/S2_5/data/civ2/units.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

Modified: branches/S2_5/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25106r1=25105r2=25106view=diff
==
--- branches/S2_5/data/civ2/units.ruleset   (original)
+++ branches/S2_5/data/civ2/units.ruleset   Mon Jun  9 10:49:24 2014
@@ -22,7 +22,7 @@
   { name, helptxt
 Airbase, _(Can build Airbases.) 
 Transform, _(Can transform terrain.)
-AirUnit, _(Very bad at attacking AEGIS.)
+AirAttacker, _(Very bad at attacking AEGIS.)
 Horse, _(Attack value halved when attacking Pikemen.)
 Helicopter, _(Defends very badly against Fighters.)
   }
@@ -1196,7 +1196,7 @@
  Helicopter, DefenseDivider, 1
  Helicopter, Firepower1, 1
}
-flags = AirUnit
+flags = AirAttacker
 roles = 
 helptext  = _(\
 Fighters are your first airborne units. They can\
@@ -1228,7 +1228,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, AirUnit
+flags = FieldUnit, OneAttack, AirAttacker
 roles = 
 helptext  = _(\
 Bombers are specialized airborne units that may\
@@ -1262,7 +1262,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, Helicopter, AirUnit
+flags = FieldUnit, OneAttack, Helicopter, AirAttacker
 roles = 
 helptext  = _(\
 The Helicopter is a very powerful unit, as it can both fly and\
@@ -1303,7 +1303,7 @@
  Helicopter, DefenseDivider, 1
  Helicopter, Firepower1, 1
}
-flags = AirUnit
+flags = AirAttacker
 roles = 
 helptext  = _(\
 An improved Fighter, with improved attack and a higher movement\
@@ -1335,7 +1335,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, AirUnit
+flags = FieldUnit, OneAttack, AirAttacker
 roles = 
 helptext  = _(\
 An improved Bomber, with improved attack and a higher movement\
@@ -1603,7 +1603,7 @@
 uk_gold   = 0
 bonuses   =
{ flag, type, value
- AirUnit, DefenseMultiplier, 4
+ AirAttacker, DefenseMultiplier, 4
}
 flags = BadCityDefender
 roles = 
@@ -1773,7 +1773,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, AirUnit
+flags = FieldUnit, OneAttack, AirAttacker
 roles = 
 helptext  = _(\
 The Cruise Missile is a long-distance missile\
@@ -1808,7 +1808,7 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = FieldUnit, OneAttack, Nuclear, AirUnit
+flags = FieldUnit, OneAttack, Nuclear, AirAttacker
 roles = 
 helptext  = _(\
 You can build Nuclear units when you have the required advance, and\

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25106r1=25105r2=25106view=diff
==
--- branches/S2_5/data/civ2civ3/units.ruleset   (original)
+++ branches/S2_5/data/civ2civ3/units.ruleset   Mon Jun  9 10:49:24 2014
@@ -27,7 +27,7 @@
   { name, helptxt
 Airbase, _(Can build Airbases.) 
 Transform, _(Can transform terrain.)
-AirUnit, _(Very bad at attacking AEGIS.)
+AirAttacker, _(Very bad at attacking AEGIS.)
 Submarine, _(Attack value halved when attacking Destroyer)
   }
 
@@ -1384,7 +1384,7 @@
 uk_food   = 1
 uk_gold   = 1
 targets   = Air, Missile, Helicopter
-flags = AirUnit
+flags = AirAttacker
 roles = DefendOk
 helptext  = _(\
 Fighters are your first airborne units. They can\
@@ -1416,7 +1416,7 @@
 uk_shield = 1
 uk_food   = 1
 uk_gold   = 1
-flags = FieldUnit, OneAttack, AirUnit, Bombarder
+flags = FieldUnit, OneAttack, AirAttacker, Bombarder
 roles = 
 helptext  = _(\
 Bombers are specialized airborne units that may\
@@ -1451,7 +1451,7 @@
 uk_food   = 1
 uk_gold   = 1
 cargo = Land
-flags = OneAttack, AirUnit, Bombarder
+flags = OneAttack, AirAttacker, Bombarder
 roles = 
 helptext  = _(\
 The Helicopter can transport one unit of infantry, and it can bombard\
@@ -1487,7 +1487,7 @@
 uk_food   = 1
 uk_gold   = 1
 targets   = Air, Missile, Helicopter
-flags = Partial_Invis, AirUnit
+flags

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

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:32 2014
New Revision: 25108

URL: http://svn.gna.org/viewcvs/freeciv?rev=25108view=rev
Log:
Fix various small icons that were offset by one pixel in r23179.

See gna bug #22157.

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=25108r1=25107r2=25108view=diff
==
Binary files - no diff available.


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


[Freeciv-commits] r25104 - in /branches/S2_5: client/helpdata.c data/alien/units.ruleset

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:17 2014
New Revision: 25104

URL: http://svn.gna.org/viewcvs/freeciv?rev=25104view=rev
Log:
Document initial population of cities built by units.

See gna bug #22152.

Modified:
branches/S2_5/client/helpdata.c
branches/S2_5/data/alien/units.ruleset

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25104r1=25103r2=25104view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Mon Jun  9 10:49:17 2014
@@ -2308,7 +2308,11 @@
   production cost.\n));
   }
   if (utype_has_flag(utype, UTYF_CITIES)) {
-CATLSTR(buf, bufsz, _(* Can build new cities.\n));
+cat_snprintf(buf, bufsz,
+ PL_(* Can build new cities (initial population %d).\n,
+ * Can build new cities (initial population %d).\n,
+ utype-city_size),
+ utype-city_size);
   }
   if (utype_has_flag(utype, UTYF_ADD_TO_CITY)) {
 cat_snprintf(buf, bufsz,

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25104r1=25103r2=25104view=diff
==
--- branches/S2_5/data/alien/units.ruleset  (original)
+++ branches/S2_5/data/alien/units.ruleset  Mon Jun  9 10:49:17 2014
@@ -509,7 +509,7 @@
 roles = Cities, Settlers
 helptext  = _(\
 Amphibious Engineer that can also establish new cities on Ocean.\
-Cities it builds, start at size 2.)
+)
 
 [unit_star_marines]
 name  = _(Star Marines)


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


[Freeciv-commits] r25109 - in /branches/S2_5/data: hex2t/tiles.png isophex/darkness.png

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:35 2014
New Revision: 25109

URL: http://svn.gna.org/viewcvs/freeciv?rev=25109view=rev
Log:
Modify hex2t and isophex darkness sprites to cover whole tile, mainly as
an example of how to do it.
No visible effect (would have to set darkness_layer=1).

See gna patch #4657.

Modified:
branches/S2_5/data/hex2t/tiles.png
branches/S2_5/data/isophex/darkness.png

Modified: branches/S2_5/data/hex2t/tiles.png
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/hex2t/tiles.png?rev=25109r1=25108r2=25109view=diff
==
Binary files - no diff available.

Modified: branches/S2_5/data/isophex/darkness.png
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/isophex/darkness.png?rev=25109r1=25108r2=25109view=diff
==
Binary files - no diff available.


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


[Freeciv-commits] r25105 - in /branches/S2_5: client/helpdata.c common/unit.c common/unittype.c common/unittype.h

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:49:20 2014
New Revision: 25105

URL: http://svn.gna.org/viewcvs/freeciv?rev=25105view=rev
Log:
Document embark/disembark restrictions and exceptions in autogenerated
unit help.

See gna bug #22143.

Modified:
branches/S2_5/client/helpdata.c
branches/S2_5/common/unit.c
branches/S2_5/common/unittype.c
branches/S2_5/common/unittype.h

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25105r1=25104r2=25105view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Mon Jun  9 10:49:20 2014
@@ -2281,9 +2281,143 @@
  utype-transport_capacity),
  utype-transport_capacity, astr_str(list));
 astr_free(list);
+if (uclass_has_flag(utype_class(utype), UCF_UNREACHABLE)) {
+  /* Document restrictions on when units can load/unload */
+  bool has_restricted_load = FALSE, has_unrestricted_load = FALSE,
+   has_restricted_unload = FALSE, has_unrestricted_unload = FALSE;
+  unit_type_iterate(pcargo) {
+if (can_unit_type_transport(utype, utype_class(pcargo))) {
+  if (utype_can_freely_load(pcargo, utype)) {
+has_unrestricted_load = TRUE;
+  } else {
+has_restricted_load = TRUE;
+  }
+  if (utype_can_freely_unload(pcargo, utype)) {
+has_unrestricted_unload = TRUE;
+  } else {
+has_restricted_unload = TRUE;
+  }
+}
+  } unit_type_iterate_end;
+  if (has_restricted_load) {
+if (has_unrestricted_load) {
+  /* At least one type of cargo can load onto us freely.
+   * The specific exceptions will be documented in cargo help. */
+  CATLSTR(buf, bufsz,
+  _(  * Some cargo cannot be loaded except in a city or a 
+base native to this transport.\n));
+} else {
+  /* No exceptions */
+  CATLSTR(buf, bufsz,
+  _(  * Cargo cannot be loaded except in a city or a 
+base native to this transport.\n));
+}
+  } /* else, no restricted cargo exists; keep quiet */
+  if (has_restricted_unload) {
+if (has_unrestricted_unload) {
+  /* At least one type of cargo can unload from us freely. */
+  CATLSTR(buf, bufsz,
+  _(  * Some cargo cannot be unloaded except in a city or a 
+base native to this transport.\n));
+} else {
+  /* No exceptions */
+  CATLSTR(buf, bufsz,
+  _(  * Cargo cannot be unloaded except in a city or a 
+base native to this transport.\n));
+}
+  } /* else, no restricted cargo exists; keep quiet */
+}
   }
   if (utype_has_flag(utype, UTYF_TRIREME)) {
 CATLSTR(buf, bufsz, _(* Must stay next to coast.\n));
+  }
+  {
+/* Document exceptions to embark/disembark restrictions that we
+ * have as cargo. */
+bv_unit_classes embarks, disembarks;
+BV_CLR_ALL(embarks);
+BV_CLR_ALL(disembarks);
+/* Determine which of our transport classes have restrictions in the first
+ * place (that is, contain at least one transport which carries at least
+ * one type of cargo which is restricted).
+ * We'll suppress output for classes not in this set, since this cargo
+ * type is not behaving exceptionally in such cases. */
+unit_type_iterate(utrans) {
+  const Unit_Class_id trans_class = uclass_index(utype_class(utrans));
+  /* Don't waste time repeating checks on classes we've already checked,
+   * or weren't under consideration in the first place */
+  if (!BV_ISSET(embarks, trans_class)
+   BV_ISSET(utype-embarks, trans_class)) {
+unit_type_iterate(other_cargo) {
+  if (can_unit_type_transport(utrans, utype_class(other_cargo))
+   !utype_can_freely_load(other_cargo, utrans)) {
+/* At least one load restriction in transport class, which
+ * we aren't subject to */
+BV_SET(embarks, trans_class);
+  }
+} unit_type_iterate_end; /* cargo */
+  }
+  if (!BV_ISSET(disembarks, trans_class)
+   BV_ISSET(utype-disembarks, trans_class)) {
+unit_type_iterate(other_cargo) {
+  if (can_unit_type_transport(utrans, utype_class(other_cargo))
+   !utype_can_freely_unload(other_cargo, utrans)) {
+/* At least one load restriction in transport class, which
+ * we aren't subject to */
+BV_SET(disembarks, trans_class);
+  }
+} unit_type_iterate_end; /* cargo */
+  }
+} unit_class_iterate_end; /* transports */
+
+if (BV_ISSET_ANY(embarks)) {
+  /* Build list of embark exceptions */
+  const char *eclasses[uclass_count()];
+  

[Freeciv-commits] r25110 - /branches/S2_4/server/commands.c

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:57:07 2014
New Revision: 25110

URL: http://svn.gna.org/viewcvs/freeciv?rev=25110view=rev
Log:
Remove mention of /debug player command, which hasn't existed since
2005 (r9497).

See gna bug #22150.

Modified:
branches/S2_4/server/commands.c

Modified: branches/S2_4/server/commands.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/commands.c?rev=25110r1=25109r2=25110view=diff
==
--- branches/S2_4/server/commands.c (original)
+++ branches/S2_4/server/commands.c Mon Jun  9 10:57:07 2014
@@ -197,7 +197,6 @@
/* TRANS: translate text between  only */
N_(debug diplomacy player\n
   debug ferries\n
-  debug player player\n
   debug tech player\n
   debug city x y\n
   debug units x y\n


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


[Freeciv-commits] r25111 - /branches/S2_4/client/helpdata.c

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun  9 10:57:10 2014
New Revision: 25111

URL: http://svn.gna.org/viewcvs/freeciv?rev=25111view=rev
Log:
Document initial population of cities built by units.

See gna bug #22152.

Modified:
branches/S2_4/client/helpdata.c

Modified: branches/S2_4/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=25111r1=25110r2=25111view=diff
==
--- branches/S2_4/client/helpdata.c (original)
+++ branches/S2_4/client/helpdata.c Mon Jun  9 10:57:10 2014
@@ -1996,7 +1996,11 @@
   production cost.\n));
   }
   if (utype_has_flag(utype, F_CITIES)) {
-CATLSTR(buf, bufsz, _(* Can build new cities.\n));
+cat_snprintf(buf, bufsz,
+ PL_(* Can build new cities (initial population %d).\n,
+ * Can build new cities (initial population %d).\n,
+ utype-city_size),
+ utype-city_size);
   }
   if (utype_has_flag(utype, F_ADD_TO_CITY)) {
 cat_snprintf(buf, bufsz,


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


[Freeciv-commits] r25116 - /branches/S2_4/server/unithand.c

2014-06-09 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 10 01:25:11 2014
New Revision: 25116

URL: http://svn.gna.org/viewcvs/freeciv?rev=25116view=rev
Log:
Fix that a unit which is transporting other units can conquer a city.

Reported by Marko Lindqvist (cazfi@gna), patch by pepeto@gna.

See gna bug #20789

Modified:
branches/S2_4/server/unithand.c

Modified: branches/S2_4/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/unithand.c?rev=25116r1=25115r2=25116view=diff
==
--- branches/S2_4/server/unithand.c (original)
+++ branches/S2_4/server/unithand.c Tue Jun 10 01:25:11 2014
@@ -1339,6 +1339,7 @@
 {
   struct player *pplayer = unit_owner(punit);
   struct city *pcity = tile_city(pdesttile);
+  bool taking_over_city = FALSE;
 
   /*** Phase 1: Basic checks ***/
 
@@ -1568,6 +1569,7 @@
 return TRUE;
   }
 
+  taking_over_city = TRUE;
   /* Taking over a city is considered a move, so fall through */
 }
   }
@@ -1580,7 +1582,9 @@
 unit_list_iterate(unit_tile(punit)-units, pcargo) {
   if (unit_contained_in(pcargo, punit)
(is_non_allied_unit_tile(pdesttile, unit_owner(pcargo))
-  || is_non_allied_city_tile(pdesttile, unit_owner(pcargo {
+  || (!taking_over_city
+   is_non_allied_city_tile(pdesttile,
+ unit_owner(pcargo) {
  notify_player(pplayer, unit_tile(punit), E_BAD_COMMAND, ftc_server,
_(A transported unit is not allied to all 
  units or city on target tile.));


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


[Freeciv-commits] r25155 - /trunk/client/helpdata.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:57:00 2014
New Revision: 25155

URL: http://svn.gna.org/viewcvs/freeciv?rev=25155view=rev
Log:
Don't claim veteran Nuclear units with no defence have increased
strength in combat; they don't.

Reported by 'vla22'.

See gna bug #22165.

Modified:
trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25155r1=25154r2=25155view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Mon Jun 16 23:57:00 2014
@@ -3291,7 +3291,7 @@
  * through combat/missions/work. */
 CATLSTR(buf, bufsz, _(* May acquire veteran status.\n));
 if (utype_veteran_has_power_bonus(utype)) {
-  if (utype-attack_strength  0
+  if ((!utype_has_flag(utype, UTYF_NUCLEAR)  utype-attack_strength  0)
   || utype-defense_strength  0) {
 CATLSTR(buf, bufsz,
 _(  * Veterans have increased strength in combat.\n));


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


[Freeciv-commits] r25154 - in /trunk/data: alien/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:56:56 2014
New Revision: 25154

URL: http://svn.gna.org/viewcvs/freeciv?rev=25154view=rev
Log:
Add NoCities and UnsafeCoast flags to Inaccessible terrain.

See gna patch #4784.

Modified:
trunk/data/alien/terrain.ruleset
trunk/data/civ2civ3/terrain.ruleset
trunk/data/classic/terrain.ruleset
trunk/data/experimental/terrain.ruleset
trunk/data/multiplayer/terrain.ruleset

Modified: trunk/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=25154r1=25153r2=25154view=diff
==
--- trunk/data/alien/terrain.ruleset(original)
+++ trunk/data/alien/terrain.rulesetMon Jun 16 23:56:56 2014
@@ -184,7 +184,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: trunk/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=25154r1=25153r2=25154view=diff
==
--- trunk/data/civ2civ3/terrain.ruleset (original)
+++ trunk/data/civ2civ3/terrain.ruleset Mon Jun 16 23:56:56 2014
@@ -193,7 +193,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: trunk/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=25154r1=25153r2=25154view=diff
==
--- trunk/data/classic/terrain.ruleset  (original)
+++ trunk/data/classic/terrain.ruleset  Mon Jun 16 23:56:56 2014
@@ -193,7 +193,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: trunk/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=25154r1=25153r2=25154view=diff
==
--- trunk/data/experimental/terrain.ruleset (original)
+++ trunk/data/experimental/terrain.ruleset Mon Jun 16 23:56:56 2014
@@ -195,7 +195,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: trunk/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=25154r1=25153r2=25154view=diff
==
--- trunk/data/multiplayer/terrain.ruleset  (original)
+++ trunk/data/multiplayer/terrain.ruleset  Mon Jun 16 23:56:56 2014
@@ -193,7 +193,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25


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


[Freeciv-commits] r25156 - in /trunk/server: savegame.c savegame2.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:57:03 2014
New Revision: 25156

URL: http://svn.gna.org/viewcvs/freeciv?rev=25156view=rev
Log:
Protect against savegames where a unit has a higher veteran level than
the current ruleset permits it.

See gna bug #22172.

Modified:
trunk/server/savegame.c
trunk/server/savegame2.c

Modified: trunk/server/savegame.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame.c?rev=25156r1=25155r2=25156view=diff
==
--- trunk/server/savegame.c (original)
+++ trunk/server/savegame.c Mon Jun 16 23:57:03 2014
@@ -1170,6 +1170,7 @@
 int nat_x, nat_y;
 const char* type_name;
 struct unit_type *type;
+int veteran;
 enum tile_special_type target;
 struct base_type *pbase = NULL;
 struct road_type *proad = NULL;
@@ -1191,9 +1192,19 @@
 plrno, i, type_name);
   exit(EXIT_FAILURE);
 }
+
+veteran
+  = secfile_lookup_int_default(file, 0, player%d.u%d.veteran, plrno, i);
+{
+  /* Protect against change in veteran system in ruleset */
+  const int levels = utype_veteran_levels(type);
+  if (veteran = levels) {
+fc_assert(levels = 1);
+veteran = levels - 1;
+  }
+}
 
-punit = unit_virtual_create(plr, NULL, type,
-  secfile_lookup_int_default(file, 0, player%d.u%d.veteran, plrno, i));
+punit = unit_virtual_create(plr, NULL, type, veteran);
 fc_assert_exit_msg(secfile_lookup_int(file, punit-id,
   player%d.u%d.id, plrno, i),
%s, secfile_error());

Modified: trunk/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame2.c?rev=25156r1=25155r2=25156view=diff
==
--- trunk/server/savegame2.c(original)
+++ trunk/server/savegame2.cMon Jun 16 23:57:03 2014
@@ -5155,6 +5155,14 @@
 
   punit-veteran
 = secfile_lookup_int_default(loading-file, 0, %s.veteran, unitstr);
+  {
+/* Protect against change in veteran system in ruleset */
+const int levels = utype_veteran_levels(unit_type(punit));
+if (punit-veteran = levels) {
+  fc_assert(levels = 1);
+  punit-veteran = levels - 1;
+}
+  }
   punit-done_moving
 = secfile_lookup_bool_default(loading-file, (punit-moves_left == 0),
   %s.done_moving, unitstr);


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


[Freeciv-commits] r25159 - in /trunk: client/helpdata.c client/packhand.c common/movement.c common/movement.h server/ruleset.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:57:12 2014
New Revision: 25159

URL: http://svn.gna.org/viewcvs/freeciv?rev=25159view=rev
Log:
Fix minor bugs in display of fractional movement points resulting from
generalisation of move_fragments, and reduce fractional MP to lowest terms.
Use move_points_text() in road helptext.

See gna bug #22194.

Modified:
trunk/client/helpdata.c
trunk/client/packhand.c
trunk/common/movement.c
trunk/common/movement.h
trunk/server/ruleset.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25159r1=25158r2=25159view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Mon Jun 16 23:57:12 2014
@@ -3652,8 +3652,11 @@
   CATLSTR(buf, bufsz, _(* Allows infinite movement.\n));
 } else {
   cat_snprintf(buf, bufsz,
-   _(* Movement cost along this road is %d/%d movement 
points.\n),
-   proad-move_cost, SINGLE_MOVE);
+   /* TRANS: MP = movement points. Second %s may have a
+* fractional part. */
+   _(* Movement cost along %s is %s MP.\n),
+   road_name_translation(proad),
+   move_points_text(proad-move_cost, NULL, NULL, FALSE));
 }
   }
 

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=25159r1=25158r2=25159view=diff
==
--- trunk/client/packhand.c (original)
+++ trunk/client/packhand.c Mon Jun 16 23:57:12 2014
@@ -3499,6 +3499,8 @@
   /* Since terrain_control is the same as packet_ruleset_terrain_control
* we can just copy the data directly. */
   terrain_control = *p;
+  /* terrain_control.move_fragments likely changed */
+  init_move_fragments();
 }
 
 /

Modified: trunk/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/movement.c?rev=25159r1=25158r2=25159view=diff
==
--- trunk/common/movement.c (original)
+++ trunk/common/movement.c Mon Jun 16 23:57:12 2014
@@ -748,9 +748,23 @@
   return availability;
 }
 
-/
-  Render movement points as text, including fractional movement points,
-  scaled by SINGLE_MOVE. Returns a pointer to a static buffer.
+static int move_points_denomlen = 0;
+
+/
+  Call whenever terrain_control.move_fragments / SINGLE_MOVE changes.
+/
+void init_move_fragments(void)
+{
+  char denomstr[10];
+  /* String length of maximum denominator for fractional representation of
+   * movement points, for padding of text representation */
+  fc_snprintf(denomstr, sizeof(denomstr), %d, SINGLE_MOVE);
+  move_points_denomlen = strlen(denomstr);
+}
+
+/
+  Render positive movement points as text, including fractional movement
+  points, scaled by SINGLE_MOVE. Returns a pointer to a static buffer.
   'prefix' is a string put in front of all numeric output.
   'none' is the string to display in place of the integer part if no
   movement points (or NULL to just say 0).
@@ -762,45 +776,51 @@
  bool align)
 {
   static struct astring str = ASTRING_INIT;
-  static int denomlen = 0;
   int pad1, pad2;
 
-  if (denomlen == 0) {
-/* String length of denominator for fractional representation of
- * movement points, for padding */
-char denomstr[10];
-fc_snprintf(denomstr, sizeof(denomstr), %d, SINGLE_MOVE);
-denomlen = strlen(denomstr);
-  }
-  if (align) {
-pad1 = denomlen; /* numerator or denominator */
-pad2 = denomlen*2+2; /* everything right of integer part */
+  if (align  SINGLE_MOVE  1) {
+pad1 = move_points_denomlen;  /* numerator or denominator */
+pad2 = move_points_denomlen*2+2;  /* everything right of integer part */
   } else {
+/* If no fractional part, no need for alignment even if requested */
 pad1 = pad2 = 0;
   }
   if (!prefix) {
 prefix = ;
   }
   astr_clear(str);
-  if ((mp == 0 || SINGLE_MOVE == 0)  none) {
-/* No movement points, special representation */
-astr_add(str, %s%*s, none, pad2, );
-  } else if (SINGLE_MOVE == 0) {
-/* Do not divide by zero. Important for client before ruleset
- * received. Just add */
-astr_add(str, 0/0);
+  if ((mp == 0  none) || SINGLE_MOVE == 0) {
+/* No movement points, and we have a special representation to use */
+/* (Also used when SINGLE_MOVE==0, to avoid dividing by zero, which is
+ * 

[Freeciv-commits] r25160 - in /trunk: client/ data/alien/ data/civ2civ3/ data/classic/ data/experimental/ data/multiplayer/

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:57:16 2014
New Revision: 25160

URL: http://svn.gna.org/viewcvs/freeciv?rev=25160view=rev
Log:
Correct IgTer help and ruleset comments.

Ruleset comments requested by Marko Lindqvist (cazfi@gna).

See gna bug #22195.

Modified:
trunk/client/helpdata.c
trunk/data/alien/units.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25160r1=25159r2=25160view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Mon Jun 16 23:57:16 2014
@@ -3141,8 +3141,13 @@
 utype-bombard_rate);
   }
   if (utype_has_flag(utype, UTYF_IGTER)) {
-CATLSTR(buf, bufsz,
-   _(* Ignores terrain effects (treats all tiles as roads).\n));
+cat_snprintf(buf, bufsz,
+ /* TRANS: MP = movement points. %s may have a 
+  * fractional part. */
+ _(* Ignores terrain effects (moving costs at most %s MP 
+   per tile).\n),
+ move_points_text(terrain_control.igter_cost,
+  NULL, NULL, FALSE));
   }
   if (utype_has_flag(utype, UTYF_IGZOC)) {
 CATLSTR(buf, bufsz, _(* Ignores zones of control.\n));

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25160r1=25159r2=25160view=diff
==
--- trunk/data/alien/units.ruleset  (original)
+++ trunk/data/alien/units.ruleset  Mon Jun 16 23:57:16 2014
@@ -257,8 +257,9 @@
 ;around it freely
 ; NonMil  = a non-military unit: no attacks; no martial law; can enter
 ; peaceful borders; DoesntOccupyTile
-; IgTer   = ignore terrain/road etc, use constant move cost defined in
-; igter_cost (terrain.ruleset)
+; IgTer   = use constant move cost defined in igter_cost 
(terrain.ruleset)
+; rather than terrain/road etc cost, unless terrain cost is
+; less
 ; OneAttack  = can only make a single attack, regardless of movement points
 ; IgWall = ignore effect of city walls
 ; FieldUnit  = cause unhappiness even when not being aggressive

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25160r1=25159r2=25160view=diff
==
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Mon Jun 16 23:57:16 2014
@@ -300,8 +300,9 @@
 ;around it freely
 ; NonMil = a non-military unit: no attacks; no martial law; can enter
 ; peaceful borders; DoesntOccupyTile
-; IgTer   = ignore terrain/road etc, use constant move cost defined in
-; igter_cost (terrain.ruleset)
+; IgTer   = use constant move cost defined in igter_cost 
(terrain.ruleset)
+; rather than terrain/road etc cost, unless terrain cost is
+; less
 ; OneAttack  = can only make a single attack, regardless of movement points
 ; IgWall = ignore effect of city walls
 ; FieldUnit  = cause unhappiness even when not being aggressive

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25160r1=25159r2=25160view=diff
==
--- trunk/data/classic/units.ruleset(original)
+++ trunk/data/classic/units.rulesetMon Jun 16 23:57:16 2014
@@ -277,8 +277,9 @@
 ;around it freely
 ; NonMil = a non-military unit: no attacks; no martial law; can enter
 ; peaceful borders; DoesntOccupyTile
-; IgTer   = ignore terrain/road etc, use constant move cost defined in
-; igter_cost (terrain.ruleset)
+; IgTer   = use constant move cost defined in igter_cost 
(terrain.ruleset)
+; rather than terrain/road etc cost, unless terrain cost is
+; less
 ; OneAttack  = can only make a single attack, regardless of movement points
 ; IgWall = ignore effect of city walls
 ; FieldUnit  = cause unhappiness even when not being aggressive

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25160r1=25159r2=25160view=diff
==
--- trunk/data/experimental/units.ruleset   (original)
+++ trunk/data/experimental/units.ruleset   Mon Jun 16 23:57:16 2014
@@ -291,8 +291,9 @@
 ;around it freely
 ; NonMil = a 

[Freeciv-commits] r25158 - in /trunk: client/control.c common/unit.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:57:09 2014
New Revision: 25158

URL: http://svn.gna.org/viewcvs/freeciv?rev=25158view=rev
Log:
When choosing a transporter for a unit, prefer less deeply nested ones,
then ones with more move points.

See gna bug #22189.

Modified:
trunk/client/control.c
trunk/common/unit.c

Modified: trunk/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=25158r1=25157r2=25158view=diff
==
--- trunk/client/control.c  (original)
+++ trunk/client/control.c  Mon Jun 16 23:57:09 2014
@@ -1640,7 +1640,7 @@
 /
   Send a request to the server that the cargo be loaded into the transporter.
 
-  If ptransporter is NULL a transporter will be picked at random.
+  If ptransporter is NULL a suitable transporter will be chosen.
 /
 void request_unit_load(struct unit *pcargo, struct unit *ptrans)
 {

Modified: trunk/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=25158r1=25157r2=25158view=diff
==
--- trunk/common/unit.c (original)
+++ trunk/common/unit.c Mon Jun 16 23:57:09 2014
@@ -1972,15 +1972,24 @@
 /
 struct unit *transporter_for_unit(const struct unit *pcargo)
 {
-  struct tile *ptile = unit_tile(pcargo);
-
-  unit_list_iterate(ptile-units, ptrans) {
+  struct unit_list *tile_units = unit_tile(pcargo)-units;
+  struct unit *best = NULL;
+  int bestdepth = 0; /* initialiser doesn't matter */
+
+  unit_list_iterate(tile_units, ptrans) {
 if (can_unit_load(pcargo, ptrans)) {
-  return ptrans;
+  int depth = unit_transport_depth(ptrans);
+  if (!best || depth  bestdepth) {
+best = ptrans;
+bestdepth = depth;
+  } else if (depth == bestdepth
+  ptrans-moves_left  best-moves_left) {
+best = ptrans;
+  }
 }
   } unit_list_iterate_end;
 
-  return NULL;
+  return best;
 }
 
 /


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


[Freeciv-commits] r25161 - in /branches/S2_5/data: alien/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:59:49 2014
New Revision: 25161

URL: http://svn.gna.org/viewcvs/freeciv?rev=25161view=rev
Log:
Add NoCities and UnsafeCoast flags to Inaccessible terrain.

See gna patch #4784.

Modified:
branches/S2_5/data/alien/terrain.ruleset
branches/S2_5/data/civ2civ3/terrain.ruleset
branches/S2_5/data/classic/terrain.ruleset
branches/S2_5/data/experimental/terrain.ruleset
branches/S2_5/data/multiplayer/terrain.ruleset

Modified: branches/S2_5/data/alien/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/terrain.ruleset?rev=25161r1=25160r2=25161view=diff
==
--- branches/S2_5/data/alien/terrain.ruleset(original)
+++ branches/S2_5/data/alien/terrain.rulesetMon Jun 16 23:59:49 2014
@@ -198,7 +198,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: branches/S2_5/data/civ2civ3/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/terrain.ruleset?rev=25161r1=25160r2=25161view=diff
==
--- branches/S2_5/data/civ2civ3/terrain.ruleset (original)
+++ branches/S2_5/data/civ2civ3/terrain.ruleset Mon Jun 16 23:59:49 2014
@@ -206,7 +206,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: branches/S2_5/data/classic/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/terrain.ruleset?rev=25161r1=25160r2=25161view=diff
==
--- branches/S2_5/data/classic/terrain.ruleset  (original)
+++ branches/S2_5/data/classic/terrain.ruleset  Mon Jun 16 23:59:49 2014
@@ -206,7 +206,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: branches/S2_5/data/experimental/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/terrain.ruleset?rev=25161r1=25160r2=25161view=diff
==
--- branches/S2_5/data/experimental/terrain.ruleset (original)
+++ branches/S2_5/data/experimental/terrain.ruleset Mon Jun 16 23:59:49 2014
@@ -208,7 +208,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25

Modified: branches/S2_5/data/multiplayer/terrain.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/terrain.ruleset?rev=25161r1=25160r2=25161view=diff
==
--- branches/S2_5/data/multiplayer/terrain.ruleset  (original)
+++ branches/S2_5/data/multiplayer/terrain.ruleset  Mon Jun 16 23:59:49 2014
@@ -206,7 +206,7 @@
 warmer_drier_result  = no
 cooler_wetter_result = no
 cooler_drier_result  = no
-flags= NotGenerated, NoPollution
+flags= NotGenerated, NoPollution, NoCities, UnsafeCoast
 color.r  = 25
 color.g  = 25
 color.b  = 25


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


[Freeciv-commits] r25162 - /branches/S2_5/client/helpdata.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:59:52 2014
New Revision: 25162

URL: http://svn.gna.org/viewcvs/freeciv?rev=25162view=rev
Log:
Don't claim veteran Nuclear units with no defence have increased
strength in combat; they don't.

Reported by 'vla22'.

See gna bug #22165.

Modified:
branches/S2_5/client/helpdata.c

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25162r1=25161r2=25162view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Mon Jun 16 23:59:52 2014
@@ -2650,7 +2650,7 @@
  * through combat/missions/work. */
 CATLSTR(buf, bufsz, _(* May acquire veteran status.\n));
 if (utype_veteran_has_power_bonus(utype)) {
-  if (utype-attack_strength  0
+  if ((!utype_has_flag(utype, UTYF_NUCLEAR)  utype-attack_strength  0)
   || utype-defense_strength  0) {
 CATLSTR(buf, bufsz,
 _(  * Veterans have increased strength in combat.\n));


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


[Freeciv-commits] r25167 - in /branches/S2_5: client/ data/alien/ data/civ2civ3/ data/classic/ data/experimental/ data/multiplayer/

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 00:00:09 2014
New Revision: 25167

URL: http://svn.gna.org/viewcvs/freeciv?rev=25167view=rev
Log:
Correct IgTer help and ruleset comments.

Ruleset comments requested by Marko Lindqvist (cazfi@gna).

See gna bug #22195.

Modified:
branches/S2_5/client/helpdata.c
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25167r1=25166r2=25167view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Tue Jun 17 00:00:09 2014
@@ -2553,8 +2553,13 @@
 utype-bombard_rate);
   }
   if (utype_has_flag(utype, UTYF_IGTER)) {
-CATLSTR(buf, bufsz,
-   _(* Ignores terrain effects (treats all tiles as roads).\n));
+cat_snprintf(buf, bufsz,
+ /* TRANS: MP = movement points. %s may have a 
+  * fractional part. */
+ _(* Ignores terrain effects (moving costs at most %s MP 
+   per tile).\n),
+ move_points_text(terrain_control.igter_cost,
+  NULL, NULL, FALSE));
   }
   if (utype_has_flag(utype, UTYF_IGZOC)) {
 CATLSTR(buf, bufsz, _(* Ignores zones of control.\n));

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25167r1=25166r2=25167view=diff
==
--- branches/S2_5/data/alien/units.ruleset  (original)
+++ branches/S2_5/data/alien/units.ruleset  Tue Jun 17 00:00:09 2014
@@ -254,8 +254,9 @@
 ; ZOC flag
 ; NonMil  = a non-military unit: no attacks; no martial law; can enter
 ; peaceful borders; DoesntOccupyTile
-; IgTer   = ignore terrain/road etc, use constant move cost defined in
-; igter_cost (terrain.ruleset)
+; IgTer   = use constant move cost defined in igter_cost 
(terrain.ruleset)
+; rather than terrain/road etc cost, unless terrain cost is
+; less
 ; OneAttack  = can only make a single attack, regardless of movement points
 ; IgWall = ignore effect of city walls
 ; FieldUnit  = cause unhappiness even when not being aggressive

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25167r1=25166r2=25167view=diff
==
--- branches/S2_5/data/civ2civ3/units.ruleset   (original)
+++ branches/S2_5/data/civ2civ3/units.ruleset   Tue Jun 17 00:00:09 2014
@@ -296,8 +296,9 @@
 ; ZOC flag
 ; NonMil = a non-military unit: no attacks; no martial law; can enter
 ; peaceful borders; DoesntOccupyTile
-; IgTer   = ignore terrain/road etc, use constant move cost defined in
-; igter_cost (terrain.ruleset)
+; IgTer   = use constant move cost defined in igter_cost 
(terrain.ruleset)
+; rather than terrain/road etc cost, unless terrain cost is
+; less
 ; OneAttack  = can only make a single attack, regardless of movement points
 ; IgWall = ignore effect of city walls
 ; FieldUnit  = cause unhappiness even when not being aggressive

Modified: branches/S2_5/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25167r1=25166r2=25167view=diff
==
--- branches/S2_5/data/classic/units.ruleset(original)
+++ branches/S2_5/data/classic/units.rulesetTue Jun 17 00:00:09 2014
@@ -273,8 +273,9 @@
 ; ZOC flag
 ; NonMil = a non-military unit: no attacks; no martial law; can enter
 ; peaceful borders; DoesntOccupyTile
-; IgTer   = ignore terrain/road etc, use constant move cost defined in
-; igter_cost (terrain.ruleset)
+; IgTer   = use constant move cost defined in igter_cost 
(terrain.ruleset)
+; rather than terrain/road etc cost, unless terrain cost is
+; less
 ; OneAttack  = can only make a single attack, regardless of movement points
 ; IgWall = ignore effect of city walls
 ; FieldUnit  = cause unhappiness even when not being aggressive

Modified: branches/S2_5/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25167r1=25166r2=25167view=diff
==
--- 

[Freeciv-commits] r25166 - in /branches/S2_5: client/helpdata.c client/packhand.c common/movement.c common/movement.h server/ruleset.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 00:00:06 2014
New Revision: 25166

URL: http://svn.gna.org/viewcvs/freeciv?rev=25166view=rev
Log:
Fix minor bugs in display of fractional movement points resulting from
generalisation of move_fragments, and reduce fractional MP to lowest terms.
Use move_points_text() in road helptext.

See gna bug #22194.

Modified:
branches/S2_5/client/helpdata.c
branches/S2_5/client/packhand.c
branches/S2_5/common/movement.c
branches/S2_5/common/movement.h
branches/S2_5/server/ruleset.c

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25166r1=25165r2=25166view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Tue Jun 17 00:00:06 2014
@@ -3097,8 +3097,11 @@
 CATLSTR(buf, bufsz, _(* Allows infinite movement.\n));
   } else {
 cat_snprintf(buf, bufsz,
- _(* Movement cost along this road is %d/%d movement 
points.\n),
- proad-move_cost, SINGLE_MOVE);
+ /* TRANS: MP = movement points. Second %s may have a
+  * fractional part. */
+ _(* Movement cost along %s is %s MP.\n),
+ road_name_translation(proad),
+ move_points_text(proad-move_cost, NULL, NULL, FALSE));
   }
 
   if (!proad-buildable) {

Modified: branches/S2_5/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/packhand.c?rev=25166r1=25165r2=25166view=diff
==
--- branches/S2_5/client/packhand.c (original)
+++ branches/S2_5/client/packhand.c Tue Jun 17 00:00:06 2014
@@ -34,6 +34,7 @@
 #include government.h
 #include idex.h
 #include map.h
+#include movement.h
 #include name_translation.h
 #include nation.h
 #include packets.h
@@ -3366,6 +3367,8 @@
   /* Since terrain_control is the same as packet_ruleset_terrain_control
* we can just copy the data directly. */
   terrain_control = *p;
+  /* terrain_control.move_fragments likely changed */
+  init_move_fragments();
 }
 
 /

Modified: branches/S2_5/common/movement.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/movement.c?rev=25166r1=25165r2=25166view=diff
==
--- branches/S2_5/common/movement.c (original)
+++ branches/S2_5/common/movement.c Tue Jun 17 00:00:06 2014
@@ -618,9 +618,23 @@
   return availability;
 }
 
-/
-  Render movement points as text, including fractional movement points,
-  scaled by SINGLE_MOVE. Returns a pointer to a static buffer.
+static int move_points_denomlen = 0;
+
+/
+  Call whenever terrain_control.move_fragments / SINGLE_MOVE changes.
+/
+void init_move_fragments(void)
+{
+  char denomstr[10];
+  /* String length of maximum denominator for fractional representation of
+   * movement points, for padding of text representation */
+  fc_snprintf(denomstr, sizeof(denomstr), %d, SINGLE_MOVE);
+  move_points_denomlen = strlen(denomstr);
+}
+
+/
+  Render positive movement points as text, including fractional movement
+  points, scaled by SINGLE_MOVE. Returns a pointer to a static buffer.
   'prefix' is a string put in front of all numeric output.
   'none' is the string to display in place of the integer part if no
   movement points (or NULL to just say 0).
@@ -632,45 +646,51 @@
  bool align)
 {
   static struct astring str = ASTRING_INIT;
-  static int denomlen = 0;
   int pad1, pad2;
 
-  if (denomlen == 0) {
-/* String length of denominator for fractional representation of
- * movement points, for padding */
-char denomstr[10];
-fc_snprintf(denomstr, sizeof(denomstr), %d, SINGLE_MOVE);
-denomlen = strlen(denomstr);
-  }
-  if (align) {
-pad1 = denomlen; /* numerator or denominator */
-pad2 = denomlen*2+2; /* everything right of integer part */
+  if (align  SINGLE_MOVE  1) {
+pad1 = move_points_denomlen;  /* numerator or denominator */
+pad2 = move_points_denomlen*2+2;  /* everything right of integer part */
   } else {
+/* If no fractional part, no need for alignment even if requested */
 pad1 = pad2 = 0;
   }
   if (!prefix) {
 prefix = ;
   }
   astr_clear(str);
-  if ((mp == 0 || SINGLE_MOVE == 0)  none) {
-/* No movement points, special representation */
-astr_add(str, %s%*s, none, pad2, );
-  } else if (SINGLE_MOVE == 0) {
-/* Do not divide by zero. 

[Freeciv-commits] r25164 - /branches/S2_5/common/unit.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:59:58 2014
New Revision: 25164

URL: http://svn.gna.org/viewcvs/freeciv?rev=25164view=rev
Log:
Allow unloading from a nested transport, in line with the recent change
to allow loading onto such a transport.

See gna bug #22190.

Modified:
branches/S2_5/common/unit.c

Modified: branches/S2_5/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/unit.c?rev=25164r1=25163r2=25164view=diff
==
--- branches/S2_5/common/unit.c (original)
+++ branches/S2_5/common/unit.c Mon Jun 16 23:59:58 2014
@@ -807,7 +807,7 @@
 return FALSE;
   }
 
-  /* Only top-level transporters may be loaded or loaded into. */
+  /* Cannot load if cargo is already loaded onto something else. */
   if (unit_transported(pcargo)) {
 return FALSE;
   }
@@ -884,13 +884,6 @@
 
   /* Make sure the unit's transporter exists and is known. */
   if (unit_transport_get(pcargo) != ptrans) {
-return FALSE;
-  }
-
-  /* Only top-level transporters may be unloaded.  However the unit being
-   * unloaded may be transporting other units (well, at least it's allowed
-   * here: elsewhere this may be disallowed). */
-  if (unit_transport_get(ptrans)) {
 return FALSE;
   }
 


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


[Freeciv-commits] r25165 - in /branches/S2_5: client/control.c common/unit.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 00:00:03 2014
New Revision: 25165

URL: http://svn.gna.org/viewcvs/freeciv?rev=25165view=rev
Log:
When choosing a transporter for a unit, prefer less deeply nested ones,
then ones with more move points.

See gna bug #22189.

Modified:
branches/S2_5/client/control.c
branches/S2_5/common/unit.c

Modified: branches/S2_5/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/control.c?rev=25165r1=25164r2=25165view=diff
==
--- branches/S2_5/client/control.c  (original)
+++ branches/S2_5/client/control.c  Tue Jun 17 00:00:03 2014
@@ -1648,7 +1648,7 @@
 /
   Send a request to the server that the cargo be loaded into the transporter.
 
-  If ptransporter is NULL a transporter will be picked at random.
+  If ptransporter is NULL a suitable transporter will be chosen.
 /
 void request_unit_load(struct unit *pcargo, struct unit *ptrans)
 {

Modified: branches/S2_5/common/unit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/unit.c?rev=25165r1=25164r2=25165view=diff
==
--- branches/S2_5/common/unit.c (original)
+++ branches/S2_5/common/unit.c Tue Jun 17 00:00:03 2014
@@ -1999,15 +1999,24 @@
 /
 struct unit *transporter_for_unit(const struct unit *pcargo)
 {
-  struct tile *ptile = unit_tile(pcargo);
-
-  unit_list_iterate(ptile-units, ptrans) {
+  struct unit_list *tile_units = unit_tile(pcargo)-units;
+  struct unit *best = NULL;
+  int bestdepth = 0; /* initialiser doesn't matter */
+
+  unit_list_iterate(tile_units, ptrans) {
 if (can_unit_load(pcargo, ptrans)) {
-  return ptrans;
+  int depth = unit_transport_depth(ptrans);
+  if (!best || depth  bestdepth) {
+best = ptrans;
+bestdepth = depth;
+  } else if (depth == bestdepth
+  ptrans-moves_left  best-moves_left) {
+best = ptrans;
+  }
 }
   } unit_list_iterate_end;
 
-  return NULL;
+  return best;
 }
 
 /


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


[Freeciv-commits] r25163 - in /branches/S2_5/server: savegame.c savegame2.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 16 23:59:55 2014
New Revision: 25163

URL: http://svn.gna.org/viewcvs/freeciv?rev=25163view=rev
Log:
Protect against savegames where a unit has a higher veteran level than
the current ruleset permits it.

See gna bug #22172.

Modified:
branches/S2_5/server/savegame.c
branches/S2_5/server/savegame2.c

Modified: branches/S2_5/server/savegame.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/savegame.c?rev=25163r1=25162r2=25163view=diff
==
--- branches/S2_5/server/savegame.c (original)
+++ branches/S2_5/server/savegame.c Mon Jun 16 23:59:55 2014
@@ -1438,6 +1438,7 @@
 int nat_x, nat_y;
 const char* type_name;
 struct unit_type *type;
+int veteran;
 enum tile_special_type target;
 struct base_type *pbase = NULL;
 struct road_type *proad = NULL;
@@ -1466,9 +1467,19 @@
 plrno, i, type_name);
   exit(EXIT_FAILURE);
 }
+
+veteran
+  = secfile_lookup_int_default(file, 0, player%d.u%d.veteran, plrno, i);
+{
+  /* Protect against change in veteran system in ruleset */
+  const int levels = utype_veteran_levels(type);
+  if (veteran = levels) {
+fc_assert(levels = 1);
+veteran = levels - 1;
+  }
+}
 
-punit = unit_virtual_create(plr, NULL, type,
-  secfile_lookup_int_default(file, 0, player%d.u%d.veteran, plrno, i));
+punit = unit_virtual_create(plr, NULL, type, veteran);
 fc_assert_exit_msg(secfile_lookup_int(file, punit-id,
   player%d.u%d.id, plrno, i),
%s, secfile_error());

Modified: branches/S2_5/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/savegame2.c?rev=25163r1=25162r2=25163view=diff
==
--- branches/S2_5/server/savegame2.c(original)
+++ branches/S2_5/server/savegame2.cMon Jun 16 23:59:55 2014
@@ -5000,6 +5000,14 @@
 
   punit-veteran
 = secfile_lookup_int_default(loading-file, 0, %s.veteran, unitstr);
+  {
+/* Protect against change in veteran system in ruleset */
+const int levels = utype_veteran_levels(unit_type(punit));
+if (punit-veteran = levels) {
+  fc_assert(levels = 1);
+  punit-veteran = levels - 1;
+}
+  }
   punit-done_moving
 = secfile_lookup_bool_default(loading-file, (punit-moves_left == 0),
   %s.done_moving, unitstr);


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


[Freeciv-commits] r25168 - /branches/S2_4/client/helpdata.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 00:05:42 2014
New Revision: 25168

URL: http://svn.gna.org/viewcvs/freeciv?rev=25168view=rev
Log:
Don't claim veteran Nuclear units with no defence have increased
strength in combat; they don't.

Reported by 'vla22'.

See gna bug #22165.

Modified:
branches/S2_4/client/helpdata.c

Modified: branches/S2_4/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=25168r1=25167r2=25168view=diff
==
--- branches/S2_4/client/helpdata.c (original)
+++ branches/S2_4/client/helpdata.c Tue Jun 17 00:05:42 2014
@@ -2231,7 +2231,7 @@
  * through combat/missions/work. */
 CATLSTR(buf, bufsz, _(* May acquire veteran status.\n));
 if (utype_veteran_has_power_bonus(utype)) {
-  if (utype-attack_strength  0
+  if ((!utype_has_flag(utype, F_NUCLEAR)  utype-attack_strength  0)
   || utype-defense_strength  0) {
 CATLSTR(buf, bufsz,
 _(  * Veterans have increased strength in combat.\n));


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


[Freeciv-commits] r25169 - in /branches/S2_4/server: savegame.c savegame2.c

2014-06-16 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 00:06:27 2014
New Revision: 25169

URL: http://svn.gna.org/viewcvs/freeciv?rev=25169view=rev
Log:
Protect against savegames where a unit has a higher veteran level than
the current ruleset permits it.

See gna bug #22172.

Modified:
branches/S2_4/server/savegame.c
branches/S2_4/server/savegame2.c

Modified: branches/S2_4/server/savegame.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/savegame.c?rev=25169r1=25168r2=25169view=diff
==
--- branches/S2_4/server/savegame.c (original)
+++ branches/S2_4/server/savegame.c Tue Jun 17 00:06:27 2014
@@ -1943,6 +1943,7 @@
 int nat_x, nat_y;
 const char* type_name;
 struct unit_type *type;
+int veteran;
 enum tile_special_type target;
 struct base_type *pbase = NULL;
 int base;
@@ -1969,9 +1970,19 @@
 plrno, i, type_name);
   exit(EXIT_FAILURE);
 }
+
+veteran
+  = secfile_lookup_int_default(file, 0, player%d.u%d.veteran, plrno, i);
+{
+  /* Protect against change in veteran system in ruleset */
+  const int levels = utype_veteran_levels(type);
+  if (veteran = levels) {
+fc_assert(levels = 1);
+veteran = levels - 1;
+  }
+}
 
-punit = unit_virtual_create(plr, NULL, type,
-  secfile_lookup_int_default(file, 0, player%d.u%d.veteran, plrno, i));
+punit = unit_virtual_create(plr, NULL, type, veteran);
 fc_assert_exit_msg(secfile_lookup_int(file, punit-id,
   player%d.u%d.id, plrno, i),
%s, secfile_error());

Modified: branches/S2_4/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/savegame2.c?rev=25169r1=25168r2=25169view=diff
==
--- branches/S2_4/server/savegame2.c(original)
+++ branches/S2_4/server/savegame2.cTue Jun 17 00:06:27 2014
@@ -4562,6 +4562,14 @@
 
   punit-veteran
 = secfile_lookup_int_default(loading-file, 0, %s.veteran, unitstr);
+  {
+/* Protect against change in veteran system in ruleset */
+const int levels = utype_veteran_levels(unit_type(punit));
+if (punit-veteran = levels) {
+  fc_assert(levels = 1);
+  punit-veteran = levels - 1;
+}
+  }
   punit-done_moving
 = secfile_lookup_bool_default(loading-file, (punit-moves_left == 0),
   %s.done_moving, unitstr);


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


[Freeciv-commits] r25171 - in /trunk/data: alien/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:14 2014
New Revision: 25171

URL: http://svn.gna.org/viewcvs/freeciv?rev=25171view=rev
Log:
Clarify function of NoVeteran flag in ruleset comments.

See gna bug #22200.

Modified:
trunk/data/alien/units.ruleset
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25171r1=25170r2=25171view=diff
==
--- trunk/data/alien/units.ruleset  (original)
+++ trunk/data/alien/units.ruleset  Tue Jun 17 11:07:14 2014
@@ -295,7 +295,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25171r1=25170r2=25171view=diff
==
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Tue Jun 17 11:07:14 2014
@@ -337,7 +337,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25171r1=25170r2=25171view=diff
==
--- trunk/data/classic/units.ruleset(original)
+++ trunk/data/classic/units.rulesetTue Jun 17 11:07:14 2014
@@ -314,7 +314,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25171r1=25170r2=25171view=diff
==
--- trunk/data/experimental/units.ruleset   (original)
+++ trunk/data/experimental/units.ruleset   Tue Jun 17 11:07:14 2014
@@ -328,7 +328,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: trunk/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=25171r1=25170r2=25171view=diff
==
--- trunk/data/multiplayer/units.ruleset(original)
+++ trunk/data/multiplayer/units.rulesetTue Jun 17 11:07:14 2014
@@ 

[Freeciv-commits] r25170 - in /trunk/data: civ1/units.ruleset civ2/units.ruleset

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:10 2014
New Revision: 25170

URL: http://svn.gna.org/viewcvs/freeciv?rev=25170view=rev
Log:
Reduce strength of veteran Diplomats in civ1/civ2 back to 2.3 levels.

See gna bug #22202.

Modified:
trunk/data/civ1/units.ruleset
trunk/data/civ2/units.ruleset

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25170r1=25169r2=25170view=diff
==
--- trunk/data/civ1/units.ruleset   (original)
+++ trunk/data/civ1/units.ruleset   Tue Jun 17 11:07:10 2014
@@ -1163,6 +1163,11 @@
 uk_food   = 0
 uk_gold   = 0
 flags = Diplomat, IgZOC, NonMil, NoVeteran
+veteran_names = _(green), _(veteran)
+veteran_raise_chance = 0, 0
+veteran_work_raise_chance = 0, 0
+veteran_power_fact = 100, 110
+veteran_move_bonus = 0, 0
 roles = Explorer, Diplomat
 helptext  = _(\
 A Diplomat is an official that carries your dispatches and\

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25170r1=25169r2=25170view=diff
==
--- trunk/data/civ2/units.ruleset   (original)
+++ trunk/data/civ2/units.ruleset   Tue Jun 17 11:07:10 2014
@@ -1863,6 +1863,11 @@
 uk_food   = 0
 uk_gold   = 0
 flags = Diplomat, IgZOC, NonMil, NoVeteran
+veteran_names = _(green), _(veteran)
+veteran_raise_chance = 0, 0
+veteran_work_raise_chance = 0, 0
+veteran_power_fact = 100, 110
+veteran_move_bonus = 0, 0
 roles = Diplomat
 helptext  = _(\
 A Diplomat is an official that carries your dispatches and\


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


[Freeciv-commits] r25175 - in /trunk/data: civ2civ3/units.ruleset classic/units.ruleset experimental/units.ruleset multiplayer/units.ruleset

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:27 2014
New Revision: 25175

URL: http://svn.gna.org/viewcvs/freeciv?rev=25175view=rev
Log:
Add single-level veteran systems to all units that had no way to achieve
veterancy in practice, so that the help and UI reflects this.

See gna bug #22203.

Modified:
trunk/data/civ2civ3/units.ruleset
trunk/data/classic/units.ruleset
trunk/data/experimental/units.ruleset
trunk/data/multiplayer/units.ruleset

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25175r1=25174r2=25175view=diff
==
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Tue Jun 17 11:07:27 2014
@@ -425,7 +425,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 1
-flags = Settlers, NonMil, AddToCity, Cities, NoVeteran
+flags = Settlers, NonMil, AddToCity, Cities
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Cities
 helptext  = _(\
 Settlers are one of the key units in the game. As well as building new\
@@ -460,7 +466,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 1
-flags = Settlers, NonMil, AddToCity, NoVeteran, Capturable
+flags = Settlers, NonMil, AddToCity, Capturable
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Settlers
 helptext  = _(\
 Migrants are like Workers in that they can improve terrain.\
@@ -493,7 +505,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 1
-flags = Settlers, NonMil, Airbase, NoVeteran
+flags = Settlers, NonMil, Airbase
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Settlers
 helptext  = _(\
 Workers are similar to Settlers in that they can improve terrain --\
@@ -2000,6 +2018,12 @@
 uk_food   = 0
 uk_gold   = 1
 flags = FieldUnit, OneAttack, Nuclear, AirAttacker
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = 
 helptext  = _(\
 You can start building Nuclear units when you have the required\
@@ -2333,8 +2357,13 @@
 uk_food   = 0
 uk_gold   = 0
 flags = IgZOC, NonMil, NoBuild, NoHome, SuperSpy, 
-Undisbandable, Unbribable, GameLoss, Unique,
-NoVeteran
+Undisbandable, Unbribable, GameLoss, Unique
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = GameLoss
 helptext  = _(\
 This is you. If you lose this unit, you lose the game. So don't.\
@@ -2367,6 +2396,12 @@
 uk_gold   = 0
 flags = IgZOC, NonMil, Unbribable,
 Undisbandable, SuperSpy, NoHome, NoBuild
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = BarbarianLeader
 helptext  = _(\
 One Barbarian Leader appears every time there is a barbarian uprising\

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25175r1=25174r2=25175view=diff
==
--- trunk/data/classic/units.ruleset(original)
+++ trunk/data/classic/units.rulesetTue Jun 17 11:07:27 2014
@@ -42,7 +42,7 @@
 
 ; The percentage chance of a settler/engineer increasing level through
 ; performing useful work (per turn)
-veteran_work_raise_chance = 5, 3, 1, 0
+veteran_work_raise_chance = 0, 0, 0, 0
 
 ; Power factors are as a percentage.
 ; +50% is represented by 150
@@ -402,7 +402,13 @@
 uk_shield = 1
 uk_food   = 1
 uk_gold   = 0
-flags = Settlers, NonMil, AddToCity, Cities, NoVeteran
+flags = Settlers, NonMil, AddToCity, Cities
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Cities
 helptext  = _(\
 Settlers are one of the key units in the game. As well as building new\
@@ -440,7 +446,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 0
-flags = Settlers, NonMil, Airbase, NoVeteran
+flags = 

[Freeciv-commits] r25174 - /trunk/client/helpdata.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:24 2014
New Revision: 25174

URL: http://svn.gna.org/viewcvs/freeciv?rev=25174view=rev
Log:
Fix help not to suppress veteran information for NoVeteran units (since
they may become veteran by other means than experience).

See gna bug #22201.

Modified:
trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25174r1=25173r2=25174view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Tue Jun 17 11:07:24 2014
@@ -2726,7 +2726,7 @@
 char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
const char *user_text, struct unit_type *utype)
 {
-  bool can_be_veteran;
+  bool has_vet_levels;
   int flagid;
 
   fc_assert_ret_val(NULL != buf  0  bufsz  NULL != user_text, NULL);
@@ -2737,8 +2737,7 @@
 return buf;
   }
 
-  can_be_veteran = !utype_has_flag(utype, UTYF_NO_VETERAN)
- utype_veteran_levels(utype)  1;
+  has_vet_levels = utype_veteran_levels(utype)  1;
 
   buf[0] = '\0';
 
@@ -3277,8 +3276,8 @@
action_prepare_ui_name(act, , ));
 }
   } action_iterate_end;
-  if (!can_be_veteran) {
-/* Only mention this if the game generally has veteran levels. */
+  if (!has_vet_levels) {
+/* Only mention this if the game generally does have veteran levels. */
 if (game.veteran-levels  1) {
   CATLSTR(buf, bufsz, _(* Will never achieve veteran status.\n));
 }
@@ -3293,7 +3292,8 @@
 #endif
 /* FIXME: if we knew the raise chances on the client, we could be
  * more specific here about whether veteran status can be acquired
- * through combat/missions/work. */
+ * through combat/missions/work. Should also take into account
+ * UTYF_NO_VETERAN when writing this text. (Gna patch #4794) */
 CATLSTR(buf, bufsz, _(* May acquire veteran status.\n));
 if (utype_veteran_has_power_bonus(utype)) {
   if ((!utype_has_flag(utype, UTYF_NUCLEAR)  utype-attack_strength  0)
@@ -3322,7 +3322,7 @@
   if (strlen(buf)  0) {
 CATLSTR(buf, bufsz, \n);
   }
-  if (can_be_veteran  utype-veteran) {
+  if (has_vet_levels  utype-veteran) {
 /* The case where the unit has only a single veteran level has already
  * been handled above, so keep quiet here if that happens */
 if (insert_veteran_help(buf, bufsz, utype-veteran,


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


[Freeciv-commits] r25173 - /trunk/common/unittype.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:20 2014
New Revision: 25173

URL: http://svn.gna.org/viewcvs/freeciv?rev=25173view=rev
Log:
Don't suppress display of veteran level for NoVeteran units.

See gna bug #22199.

Modified:
trunk/common/unittype.c

Modified: trunk/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.c?rev=25173r1=25172r2=25173view=diff
==
--- trunk/common/unittype.c (original)
+++ trunk/common/unittype.c Tue Jun 17 11:07:20 2014
@@ -1179,8 +1179,7 @@
 const char *utype_veteran_name_translation(const struct unit_type *punittype,
int level)
 {
-  if (utype_has_flag(punittype, UTYF_NO_VETERAN)
-  || utype_veteran_levels(punittype) = 1) {
+  if (utype_veteran_levels(punittype) = 1) {
 return NULL;
   } else {
 const struct veteran_level *vlvl = utype_veteran_level(punittype, level);


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


[Freeciv-commits] r25172 - in /trunk: client/gui-gtk-2.0/editprop.c client/gui-gtk-3.0/editprop.c server/edithand.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:17 2014
New Revision: 25172

URL: http://svn.gna.org/viewcvs/freeciv?rev=25172view=rev
Log:
Allow setting veteran level for NoVeteran units in editor.

See gna bug #22198.

Modified:
trunk/client/gui-gtk-2.0/editprop.c
trunk/client/gui-gtk-3.0/editprop.c
trunk/server/edithand.c

Modified: trunk/client/gui-gtk-2.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/editprop.c?rev=25172r1=25171r2=25172view=diff
==
--- trunk/client/gui-gtk-2.0/editprop.c (original)
+++ trunk/client/gui-gtk-2.0/editprop.c Tue Jun 17 11:07:17 2014
@@ -1892,11 +1892,7 @@
 return TRUE;
   case OPID_UNIT_VETERAN:
 *pmin = 0;
-if (unit_has_type_flag(punit, UTYF_NO_VETERAN)) {
-  *pmax = 0;
-} else {
-  *pmax = utype_veteran_levels(putype) - 1;
-}
+*pmax = utype_veteran_levels(putype) - 1;
 *pstep = 1;
 *pbig_step = 3;
 return TRUE;

Modified: trunk/client/gui-gtk-3.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/editprop.c?rev=25172r1=25171r2=25172view=diff
==
--- trunk/client/gui-gtk-3.0/editprop.c (original)
+++ trunk/client/gui-gtk-3.0/editprop.c Tue Jun 17 11:07:17 2014
@@ -1892,11 +1892,7 @@
 return TRUE;
   case OPID_UNIT_VETERAN:
 *pmin = 0;
-if (unit_has_type_flag(punit, UTYF_NO_VETERAN)) {
-  *pmax = 0;
-} else {
-  *pmax = utype_veteran_levels(putype) - 1;
-}
+*pmax = utype_veteran_levels(putype) - 1;
 *pstep = 1;
 *pbig_step = 3;
 return TRUE;

Modified: trunk/server/edithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/edithand.c?rev=25172r1=25171r2=25172view=diff
==
--- trunk/server/edithand.c (original)
+++ trunk/server/edithand.c Tue Jun 17 11:07:17 2014
@@ -809,8 +809,7 @@
 changed = TRUE;
   }
 
-  if (packet-veteran != punit-veteran
-   !unit_has_type_flag(punit, UTYF_NO_VETERAN)) {
+  if (packet-veteran != punit-veteran) {
 int v = packet-veteran;
 if (!utype_veteran_level(putype, v)) {
   notify_conn(pc-self, NULL, E_BAD_COMMAND, ftc_editor,


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


[Freeciv-commits] r25176 - in /branches/S2_5/data: civ1/units.ruleset civ2/units.ruleset

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:07:57 2014
New Revision: 25176

URL: http://svn.gna.org/viewcvs/freeciv?rev=25176view=rev
Log:
Reduce strength of veteran Diplomats in civ1/civ2 back to 2.3 levels.

See gna bug #22202.

Modified:
branches/S2_5/data/civ1/units.ruleset
branches/S2_5/data/civ2/units.ruleset

Modified: branches/S2_5/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25176r1=25175r2=25176view=diff
==
--- branches/S2_5/data/civ1/units.ruleset   (original)
+++ branches/S2_5/data/civ1/units.ruleset   Tue Jun 17 11:07:57 2014
@@ -1162,6 +1162,11 @@
 uk_food   = 0
 uk_gold   = 0
 flags = Diplomat, IgZOC, NonMil, NoVeteran
+veteran_names = _(green), _(veteran)
+veteran_raise_chance = 0, 0
+veteran_work_raise_chance = 0, 0
+veteran_power_fact = 100, 110
+veteran_move_bonus = 0, 0
 roles = Explorer, Diplomat
 helptext  = _(\
 A Diplomat is an official that carries your dispatches and\

Modified: branches/S2_5/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25176r1=25175r2=25176view=diff
==
--- branches/S2_5/data/civ2/units.ruleset   (original)
+++ branches/S2_5/data/civ2/units.ruleset   Tue Jun 17 11:07:57 2014
@@ -1862,6 +1862,11 @@
 uk_food   = 0
 uk_gold   = 0
 flags = Diplomat, IgZOC, NonMil, NoVeteran
+veteran_names = _(green), _(veteran)
+veteran_raise_chance = 0, 0
+veteran_work_raise_chance = 0, 0
+veteran_power_fact = 100, 110
+veteran_move_bonus = 0, 0
 roles = Diplomat
 helptext  = _(\
 A Diplomat is an official that carries your dispatches and\


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


[Freeciv-commits] r25177 - in /branches/S2_5/data: alien/ civ2civ3/ classic/ experimental/ multiplayer/

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:08:00 2014
New Revision: 25177

URL: http://svn.gna.org/viewcvs/freeciv?rev=25177view=rev
Log:
Clarify function of NoVeteran flag in ruleset comments.

See gna bug #22200.

Modified:
branches/S2_5/data/alien/units.ruleset
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

Modified: branches/S2_5/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25177r1=25176r2=25177view=diff
==
--- branches/S2_5/data/alien/units.ruleset  (original)
+++ branches/S2_5/data/alien/units.ruleset  Tue Jun 17 11:08:00 2014
@@ -293,7 +293,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25177r1=25176r2=25177view=diff
==
--- branches/S2_5/data/civ2civ3/units.ruleset   (original)
+++ branches/S2_5/data/civ2civ3/units.ruleset   Tue Jun 17 11:08:00 2014
@@ -334,7 +334,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: branches/S2_5/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25177r1=25176r2=25177view=diff
==
--- branches/S2_5/data/classic/units.ruleset(original)
+++ branches/S2_5/data/classic/units.rulesetTue Jun 17 11:08:00 2014
@@ -311,7 +311,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: branches/S2_5/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25177r1=25176r2=25177view=diff
==
--- branches/S2_5/data/experimental/units.ruleset   (original)
+++ branches/S2_5/data/experimental/units.ruleset   Tue Jun 17 11:08:00 2014
@@ -325,7 +325,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: branches/S2_5/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/units.ruleset?rev=25177r1=25176r2=25177view=diff

[Freeciv-commits] r25178 - in /branches/S2_5: client/gui-gtk-2.0/editprop.c client/gui-gtk-3.0/editprop.c server/edithand.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:08:04 2014
New Revision: 25178

URL: http://svn.gna.org/viewcvs/freeciv?rev=25178view=rev
Log:
Allow setting veteran level for NoVeteran units in editor.

See gna bug #22198.

Modified:
branches/S2_5/client/gui-gtk-2.0/editprop.c
branches/S2_5/client/gui-gtk-3.0/editprop.c
branches/S2_5/server/edithand.c

Modified: branches/S2_5/client/gui-gtk-2.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/editprop.c?rev=25178r1=25177r2=25178view=diff
==
--- branches/S2_5/client/gui-gtk-2.0/editprop.c (original)
+++ branches/S2_5/client/gui-gtk-2.0/editprop.c Tue Jun 17 11:08:04 2014
@@ -1881,11 +1881,7 @@
 return TRUE;
   case OPID_UNIT_VETERAN:
 *pmin = 0;
-if (unit_has_type_flag(punit, UTYF_NO_VETERAN)) {
-  *pmax = 0;
-} else {
-  *pmax = utype_veteran_levels(putype) - 1;
-}
+*pmax = utype_veteran_levels(putype) - 1;
 *pstep = 1;
 *pbig_step = 3;
 return TRUE;

Modified: branches/S2_5/client/gui-gtk-3.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/editprop.c?rev=25178r1=25177r2=25178view=diff
==
--- branches/S2_5/client/gui-gtk-3.0/editprop.c (original)
+++ branches/S2_5/client/gui-gtk-3.0/editprop.c Tue Jun 17 11:08:04 2014
@@ -1881,11 +1881,7 @@
 return TRUE;
   case OPID_UNIT_VETERAN:
 *pmin = 0;
-if (unit_has_type_flag(punit, UTYF_NO_VETERAN)) {
-  *pmax = 0;
-} else {
-  *pmax = utype_veteran_levels(putype) - 1;
-}
+*pmax = utype_veteran_levels(putype) - 1;
 *pstep = 1;
 *pbig_step = 3;
 return TRUE;

Modified: branches/S2_5/server/edithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/edithand.c?rev=25178r1=25177r2=25178view=diff
==
--- branches/S2_5/server/edithand.c (original)
+++ branches/S2_5/server/edithand.c Tue Jun 17 11:08:04 2014
@@ -854,8 +854,7 @@
 changed = TRUE;
   }
 
-  if (packet-veteran != punit-veteran
-   !unit_has_type_flag(punit, UTYF_NO_VETERAN)) {
+  if (packet-veteran != punit-veteran) {
 int v = packet-veteran;
 if (!utype_veteran_level(putype, v)) {
   notify_conn(pc-self, NULL, E_BAD_COMMAND, ftc_editor,


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


[Freeciv-commits] r25179 - /branches/S2_5/common/unittype.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:08:07 2014
New Revision: 25179

URL: http://svn.gna.org/viewcvs/freeciv?rev=25179view=rev
Log:
Don't suppress display of veteran level for NoVeteran units.

See gna bug #22199.

Modified:
branches/S2_5/common/unittype.c

Modified: branches/S2_5/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/unittype.c?rev=25179r1=25178r2=25179view=diff
==
--- branches/S2_5/common/unittype.c (original)
+++ branches/S2_5/common/unittype.c Tue Jun 17 11:08:07 2014
@@ -1183,8 +1183,7 @@
 const char *utype_veteran_name_translation(const struct unit_type *punittype,
int level)
 {
-  if (utype_has_flag(punittype, UTYF_NO_VETERAN)
-  || utype_veteran_levels(punittype) = 1) {
+  if (utype_veteran_levels(punittype) = 1) {
 return NULL;
   } else {
 const struct veteran_level *vlvl = utype_veteran_level(punittype, level);


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


[Freeciv-commits] r25180 - /branches/S2_5/client/helpdata.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:08:10 2014
New Revision: 25180

URL: http://svn.gna.org/viewcvs/freeciv?rev=25180view=rev
Log:
Fix help not to suppress veteran information for NoVeteran units (since
they may become veteran by other means than experience).

See gna bug #22201.

Modified:
branches/S2_5/client/helpdata.c

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25180r1=25179r2=25180view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Tue Jun 17 11:08:10 2014
@@ -2116,7 +2116,7 @@
 char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
const char *user_text, struct unit_type *utype)
 {
-  bool can_be_veteran;
+  bool has_vet_levels;
   int flagid;
 
   fc_assert_ret_val(NULL != buf  0  bufsz  NULL != user_text, NULL);
@@ -2127,8 +2127,7 @@
 return buf;
   }
 
-  can_be_veteran = !utype_has_flag(utype, UTYF_NO_VETERAN)
- utype_veteran_levels(utype)  1;
+  has_vet_levels = utype_veteran_levels(utype)  1;
 
   buf[0] = '\0';
 
@@ -2636,8 +2635,8 @@
   astr_free(list);
 }
   }
-  if (!can_be_veteran) {
-/* Only mention this if the game generally has veteran levels. */
+  if (!has_vet_levels) {
+/* Only mention this if the game generally does have veteran levels. */
 if (game.veteran-levels  1) {
   CATLSTR(buf, bufsz, _(* Will never achieve veteran status.\n));
 }
@@ -2652,7 +2651,8 @@
 #endif
 /* FIXME: if we knew the raise chances on the client, we could be
  * more specific here about whether veteran status can be acquired
- * through combat/missions/work. */
+ * through combat/missions/work. Should also take into account
+ * UTYF_NO_VETERAN when writing this text. (Gna patch #4794) */
 CATLSTR(buf, bufsz, _(* May acquire veteran status.\n));
 if (utype_veteran_has_power_bonus(utype)) {
   if ((!utype_has_flag(utype, UTYF_NUCLEAR)  utype-attack_strength  0)
@@ -2681,7 +2681,7 @@
   if (strlen(buf)  0) {
 CATLSTR(buf, bufsz, \n);
   }
-  if (can_be_veteran  utype-veteran) {
+  if (has_vet_levels  utype-veteran) {
 /* The case where the unit has only a single veteran level has already
  * been handled above, so keep quiet here if that happens */
 if (insert_veteran_help(buf, bufsz, utype-veteran,


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


[Freeciv-commits] r25181 - in /branches/S2_5/data: civ2civ3/ classic/ experimental/ multiplayer/

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:08:13 2014
New Revision: 25181

URL: http://svn.gna.org/viewcvs/freeciv?rev=25181view=rev
Log:
Add single-level veteran systems to all units that had no way to achieve
veterancy in practice, so that the help and UI reflects this.

See gna bug #22203.

Modified:
branches/S2_5/data/civ2civ3/units.ruleset
branches/S2_5/data/classic/units.ruleset
branches/S2_5/data/experimental/units.ruleset
branches/S2_5/data/multiplayer/units.ruleset

Modified: branches/S2_5/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25181r1=25180r2=25181view=diff
==
--- branches/S2_5/data/civ2civ3/units.ruleset   (original)
+++ branches/S2_5/data/civ2civ3/units.ruleset   Tue Jun 17 11:08:13 2014
@@ -422,7 +422,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 1
-flags = Settlers, NonMil, AddToCity, Cities, NoVeteran
+flags = Settlers, NonMil, AddToCity, Cities
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Cities
 helptext  = _(\
 Settlers are one of the key units in the game. As well as building new\
@@ -457,7 +463,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 1
-flags = Settlers, NonMil, AddToCity, NoVeteran, Capturable
+flags = Settlers, NonMil, AddToCity, Capturable
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Settlers
 helptext  = _(\
 Migrants are like Workers in that they can improve terrain.\
@@ -490,7 +502,13 @@
 uk_shield = 1
 uk_food   = 0
 uk_gold   = 1
-flags = Settlers, NonMil, Airbase, NoVeteran
+flags = Settlers, NonMil, Airbase
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Settlers
 helptext  = _(\
 Workers are similar to Settlers in that they can improve terrain --\
@@ -1997,6 +2015,12 @@
 uk_food   = 0
 uk_gold   = 1
 flags = FieldUnit, OneAttack, Nuclear, AirAttacker
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = 
 helptext  = _(\
 You can start building Nuclear units when you have the required\
@@ -2330,8 +2354,13 @@
 uk_food   = 0
 uk_gold   = 0
 flags = IgZOC, NonMil, NoBuild, NoHome, SuperSpy, 
-Undisbandable, Unbribable, GameLoss, Unique,
-NoVeteran
+Undisbandable, Unbribable, GameLoss, Unique
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = GameLoss
 helptext  = _(\
 This is you. If you lose this unit, you lose the game. So don't.\
@@ -2364,6 +2393,12 @@
 uk_gold   = 0
 flags = IgZOC, NonMil, Unbribable,
 Undisbandable, SuperSpy, NoHome, NoBuild
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = BarbarianLeader
 helptext  = _(\
 One Barbarian Leader appears every time there is a barbarian uprising\

Modified: branches/S2_5/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25181r1=25180r2=25181view=diff
==
--- branches/S2_5/data/classic/units.ruleset(original)
+++ branches/S2_5/data/classic/units.rulesetTue Jun 17 11:08:13 2014
@@ -41,7 +41,7 @@
 
 ; The percentage chance of a settler/engineer increasing level through
 ; performing useful work (per turn)
-veteran_work_raise_chance = 5, 3, 1, 0
+veteran_work_raise_chance = 0, 0, 0, 0
 
 ; Power factors are as a percentage.
 ; +50% is represented by 150
@@ -399,7 +399,13 @@
 uk_shield = 1
 uk_food   = 1
 uk_gold   = 0
-flags = Settlers, NonMil, AddToCity, Cities, NoVeteran
+flags = Settlers, NonMil, AddToCity, Cities
+; No veteran levels (level name is never displayed)
+veteran_names = _(green)
+veteran_raise_chance = 0
+veteran_work_raise_chance = 0
+veteran_power_fact = 100
+veteran_move_bonus = 0
 roles = Cities
 helptext  = _(\
 Settlers are one of the key units in the game. As well as building new\
@@ -437,7 +443,13 @@
 uk_shield = 1
 uk_food   = 0
 

[Freeciv-commits] r25183 - in /branches/S2_4/data: default/units.ruleset experimental/units.ruleset multiplayer/units.ruleset

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:11:55 2014
New Revision: 25183

URL: http://svn.gna.org/viewcvs/freeciv?rev=25183view=rev
Log:
Clarify function of NoVeteran flag in ruleset comments.

See gna bug #22200.

Modified:
branches/S2_4/data/default/units.ruleset
branches/S2_4/data/experimental/units.ruleset
branches/S2_4/data/multiplayer/units.ruleset

Modified: branches/S2_4/data/default/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/default/units.ruleset?rev=25183r1=25182r2=25183view=diff
==
--- branches/S2_4/data/default/units.ruleset(original)
+++ branches/S2_4/data/default/units.rulesetTue Jun 17 11:11:55 2014
@@ -252,7 +252,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: branches/S2_4/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/experimental/units.ruleset?rev=25183r1=25182r2=25183view=diff
==
--- branches/S2_4/data/experimental/units.ruleset   (original)
+++ branches/S2_4/data/experimental/units.ruleset   Tue Jun 17 11:11:55 2014
@@ -266,7 +266,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots

Modified: branches/S2_4/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/multiplayer/units.ruleset?rev=25183r1=25182r2=25183view=diff
==
--- branches/S2_4/data/multiplayer/units.ruleset(original)
+++ branches/S2_4/data/multiplayer/units.rulesetTue Jun 17 11:11:55 2014
@@ -252,7 +252,9 @@
 ; NoHome = this unit has no homecity and will be free of all upkeep, and
 ;therefore will not revolt along with its city of origin should
 ;it be incited
-; NoVeteran   = this unit cannot become veteran
+; NoVeteran   = this unit cannot gain veteran levels through experience
+; (as if both raise_chance and work_raise_chance were zero);
+; it can still gain veterancy through Veteran_Build, etc
 ; Bombarder   = this unit cannot kill other units, only damage them, but
 ; also is not harmed by return fire when attacking; the field
 ; bombard_rate regulates its number of shots


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


[Freeciv-commits] r25182 - in /branches/S2_4/data: civ1/units.ruleset civ2/units.ruleset

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:11:52 2014
New Revision: 25182

URL: http://svn.gna.org/viewcvs/freeciv?rev=25182view=rev
Log:
Reduce strength of veteran Diplomats in civ1/civ2 back to 2.3 levels.

See gna bug #22202.

Modified:
branches/S2_4/data/civ1/units.ruleset
branches/S2_4/data/civ2/units.ruleset

Modified: branches/S2_4/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/civ1/units.ruleset?rev=25182r1=25181r2=25182view=diff
==
--- branches/S2_4/data/civ1/units.ruleset   (original)
+++ branches/S2_4/data/civ1/units.ruleset   Tue Jun 17 11:11:52 2014
@@ -1103,6 +1103,11 @@
 uk_food   = 0
 uk_gold   = 0
 flags = Diplomat, IgZOC, NonMil, NoVeteran
+veteran_names = _(green), _(veteran)
+veteran_raise_chance = 0, 0
+veteran_work_raise_chance = 0, 0
+veteran_power_fact = 100, 110
+veteran_move_bonus = 0, 0
 roles = Explorer, Diplomat
 helptext  = _(\
 A Diplomat is an official that carries your dispatches and\

Modified: branches/S2_4/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/civ2/units.ruleset?rev=25182r1=25181r2=25182view=diff
==
--- branches/S2_4/data/civ2/units.ruleset   (original)
+++ branches/S2_4/data/civ2/units.ruleset   Tue Jun 17 11:11:52 2014
@@ -1784,6 +1784,11 @@
 uk_food   = 0
 uk_gold   = 0
 flags = Diplomat, IgZOC, NonMil, NoVeteran
+veteran_names = _(green), _(veteran)
+veteran_raise_chance = 0, 0
+veteran_work_raise_chance = 0, 0
+veteran_power_fact = 100, 110
+veteran_move_bonus = 0, 0
 roles = Diplomat
 helptext  = _(\
 A Diplomat is an official that carries your dispatches and\


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


[Freeciv-commits] r25184 - in /branches/S2_4: client/gui-gtk-2.0/editprop.c client/gui-gtk-3.0/editprop.c server/edithand.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:11:59 2014
New Revision: 25184

URL: http://svn.gna.org/viewcvs/freeciv?rev=25184view=rev
Log:
Allow setting veteran level for NoVeteran units in editor.

See gna bug #22198.

Modified:
branches/S2_4/client/gui-gtk-2.0/editprop.c
branches/S2_4/client/gui-gtk-3.0/editprop.c
branches/S2_4/server/edithand.c

Modified: branches/S2_4/client/gui-gtk-2.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/gui-gtk-2.0/editprop.c?rev=25184r1=25183r2=25184view=diff
==
--- branches/S2_4/client/gui-gtk-2.0/editprop.c (original)
+++ branches/S2_4/client/gui-gtk-2.0/editprop.c Tue Jun 17 11:11:59 2014
@@ -1866,11 +1866,7 @@
 return TRUE;
   case OPID_UNIT_VETERAN:
 *pmin = 0;
-if (unit_has_type_flag(punit, F_NO_VETERAN)) {
-  *pmax = 0;
-} else {
-  *pmax = utype_veteran_levels(putype) - 1;
-}
+*pmax = utype_veteran_levels(putype) - 1;
 *pstep = 1;
 *pbig_step = 3;
 return TRUE;

Modified: branches/S2_4/client/gui-gtk-3.0/editprop.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/gui-gtk-3.0/editprop.c?rev=25184r1=25183r2=25184view=diff
==
--- branches/S2_4/client/gui-gtk-3.0/editprop.c (original)
+++ branches/S2_4/client/gui-gtk-3.0/editprop.c Tue Jun 17 11:11:59 2014
@@ -1866,11 +1866,7 @@
 return TRUE;
   case OPID_UNIT_VETERAN:
 *pmin = 0;
-if (unit_has_type_flag(punit, F_NO_VETERAN)) {
-  *pmax = 0;
-} else {
-  *pmax = utype_veteran_levels(putype) - 1;
-}
+*pmax = utype_veteran_levels(putype) - 1;
 *pstep = 1;
 *pbig_step = 3;
 return TRUE;

Modified: branches/S2_4/server/edithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/edithand.c?rev=25184r1=25183r2=25184view=diff
==
--- branches/S2_4/server/edithand.c (original)
+++ branches/S2_4/server/edithand.c Tue Jun 17 11:11:59 2014
@@ -726,8 +726,7 @@
 changed = TRUE;
   }
 
-  if (packet-veteran != punit-veteran
-   !unit_has_type_flag(punit, F_NO_VETERAN)) {
+  if (packet-veteran != punit-veteran) {
 int v = packet-veteran;
 if (!utype_veteran_level(putype, v)) {
   notify_conn(pc-self, NULL, E_BAD_COMMAND, ftc_editor,


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


[Freeciv-commits] r25187 - in /branches/S2_4/data: default/effects.ruleset experimental/effects.ruleset multiplayer/effects.ruleset

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:12:08 2014
New Revision: 25187

URL: http://svn.gna.org/viewcvs/freeciv?rev=25187view=rev
Log:
Prevent Nuclear units from being pointlessly built as veteran
(it has no effect).

Reported by 'vla22'.

See gna bug #22164.

Modified:
branches/S2_4/data/default/effects.ruleset
branches/S2_4/data/experimental/effects.ruleset
branches/S2_4/data/multiplayer/effects.ruleset

Modified: branches/S2_4/data/default/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/default/effects.ruleset?rev=25187r1=25186r2=25187view=diff
==
--- branches/S2_4/data/default/effects.ruleset  (original)
+++ branches/S2_4/data/default/effects.ruleset  Tue Jun 17 11:12:08 2014
@@ -721,6 +721,7 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
+  UnitFlag, Nuclear, Local
 }
 
 [effect_airport_1]

Modified: branches/S2_4/data/experimental/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/experimental/effects.ruleset?rev=25187r1=25186r2=25187view=diff
==
--- branches/S2_4/data/experimental/effects.ruleset (original)
+++ branches/S2_4/data/experimental/effects.ruleset Tue Jun 17 11:12:08 2014
@@ -777,6 +777,7 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
+  UnitFlag, Nuclear, Local
 }
 
 [effect_airport_1]

Modified: branches/S2_4/data/multiplayer/effects.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/data/multiplayer/effects.ruleset?rev=25187r1=25186r2=25187view=diff
==
--- branches/S2_4/data/multiplayer/effects.ruleset  (original)
+++ branches/S2_4/data/multiplayer/effects.ruleset  Tue Jun 17 11:12:08 2014
@@ -746,6 +746,7 @@
 { type, name, range
   UnitFlag, NonMil, Local
   UnitFlag, NoVeteran, Local
+  UnitFlag, Nuclear, Local
 }
 
 [effect_airport_1]


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


[Freeciv-commits] r25185 - /branches/S2_4/common/unittype.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:12:02 2014
New Revision: 25185

URL: http://svn.gna.org/viewcvs/freeciv?rev=25185view=rev
Log:
Don't suppress display of veteran level for NoVeteran units.

See gna bug #22199.

Modified:
branches/S2_4/common/unittype.c

Modified: branches/S2_4/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/common/unittype.c?rev=25185r1=25184r2=25185view=diff
==
--- branches/S2_4/common/unittype.c (original)
+++ branches/S2_4/common/unittype.c Tue Jun 17 11:12:02 2014
@@ -1157,8 +1157,7 @@
 const char *utype_veteran_name_translation(const struct unit_type *punittype,
int level)
 {
-  if (utype_has_flag(punittype, F_NO_VETERAN)
-  || utype_veteran_levels(punittype) = 1) {
+  if (utype_veteran_levels(punittype) = 1) {
 return NULL;
   } else {
 const struct veteran_level *vlvl = utype_veteran_level(punittype, level);


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


[Freeciv-commits] r25186 - /branches/S2_4/client/helpdata.c

2014-06-17 Thread 0jacobnk . gna
Author: jtn
Date: Tue Jun 17 11:12:05 2014
New Revision: 25186

URL: http://svn.gna.org/viewcvs/freeciv?rev=25186view=rev
Log:
Fix help not to suppress veteran information for NoVeteran units (since
they may become veteran by other means than experience).

See gna bug #22201.

Modified:
branches/S2_4/client/helpdata.c

Modified: branches/S2_4/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=25186r1=25185r2=25186view=diff
==
--- branches/S2_4/client/helpdata.c (original)
+++ branches/S2_4/client/helpdata.c Tue Jun 17 11:12:05 2014
@@ -1831,7 +1831,7 @@
 char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer,
const char *user_text, struct unit_type *utype)
 {
-  bool can_be_veteran;
+  bool has_vet_levels;
 
   fc_assert_ret_val(NULL != buf  0  bufsz  NULL != user_text, NULL);
 
@@ -1841,8 +1841,7 @@
 return buf;
   }
 
-  can_be_veteran = !utype_has_flag(utype, F_NO_VETERAN)
- utype_veteran_levels(utype)  1;
+  has_vet_levels = utype_veteran_levels(utype)  1;
 
   buf[0] = '\0';
 
@@ -2212,8 +2211,8 @@
   astr_free(list);
 }
   }
-  if (!can_be_veteran) {
-/* Only mention this if the game generally has veteran levels. */
+  if (!has_vet_levels) {
+/* Only mention this if the game generally does have veteran levels. */
 if (game.veteran-levels  1) {
   CATLSTR(buf, bufsz, _(* Will never achieve veteran status.\n));
 }
@@ -2228,7 +2227,8 @@
 #endif
 /* FIXME: if we knew the raise chances on the client, we could be
  * more specific here about whether veteran status can be acquired
- * through combat/missions/work. */
+ * through combat/missions/work. Should also take into account
+ * F_NO_VETERAN when writing this text. (Gna patch #4794) */
 CATLSTR(buf, bufsz, _(* May acquire veteran status.\n));
 if (utype_veteran_has_power_bonus(utype)) {
   if ((!utype_has_flag(utype, F_NUCLEAR)  utype-attack_strength  0)
@@ -2258,7 +2258,7 @@
   if (strlen(buf)  0) {
 CATLSTR(buf, bufsz, \n);
   }
-  if (can_be_veteran  utype-veteran) {
+  if (has_vet_levels  utype-veteran) {
 /* The case where the unit has only a single veteran level has already
  * been handled above, so keep quiet here if that happens */
 if (insert_veteran_help(buf, bufsz, utype-veteran,


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


[Freeciv-commits] r25239 - /trunk/m4/mysql.m4

2014-06-22 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 23 01:03:10 2014
New Revision: 25239

URL: http://svn.gna.org/viewcvs/freeciv?rev=25239view=rev
Log:
Fix typo preventing building against MySQL.

See bug #7.

Modified:
trunk/m4/mysql.m4

Modified: trunk/m4/mysql.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/m4/mysql.m4?rev=25239r1=25238r2=25239view=diff
==
--- trunk/m4/mysql.m4   (original)
+++ trunk/m4/mysql.m4   Mon Jun 23 01:03:10 2014
@@ -30,7 +30,7 @@
 MYSQL_VERSION=`$MYSQL_CONFIG --version`
 
 # remove NDEBUG from MYSQL_CFLAGS
-mysql_cflags=`echo $mysql_cfkags | sed -e 's/-DNDEBUG//g'`
+mysql_cflags=`echo $mysql_cflags | sed -e 's/-DNDEBUG//g'`
 
 found_mysql=yes
 AC_MSG_RESULT([yes])


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


[Freeciv-commits] r25241 - /branches/S2_5/common/terrain.c

2014-06-22 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 23 01:12:14 2014
New Revision: 25241

URL: http://svn.gna.org/viewcvs/freeciv?rev=25241view=rev
Log:
Correct comments describing get_preferred_pillage().

Modified:
branches/S2_5/common/terrain.c

Modified: branches/S2_5/common/terrain.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/terrain.c?rev=25241r1=25240r2=25241view=diff
==
--- branches/S2_5/common/terrain.c  (original)
+++ branches/S2_5/common/terrain.c  Mon Jun 23 01:12:14 2014
@@ -868,10 +868,9 @@
 }
 
 /
-  Returns the highest-priority (best) infrastructure (man-made special) to
-  be pillaged from the terrain set.  May return S_LAST if nothing
-  better is available.
-  Bases are encoded as numbers beyond S_LAST.
+  Determine the highest-priority (best) infrastructure (man-made special) to
+  be pillaged from the terrain set, which is returned in tgt.
+  Returns FALSE if there is nothing to be pillaged.
 /
 bool get_preferred_pillage(struct act_tgt *tgt,
bv_special pset,


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


[Freeciv-commits] r25240 - /branches/S2_5/m4/mysql.m4

2014-06-22 Thread 0jacobnk . gna
Author: jtn
Date: Mon Jun 23 01:12:11 2014
New Revision: 25240

URL: http://svn.gna.org/viewcvs/freeciv?rev=25240view=rev
Log:
Fix typo preventing building against MySQL.

See bug #7.

Modified:
branches/S2_5/m4/mysql.m4

Modified: branches/S2_5/m4/mysql.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/m4/mysql.m4?rev=25240r1=25239r2=25240view=diff
==
--- branches/S2_5/m4/mysql.m4   (original)
+++ branches/S2_5/m4/mysql.m4   Mon Jun 23 01:12:11 2014
@@ -30,7 +30,7 @@
 MYSQL_VERSION=`$MYSQL_CONFIG --version`
 
 # remove NDEBUG from MYSQL_CFLAGS
-mysql_cflags=`echo $mysql_cfkags | sed -e 's/-DNDEBUG//g'`
+mysql_cflags=`echo $mysql_cflags | sed -e 's/-DNDEBUG//g'`
 
 found_mysql=yes
 AC_MSG_RESULT([yes])


___
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] r25282 - /trunk/data/nation/formosan.ruleset

2014-06-26 Thread 0jacobnk . gna
Author: jtn
Date: Thu Jun 26 23:56:54 2014
New Revision: 25282

URL: http://svn.gna.org/viewcvs/freeciv?rev=25282view=rev
Log:
Add missing spaces to Formosan legend added in patch #4292.

Modified:
trunk/data/nation/formosan.ruleset

Modified: trunk/data/nation/formosan.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/formosan.ruleset?rev=25282r1=25281r2=25282view=diff
==
--- trunk/data/nation/formosan.ruleset  (original)
+++ trunk/data/nation/formosan.ruleset  Thu Jun 26 23:56:54 2014
@@ -4,13 +4,13 @@
 plural=_(?plural:Formosans)
 groups=Asian, Ancient, Medieval, Early Modern
 legend=_(Taiwan is home to fourteen officially recognized and twelve 
unrecognized tribes,\
-all of whom are traditionally speakers of a group of Austronesian languages\
-known as Formosan. Historical linguists consider the island to be the home\
-of the Austronesian family, as it is host to the most diverse set of 
Austronesian\
-languages. Many of the tribes are traditionally matrilineal. Starting in the 
17th\
-century, European and East Asian colonists vied for control of the island,\
-encroaching on aboriginal lands. Today, Formosans constitute around 2%\
-of the population of Taiwan.)
+ all of whom are traditionally speakers of a group of Austronesian languages\
+ known as Formosan. Historical linguists consider the island to be the home\
+ of the Austronesian family, as it is host to the most diverse set of 
Austronesian\
+ languages. Many of the tribes are traditionally matrilineal. Starting in the 
17th\
+ century, European and East Asian colonists vied for control of the island,\
+ encroaching on aboriginal lands. Today, Formosans constitute around 2%\
+ of the population of Taiwan.)
 
 leaders = {
 name,sex


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


[Freeciv-commits] r25281 - /trunk/data/nation/

2014-06-26 Thread 0jacobnk . gna
Author: jtn
Date: Thu Jun 26 23:56:51 2014
New Revision: 25281

URL: http://svn.gna.org/viewcvs/freeciv?rev=25281view=rev
Log:
Change Kievan Rus' rule_name back to Ruthenian for backward compatibility
after r23250. (This will not be displayed in the UI.)

See gna bug #22235.

Modified:
trunk/data/nation/gothic.ruleset
trunk/data/nation/khazar.ruleset
trunk/data/nation/lendian.ruleset
trunk/data/nation/ruthenian.ruleset
trunk/data/nation/sarmatian.ruleset
trunk/data/nation/scythian.ruleset
trunk/data/nation/slavic.ruleset
trunk/data/nation/transnistrian.ruleset
trunk/data/nation/ukrainian.ruleset
trunk/data/nation/viking.ruleset
trunk/data/nation/volgagerman.ruleset

Modified: trunk/data/nation/gothic.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/gothic.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/gothic.ruleset(original)
+++ trunk/data/nation/gothic.rulesetThu Jun 26 23:56:51 2014
@@ -34,7 +34,7 @@
 init_units= 
 
 conflicts_with=Ostrogothic, Visigothic, Polish, Lendian, Ukrainian,
- Cossack, Kievan Rus', Slovakian, Romanian, Moldovan, Russian,
+ Cossack, Ruthenian, Slovakian, Romanian, Moldovan, Russian,
  Mazovian, Crimean Tatar
 civilwar_nations=Ostrogothic, Visigothic
 

Modified: trunk/data/nation/khazar.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/khazar.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/khazar.ruleset(original)
+++ trunk/data/nation/khazar.rulesetThu Jun 26 23:56:51 2014
@@ -44,7 +44,7 @@
 init_buildings=
 
 init_units=
-civilwar_nations=volga bulgar, israeli, kievan rus'
+civilwar_nations=volga bulgar, israeli, ruthenian
 
 cities =
 Atil,

Modified: trunk/data/nation/lendian.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/lendian.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/lendian.ruleset   (original)
+++ trunk/data/nation/lendian.ruleset   Thu Jun 26 23:56:51 2014
@@ -26,7 +26,7 @@
 init_buildings=
 init_units=
 conflicts_with = ukrainian
-civilwar_nations = polish, kievan rus', ukrainian
+civilwar_nations = polish, ruthenian, ukrainian
 
 cities =
 Czerwień,

Modified: trunk/data/nation/ruthenian.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/ruthenian.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/ruthenian.ruleset (original)
+++ trunk/data/nation/ruthenian.ruleset Thu Jun 26 23:56:51 2014
@@ -2,6 +2,7 @@
 
 name=_(Kievan Rus')
 plural=_(?plural:Kievan Rus')
+rule_name=Ruthenian
 groups=European, Medieval
 legend=_(The Kievan Rus' were a Medieval Slavic monarchy. It was\
  centered in Kiev after that city was conquered by Oleg of Novgorod.\

Modified: trunk/data/nation/sarmatian.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/sarmatian.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/sarmatian.ruleset (original)
+++ trunk/data/nation/sarmatian.ruleset Thu Jun 26 23:56:51 2014
@@ -32,8 +32,8 @@
 init_techs=
 init_buildings=
 init_units=
-conflicts_with = kazakh, khazar, soviet, kievan rus', russian, 
ukrainian, cossack, crimean tatar
-civilwar_nations = scythian, ossetian, kievan rus', abkhaz, gothic, 
saka
+conflicts_with = kazakh, khazar, soviet, ruthenian, russian, 
ukrainian, cossack, crimean tatar
+civilwar_nations = scythian, ossetian, ruthenian, abkhaz, gothic, 
saka
 
 cities =
 

Modified: trunk/data/nation/scythian.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/scythian.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/scythian.ruleset  (original)
+++ trunk/data/nation/scythian.ruleset  Thu Jun 26 23:56:51 2014
@@ -41,7 +41,7 @@
 init_buildings= 
 init_units= 
 
-conflicts_with=russian, ukrainian, kievan rus'
+conflicts_with=russian, ukrainian, ruthenian
 civilwar_nations=thracian, persian, tocharian, ossetian, sarmatian, 
saka
 
 cities =

Modified: trunk/data/nation/slavic.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/slavic.ruleset?rev=25281r1=25280r2=25281view=diff
==
--- trunk/data/nation/slavic.ruleset(original)
+++ trunk/data/nation/slavic.rulesetThu Jun 26 23:56:51 2014
@@ -41,14 +41,14 @@
 init_buildings=
 init_units=
 
-conflicts_with=Kievan Rus', Russian, Belarusian, Ukrainian,
+conflicts_with=Ruthenian, Russian, Belarusian, Ukrainian,
  Cossack, Slovakian, Moravian, Czech, Lendian, Polish,
  Western 

[Freeciv-commits] r25284 - /trunk/data/civ2civ3/buildings.ruleset

2014-06-26 Thread 0jacobnk . gna
Author: jtn
Date: Thu Jun 26 23:57:00 2014
New Revision: 25284

URL: http://svn.gna.org/viewcvs/freeciv?rev=25284view=rev
Log:
Fix obsolete_by syntax for a couple of civ2civ3 buildings.

See gna bug #22238.

Modified:
trunk/data/civ2civ3/buildings.ruleset

Modified: trunk/data/civ2civ3/buildings.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/buildings.ruleset?rev=25284r1=25283r2=25284view=diff
==
--- trunk/data/civ2civ3/buildings.ruleset   (original)
+++ trunk/data/civ2civ3/buildings.ruleset   Thu Jun 26 23:57:00 2014
@@ -1877,7 +1877,9 @@
 }
 graphic= b.womens_suffrage
 graphic_alt= -
-obsolete_by= None
+obsolete_by=
+{ type, name, range
+}
 build_cost = 600
 upkeep = 0
 sabotage   = 0
@@ -1902,7 +1904,9 @@
 }
 graphic= b.capitalization
 graphic_alt= -
-obsolete_by= None
+obsolete_by=
+{ type, name, range
+}
 build_cost = 999
 upkeep = 0
 sabotage   = 0


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


[Freeciv-commits] r25283 - /trunk/data/nation/lycian.ruleset

2014-06-26 Thread 0jacobnk . gna
Author: jtn
Date: Thu Jun 26 23:56:57 2014
New Revision: 25283

URL: http://svn.gna.org/viewcvs/freeciv?rev=25283view=rev
Log:
Comment out not-yet-added Lydian civilwar nation from Lycian ruleset
added in gna patch #3318.

Modified:
trunk/data/nation/lycian.ruleset

Modified: trunk/data/nation/lycian.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/nation/lycian.ruleset?rev=25283r1=25282r2=25283view=diff
==
--- trunk/data/nation/lycian.ruleset(original)
+++ trunk/data/nation/lycian.rulesetThu Jun 26 23:56:57 2014
@@ -30,7 +30,7 @@
 init_units=
 
 conflicts_with=Turkish, Ottoman, Byzantine
-civilwar_nations = Lydian, Luwian, Hittite, Greek ;carian
+civilwar_nations = Luwian, Hittite, Greek ;Lydian, carian
 
 cities =
 Pttara, ;Patara


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


[Freeciv-commits] r25290 - /trunk/server/techtools.c

2014-06-27 Thread 0jacobnk . gna
Author: jtn
Date: Fri Jun 27 21:09:29 2014
New Revision: 25290

URL: http://svn.gna.org/viewcvs/freeciv?rev=25290view=rev
Log:
Prevent tech loss of tech which is root_req for some other known tech.

Reported by Matthias Pfafferodt (syntron@gna).

See gna bug #19176.

Modified:
trunk/server/techtools.c

Modified: trunk/server/techtools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/techtools.c?rev=25290r1=25289r2=25290view=diff
==
--- trunk/server/techtools.c(original)
+++ trunk/server/techtools.cFri Jun 27 21:09:29 2014
@@ -641,16 +641,26 @@
 static Tech_type_id pick_random_tech_to_lose(struct player* plr)
 {
   bv_techs eligible_techs;
-  int chosen, eligible = 0;
-
-  BV_CLR_ALL(eligible_techs);
+  int chosen, eligible = advance_count();
+
+  BV_SET_ALL(eligible_techs);
 
   advance_index_iterate(A_FIRST, i) {
-/* Never lose self root_req techs */
-if (advance_required(i, AR_ROOT) != i
- player_invention_state(plr, i) == TECH_KNOWN) {
-  BV_SET(eligible_techs, i);
-  eligible++;
+if (player_invention_state(plr, i) != TECH_KNOWN) {
+  if (BV_ISSET(eligible_techs, i)) {
+eligible--;
+BV_CLR(eligible_techs, i);
+  }
+} else {
+  /* Never lose techs that are root_req for a currently known tech
+   * (including self root_req) */
+  Tech_type_id root = advance_required(i, AR_ROOT);
+  if (root != A_NONE) {
+if (BV_ISSET(eligible_techs, root)) {
+  eligible--;
+  BV_CLR(eligible_techs, root);
+}
+  }
 }
   } advance_index_iterate_end;
 
@@ -1294,8 +1304,20 @@
 bool tech_transfer(struct player *plr_recv, struct player *plr_donor,
Tech_type_id tech)
 {
-  if (fc_rand(100)  game.server.techlost_donor) {
-forget_tech_transfered(plr_donor, tech);
+  if (game.server.techlost_donor  0) {
+/* Don't let donor lose tech if it's root_req for some other known
+ * tech */
+bool donor_can_lose = TRUE;
+advance_index_iterate(A_FIRST, i) {
+  if (player_invention_state(plr_donor, i) == TECH_KNOWN
+   advance_required(i, AR_ROOT) == tech) {
+donor_can_lose = FALSE;
+break;
+  }
+} advance_index_iterate_end;
+if (donor_can_lose  fc_rand(100)  game.server.techlost_donor) {
+  forget_tech_transfered(plr_donor, tech);
+}
   }
 
   if (fc_rand(100)  game.server.techlost_recv) {


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


[Freeciv-commits] r25289 - /trunk/server/techtools.c

2014-06-27 Thread 0jacobnk . gna
Author: jtn
Date: Fri Jun 27 21:09:26 2014
New Revision: 25289

URL: http://svn.gna.org/viewcvs/freeciv?rev=25289view=rev
Log:
Prevent tech loss removing self root_req techs.

See bug #22161.

Modified:
trunk/server/techtools.c

Modified: trunk/server/techtools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/techtools.c?rev=25289r1=25288r2=25289view=diff
==
--- trunk/server/techtools.c(original)
+++ trunk/server/techtools.cFri Jun 27 21:09:26 2014
@@ -52,7 +52,7 @@
 /* Define this to add information about tech upkeep. */
 #undef TECH_UPKEEP_DEBUGGING
 
-static Tech_type_id pick_random_tech_researched(struct player* plr);
+static Tech_type_id pick_random_tech_to_lose(struct player* plr);
 static void player_tech_lost(struct player* plr, Tech_type_id tech);
 static void forget_tech_transfered(struct player *pplayer, Tech_type_id tech);
 
@@ -594,7 +594,7 @@
   tech = A_FUTURE;
   research-future_tech--;
 } else {
-  tech = pick_random_tech_researched(plr);
+  tech = pick_random_tech_to_lose(plr);
 
   if (tech != A_NONE) {
 notify_player(plr, NULL, E_TECH_GAIN, ftc_server,
@@ -636,27 +636,33 @@
 }
 
 /
-  Returns a random researched tech.
-/
-static Tech_type_id pick_random_tech_researched(struct player* plr)
-{
-  int chosen, researched = 0;
+  Choose a random tech for player to lose.
+/
+static Tech_type_id pick_random_tech_to_lose(struct player* plr)
+{
+  bv_techs eligible_techs;
+  int chosen, eligible = 0;
+
+  BV_CLR_ALL(eligible_techs);
 
   advance_index_iterate(A_FIRST, i) {
-if (player_invention_state(plr, i) == TECH_KNOWN) {
-  researched++;
+/* Never lose self root_req techs */
+if (advance_required(i, AR_ROOT) != i
+ player_invention_state(plr, i) == TECH_KNOWN) {
+  BV_SET(eligible_techs, i);
+  eligible++;
 }
   } advance_index_iterate_end;
 
-  if (researched == 0) {
-/* no technology at all */
+  if (eligible == 0) {
+/* no researched technology at all */
 return A_NONE;
   }
 
-  chosen = fc_rand(researched) + 1;
+  chosen = fc_rand(eligible) + 1;
 
   advance_index_iterate(A_FIRST, i) {
-if (player_invention_state(plr, i) == TECH_KNOWN) {
+if (BV_ISSET(eligible_techs, i)) {
   chosen--;
   if (chosen == 0) {
 return i;


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


[Freeciv-commits] r25292 - /branches/S2_5/server/techtools.c

2014-06-27 Thread 0jacobnk . gna
Author: jtn
Date: Fri Jun 27 21:11:59 2014
New Revision: 25292

URL: http://svn.gna.org/viewcvs/freeciv?rev=25292view=rev
Log:
Prevent tech loss of tech which is root_req for some other known tech.

Reported by Matthias Pfafferodt (syntron@gna).

See gna bug #19176.

Modified:
branches/S2_5/server/techtools.c

Modified: branches/S2_5/server/techtools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/techtools.c?rev=25292r1=25291r2=25292view=diff
==
--- branches/S2_5/server/techtools.c(original)
+++ branches/S2_5/server/techtools.cFri Jun 27 21:11:59 2014
@@ -560,16 +560,26 @@
 static Tech_type_id pick_random_tech_to_lose(struct player* plr)
 {
   bv_techs eligible_techs;
-  int chosen, eligible = 0;
-
-  BV_CLR_ALL(eligible_techs);
+  int chosen, eligible = advance_count();
+
+  BV_SET_ALL(eligible_techs);
 
   advance_index_iterate(A_FIRST, i) {
-/* Never lose self root_req techs */
-if (advance_required(i, AR_ROOT) != i
- player_invention_state(plr, i) == TECH_KNOWN) {
-  BV_SET(eligible_techs, i);
-  eligible++;
+if (player_invention_state(plr, i) != TECH_KNOWN) {
+  if (BV_ISSET(eligible_techs, i)) {
+eligible--;
+BV_CLR(eligible_techs, i);
+  }
+} else {
+  /* Never lose techs that are root_req for a currently known tech
+   * (including self root_req) */
+  Tech_type_id root = advance_required(i, AR_ROOT);
+  if (root != A_NONE) {
+if (BV_ISSET(eligible_techs, root)) {
+  eligible--;
+  BV_CLR(eligible_techs, root);
+}
+  }
 }
   } advance_index_iterate_end;
 
@@ -1221,8 +1231,20 @@
 bool tech_transfer(struct player *plr_recv, struct player *plr_donor,
Tech_type_id tech)
 {
-  if (fc_rand(100)  game.server.techlost_donor) {
-forget_tech_transfered(plr_donor, tech);
+  if (game.server.techlost_donor  0) {
+/* Don't let donor lose tech if it's root_req for some other known
+ * tech */
+bool donor_can_lose = TRUE;
+advance_index_iterate(A_FIRST, i) {
+  if (player_invention_state(plr_donor, i) == TECH_KNOWN
+   advance_required(i, AR_ROOT) == tech) {
+donor_can_lose = FALSE;
+break;
+  }
+} advance_index_iterate_end;
+if (donor_can_lose  fc_rand(100)  game.server.techlost_donor) {
+  forget_tech_transfered(plr_donor, tech);
+}
   }
 
   if (fc_rand(100)  game.server.techlost_recv) {


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


[Freeciv-commits] r25291 - /branches/S2_5/server/techtools.c

2014-06-27 Thread 0jacobnk . gna
Author: jtn
Date: Fri Jun 27 21:11:56 2014
New Revision: 25291

URL: http://svn.gna.org/viewcvs/freeciv?rev=25291view=rev
Log:
Prevent tech loss removing self root_req techs.

See bug #22161.

Modified:
branches/S2_5/server/techtools.c

Modified: branches/S2_5/server/techtools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/techtools.c?rev=25291r1=25290r2=25291view=diff
==
--- branches/S2_5/server/techtools.c(original)
+++ branches/S2_5/server/techtools.cFri Jun 27 21:11:56 2014
@@ -51,7 +51,7 @@
 /* Define this to add information about tech upkeep. */
 #undef TECH_UPKEEP_DEBUGGING
 
-static Tech_type_id pick_random_tech_researched(struct player* plr);
+static Tech_type_id pick_random_tech_to_lose(struct player* plr);
 static void player_tech_lost(struct player* plr, Tech_type_id tech);
 static void forget_tech_transfered(struct player *pplayer, Tech_type_id tech);
 
@@ -513,7 +513,7 @@
   tech = A_FUTURE;
   research-future_tech--;
 } else {
-  tech = pick_random_tech_researched(plr);
+  tech = pick_random_tech_to_lose(plr);
 
   if (tech != A_NONE) {
 notify_player(plr, NULL, E_TECH_GAIN, ftc_server,
@@ -555,27 +555,33 @@
 }
 
 /
-  Returns a random researched tech.
-/
-static Tech_type_id pick_random_tech_researched(struct player* plr)
-{
-  int chosen, researched = 0;
+  Choose a random tech for player to lose.
+/
+static Tech_type_id pick_random_tech_to_lose(struct player* plr)
+{
+  bv_techs eligible_techs;
+  int chosen, eligible = 0;
+
+  BV_CLR_ALL(eligible_techs);
 
   advance_index_iterate(A_FIRST, i) {
-if (player_invention_state(plr, i) == TECH_KNOWN) {
-  researched++;
+/* Never lose self root_req techs */
+if (advance_required(i, AR_ROOT) != i
+ player_invention_state(plr, i) == TECH_KNOWN) {
+  BV_SET(eligible_techs, i);
+  eligible++;
 }
   } advance_index_iterate_end;
 
-  if (researched == 0) {
-/* no technology at all */
+  if (eligible == 0) {
+/* no researched technology at all */
 return A_NONE;
   }
 
-  chosen = fc_rand(researched) + 1;
+  chosen = fc_rand(eligible) + 1;
 
   advance_index_iterate(A_FIRST, i) {
-if (player_invention_state(plr, i) == TECH_KNOWN) {
+if (BV_ISSET(eligible_techs, i)) {
   chosen--;
   if (chosen == 0) {
 return i;


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


  1   2   3   4   5   6   7   8   9   10   >