Re: [Freeciv-Dev] svn problems [was (PR#39367) 2.1.0b4 nation trivial errors]

2007-05-19 Thread William Allen Simpson
Per Inge Mathisen wrote:
 On 5/18/07, William Allen Simpson [EMAIL PROTECTED] wrote:
  Here's the first installment on trivial nation fixes for 2.1.0b4 and 
 trunk.
 
 Most of the S2_1 changes were already done (please 'svn up' before
 making the patch), and the rest would invalidate the translations,
 which is bad at this stage of the release process. So I just committed
 the trunk patch.
 
Aha, of course I was making patches for the released 2.1.0b4 source.

I'd found no prior references on this list to these specific fixes, so
somebody sensibly made the trivial patches for S2_1 without telling us.

===

I've been trying for many hours to checkout S2_1, and got these errors:

svn co svn://svn.gna.org/svn/freeciv/branches/S2_1 S2_1
svn: Malformed network data
!!
svn co svn://svn.gna.org/svn/freeciv/branches/S2_1 S2_1
svn: Malformed network data
!!
svn co svn://svn.gna.org/svn/freeciv/branches/S2_1 S2_1
svn: Malformed network data
!!
svn co svn://svn.gna.org/svn/freeciv/branches/S2_1 S2_1
AS2_1/m4
...
AS2_1/po
svn: Connection closed unexpectedly
cd S2_1
svn up
Apo/cs.po
...
Updated to revision 12963.
svn up
At revision 12963.

===

And just so you know it wasn't a fluke, I did it twice.  The other time,
it pooped out at:

...
AS2_1/po/uk.po
svn: Connection closed unexpectedly
cd S2_1
svn up
Apo/ro.po
...
Updated to revision 12963.
svn up
svn: Malformed network data
svn up
svn: Malformed network data

===

Anyway, I'll begin testing with the S2_1 branch, and I'll post future
patches against the branch instead of the release.

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


Re: [Freeciv-Dev] (PR#39370) 2.1.0b4 city vision radius too small

2007-05-19 Thread Per I. Mathisen

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39370 

On Sat, 19 May 2007, William Allen Simpson wrote:
 Building civ1 cities didn't reveal unexplored areas!  So, my version
 with the configuration line is better for backward compatibility.

I do not see why we should worry about that. It is nice that people can 
play mods that feel like Civ1/2 with Freeciv, but we do not need to 
support all kinds of small oddball configurations and/or bugs that people 
scarcely even remember from civ1/2.

Given how many bugs we have and have had related to vision, I think we 
need to move toward making it simpler, rather than making it more complex.

   - Per



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


[Freeciv-Dev] (PR#39375) map.generator = 3

2007-05-19 Thread Pepeto _

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39375 

Is this a bug you can change all geological settings, the generator doesn't 
generate a different kind of map? For example, set steepness 100, you will 
have less mountains than with steepness 30.

_
Avec Windows Live OneCare éliminez tous les virus de votre PC ! 
http://www.windowslive.fr/liveonecare/default.asp



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


[Freeciv-Dev] (PR#8398) Patch to remove ceasefire countdown

2007-05-19 Thread Per I. Mathisen

URL: http://bugs.freeciv.org/Ticket/Display.html?id=8398 

This patch removes the countdown for ceasefire, and so fixes the
request in this ticket. It also makes ceasefire breakable by Republic
and Democracy, and adds some extra text for armistice in the client.

  - Per

Index: server/srv_main.c
===
--- server/srv_main.c	(revision 12962)
+++ server/srv_main.c	(working copy)
@@ -452,8 +452,8 @@
 }
 
 /**
-  Check for cease-fires and armistices running out; update cancelling 
-  reasons and contact information.
+  Check for armistices running out; update cancelling reasons and contact 
+  information.
 **/
 static void update_diplomatics(void)
 {
@@ -475,50 +475,6 @@
   remove_illegal_armistice_units(plr1, plr2);
 }
   }
-
-  if (state-type == DS_CEASEFIRE) {
-state-turns_left--;
-switch(state-turns_left) {
-case 1:
-  notify_player(plr1, NULL, E_DIPLOMACY,
-_(Concerned citizens point out that the cease-fire 
-  with %s will run out soon.), plr2-name);
-  notify_player(plr2, NULL, E_DIPLOMACY,
-_(Concerned citizens point out that the cease-fire 
-  with %s will run out soon.), plr1-name);
-  break;
-case 0:
-  notify_player(plr1, NULL, E_DIPLOMACY, _(The cease-fire with 
-%s has run out. You are now at war with the %s.),
-plr2-name, get_nation_name_plural(plr2-nation));
-  notify_player(plr2, NULL, E_DIPLOMACY, _(The cease-fire with 
-%s has run out. You are now at war with the %s.),
-plr1-name, get_nation_name_plural(plr1-nation));
-  state-type = DS_WAR;
-  state2-type = DS_WAR;
-  state-turns_left = 0;
-  state2-turns_left = 0;
-  check_city_workers(plr1);
-  check_city_workers(plr2);
-
-  /* Avoid love-love-hate triangles */
-  players_iterate(plr3) {
-if (plr3-is_alive  plr3 != plr1  plr3 != plr2
- pplayers_allied(plr3, plr1)
- pplayers_allied(plr3, plr2)) {
-  notify_player(plr3, NULL, E_TREATY_BROKEN,
-_(Ceasefire between %s and %s has run out. 
-  They are at war. You cancel your alliance 
-  with both.), plr1-name, plr2-name);
-  plr3-diplstates[plr1-player_no].has_reason_to_cancel = TRUE;
-  plr3-diplstates[plr2-player_no].has_reason_to_cancel = TRUE;
-  handle_diplomacy_cancel_pact(plr3, plr1-player_no, CLAUSE_ALLIANCE);
-  handle_diplomacy_cancel_pact(plr3, plr2-player_no, CLAUSE_ALLIANCE);
-}
-  } players_iterate_end;
-  break;
-}
-  }
 } players_iterate_end;
   } players_iterate_end;
 }
Index: server/diplhand.c
===
--- server/diplhand.c	(revision 12962)
+++ server/diplhand.c	(working copy)
@@ -422,9 +422,7 @@
 	}
   case CLAUSE_CEASEFIRE:
 	pgiver-diplstates[pdest-player_no].type=DS_CEASEFIRE;
-	pgiver-diplstates[pdest-player_no].turns_left = TURNS_LEFT;
 	pdest-diplstates[pgiver-player_no].type=DS_CEASEFIRE;
-	pdest-diplstates[pgiver-player_no].turns_left = TURNS_LEFT;
 	notify_player(pgiver, NULL, E_TREATY_CEASEFIRE,
 			 _(You agree on a cease-fire with %s.),
 			 pdest-name);
Index: common/player.c
===
--- common/player.c	(revision 12962)
+++ common/player.c	(working copy)
@@ -62,6 +62,7 @@
 return DIPL_ERROR;
   }
   if (p1-diplstates[p2-player_no].has_reason_to_cancel == 0
+   ds != DS_CEASEFIRE
get_player_bonus(p1, EFT_HAS_SENATE)  0
get_player_bonus(p1, EFT_ANY_GOVERNMENT) == 0) {
 return DIPL_SENATE_BLOCKING;
Index: client/text.c
===
--- client/text.c	(revision 12962)
+++ client/text.c	(working copy)
@@ -116,12 +116,12 @@
 } else if (owner) {
   struct player_diplstate *ds = game.player_ptr-diplstates;
 
-  if (ds[owner-player_no].type == DS_CEASEFIRE) {
+  if (ds[owner-player_no].type == DS_ARMISTICE) {
 	int turns = ds[owner-player_no].turns_left;
 
-	/* TRANS: Polish territory (5 turn cease-fire) */
-	astr_add_line(str, PL_(%s territory (%d turn cease-fire),
-%s territory (%d turn cease-fire),
+	/* TRANS: Polish territory (5 turn armistice) */
+	astr_add_line(str, PL_(%s territory (%d turn armistice),
+%s territory (%d turn armistice),
 turns),
 		  get_nation_name(owner-nation), turns);
   } else {
@@ -151,12 +151,12 @@
 } else {
   struct 

[Freeciv-Dev] (PR#11508) New toy: The antimatter bomb

2007-05-19 Thread Per I. Mathisen

URL: http://bugs.freeciv.org/Ticket/Display.html?id=11508 

I refreshed this patch because I needed it for testing. 

Turns out it is somewhat harder to turn terrain into ocean in the more
recent code, since we do not really have an 'ocean' tile anymore (there
could be several). So I just transformed terrain one step toward wetter,
where possible. Not nearly as impressive as the previous version :(

  - Per
Index: server/unittools.c
===
--- server/unittools.c	(revision 12962)
+++ server/unittools.c	(working copy)
@@ -2013,12 +2013,13 @@
 
 /**
   Nuke a square: 1) remove all units on the square, and 2) halve the 
-  size of the city on the square.
+  size of the city on the square, if nuke, or destroy it, if antimatter.
 
   If it isn't a city square or an ocean square then with 50% chance add 
   some fallout, then notify the client about the changes.
 **/
-static void do_nuke_tile(struct player *pplayer, struct tile *ptile)
+static void do_nuke_tile(struct player *pplayer, struct tile *ptile, 
+ bool antimatter)
 {
   struct city *pcity = tile_get_city(ptile);
 
@@ -2038,20 +2039,36 @@
   } unit_list_iterate_safe_end;
 
   if (pcity) {
-notify_player(city_owner(pcity),
-		 ptile, E_CITY_NUKED,
-		 _(%s was nuked by %s.),
-		 pcity-name,
-		 pplayer == city_owner(pcity) ? _(yourself) : pplayer-name);
+if (antimatter) {
+  notify_player(city_owner(pcity), ptile, E_CITY_NUKED,
+_(%s was obliterated by %s.),
+pcity-name, pplayer == pcity-owner
+? _(yourself) : pplayer-name);
+  if (city_owner(pcity) != pplayer) {
+notify_player(pplayer, ptile, E_CITY_NUKED,
+  _(You obliterated %s.), pcity-name);
+  }
+  remove_city(pcity);
+} else {
+  notify_player(city_owner(pcity), ptile, E_CITY_NUKED,
+_(%s was nuked by %s.), pcity-name,
+pplayer == pcity-owner ? _(yourself) : pplayer-name);
 
-if (city_owner(pcity) != pplayer) {
-  notify_player(pplayer,
-		   ptile, E_CITY_NUKED,
-		   _(You nuked %s.),
-		   pcity-name);
+  if (city_owner(pcity) != pplayer) {
+notify_player(pplayer, ptile, E_CITY_NUKED, _(You nuked %s.),
+  pcity-name);
+  }
+  city_reduce_size(pcity, pcity-size / 2);
 }
+  }
 
-city_reduce_size(pcity, pcity-size / 2);
+  if (antimatter  !is_ocean(tile_get_terrain(ptile))  myrand(4) == 1
+   ptile-terrain-warmer_wetter_result) {
+struct terrain *old = tile_get_terrain(ptile);
+
+tile_change_terrain(ptile, ptile-terrain-warmer_wetter_result);
+check_terrain_change(ptile, old);
+update_tile_knowledge(ptile);
   }
 
   if (!is_ocean(tile_get_terrain(ptile))  myrand(2) == 1) {
@@ -2073,7 +2090,8 @@
   Nuke all the squares in a 3x3 square around the center of the explosion
   pplayer is the player that caused the explosion.
 **/
-void do_nuclear_explosion(struct player *pplayer, struct tile *ptile)
+void do_nuclear_explosion(struct player *pplayer, struct tile *ptile,
+  bool antimatter)
 {
   if (ptile-owner) {
 ai_incident_nuclear(pplayer, ptile-owner);
@@ -2084,11 +2102,16 @@
   }
 
   square_iterate(ptile, 1, ptile1) {
-do_nuke_tile(pplayer, ptile1);
+do_nuke_tile(pplayer, ptile1, antimatter);
   } square_iterate_end;
 
-  notify_conn(NULL, ptile, E_NUKE,
-		 _(%s detonated a nuke!), pplayer-name);
+  if (antimatter) {
+notify_conn(NULL, ptile, E_NUKE,
+_(%s detonated an antimatter bomb!), pplayer-name);
+  } else {
+notify_conn(NULL, ptile, E_NUKE,
+_(%s detonated a nuke!), pplayer-name);
+  }
 }
 
 /**
Index: server/unittools.h
===
--- server/unittools.h	(revision 12962)
+++ server/unittools.h	(working copy)
@@ -80,7 +80,8 @@
 void unit_goes_out_of_sight(struct player *pplayer, struct unit *punit);
 
 /* doing a unit activity */
-void do_nuclear_explosion(struct player *pplayer, struct tile *ptile);
+void do_nuclear_explosion(struct player *pplayer, struct tile *ptile,
+  bool antimatter);
 bool do_airline(struct unit *punit, struct city *city2);
 bool do_paradrop(struct unit *punit, struct tile *ptile);
 void load_unit_onto_transporter(struct unit *punit, struct unit *ptrans);
Index: server/unithand.c
===
--- server/unithand.c	(revision 12962)
+++ server/unithand.c	(working copy)
@@ -776,29 +776,33 @@
 	or cease-fire at %i, %i, 

Re: [Freeciv-Dev] (PR#39375) map.generator = 3

2007-05-19 Thread Peter Schaefer

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39375 

Settings for generator 1 don't have a direct meaning for other
generators. Some of them will be translated and used but even then the
results don't match 100%

On 5/19/07, Pepeto _ [EMAIL PROTECTED] wrote:

 URL: http://bugs.freeciv.org/Ticket/Display.html?id=39375 

 Is this a bug you can change all geological settings, the generator doesn't
 generate a different kind of map? For example, set steepness 100, you will
 have less mountains than with steepness 30.

 _
 Avec Windows Live OneCare éliminez tous les virus de votre PC !
 http://www.windowslive.fr/liveonecare/default.asp



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




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


Re: [Freeciv-Dev] svn problems [was (PR#39367) 2.1.0b4 nation

2007-05-19 Thread Eddie_Anderson
William Allen Simpson [EMAIL PROTECTED] wrote:
===

I've been trying for many hours to checkout S2_1, and got these errors:

svn co svn://svn.gna.org/svn/freeciv/branches/S2_1 S2_1
svn: Malformed network data
!!

This may have nothing to do with the errors that you're getting
but I received similar errors from svn about 9 months ago.  I was
doing a checkout of the trunk and the problem was a very large file.
IIRC I circumvented the problem by creating a file with the same
name within my local copy.   See RT 20100 for more info.

Maybe there is a large file in the po directory that is causing
the same problem for you?

HTH.

-Eddie



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


Re: [Freeciv-Dev] (PR#39370) 2.1.0b4 city vision radius too small

2007-05-19 Thread William Allen Simpson

URL: http://bugs.freeciv.org/Ticket/Display.html?id=39370 

Per I. Mathisen wrote:
 I do not see why we should worry about that. It is nice that people can 
 play mods that feel like Civ1/2 with Freeciv, but we do not need to 
 support all kinds of small oddball configurations and/or bugs that people 
 scarcely even remember from civ1/2.
 
Admittedly, I played 1  2 so long ago that my memory is failing. ;-)

I'm assuming that you are old enough to have played civ1 regularly for
years (and civnet against multiple players), followed by more years
playing civ2.

I'm pretty sure the original freeciv authors disagree that the basic
visual operation of civ12 was oddball.  They went to some lengths to
reflect the actual historic functionality.

Indeed, my suggestion was *NOT* that the old functionality go away, but
that it should not be hard-coded -- a simple knob I proposed be added to
allow civ34 behavior.

Although I've only been on the mailing list for 18 months or so, and
rarely contribute, I've some recollection that you worked on adding many
knobs generalizing formerly hard-coded constants and functionality.  I'm
trying to cooperate in the same way.


 Given how many bugs we have and have had related to vision, I think we 
 need to move toward making it simpler, rather than making it more complex.
 
While hard-coding a behavior is simpler, it doesn't reflect my
understanding of the purpose of the project: the Good Parts Version of
the entire civ series with superior networking ability, and (hopefully)
improved AI, running on multiple platforms.

The old civ12 vision has been in the code and working for some time.

I'm actually quite disappointed about the recent removing of basic
functionality of civ12, such as reputation, temporary cease fire,
Fundamentalism, etc.

I'm even more disappointed that civ3 hasn't yet been added.  But one
thing at a time :-)



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


[Freeciv-Dev] current trunk compile failure(s)

2007-05-19 Thread William Allen Simpson
I've been waiting around several days to see whether somebody fixes this?


registry.c: In function `section_file_save':
registry.c:816: error: `BUG_URL' undeclared (first use in this function)
registry.c:816: error: (Each undeclared identifier is reported only once
registry.c:816: error: for each function it appears in.)

svn log utility/registry.c

r12957 | per | 2007-05-17 12:24:54 -0400 (Thu, 17 May 2007) | 2 lines

Replace bug email with bug URL. See PR#39329.

svn diff -r12955:12963 utility/registry.c
Index: utility/registry.c
===
--- utility/registry.c  (revision 12955)
+++ utility/registry.c  (revision 12963)
@@ -813,8 +813,7 @@
   avoid this make sure all rows of a table are filled\n
   out with an entry for every column.  This is surely\n
   a bug so if you're reading this message, report it\n
- to [EMAIL PROTECTED],
- real_filename, psection-name, expect);
+ at %s, real_filename, psection-name, expect, BUG_URL);
   fz_fprintf(fs, \n);
 }
 fz_fprintf(fs, }\n);


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