[Freeciv-Dev] (PR#34436) techs.ruleset cleanup

2007-01-24 Thread Daniel Markstedt

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

This patch removes a number of disabled techs in civ1 and default (all
civ2-only techs). I see no reason to keep them around cluttering the
ruleset.

My guess is that this is an artifact from the time when techs were
hard-coded.

 ~Daniel



tech_ruleset_cleanup.diff
Description: Binary data
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: (PR#17436) Re: [Freeciv-Dev] (PR#33883) server select duplicate nation

2007-01-24 Thread Marko Lindqvist

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

On 1/19/07, Marko Lindqvist [EMAIL PROTECTED] wrote:
 On 1/19/07, Marko Lindqvist [EMAIL PROTECTED] wrote:
   handle_nation_select_req() always marks players previous nation
  available. This is not right when nation is not changed, but only
  leader name or sex. player_set_nation() sets nation-player correctly,
  so handle_nation_select_req() should not directly touch it at all.

  Patch

 S2_0 version


 - ML

diff -Nurd -X.diff_ignore freeciv/server/srv_main.c freeciv/server/srv_main.c
--- freeciv/server/srv_main.c	2007-01-13 08:20:29.0 +0200
+++ freeciv/server/srv_main.c	2007-01-24 16:25:16.0 +0200
@@ -1304,7 +1304,7 @@
 			  Nation_type_id nation_no, bool is_male,
 			  char *name, int city_style)
 {
-  struct nation_type *old_nation, *new_nation;
+  struct nation_type *new_nation;
   struct player *pplayer = get_player(player_no);
 
   if (server_state != PRE_GAME_STATE || !pplayer) {
@@ -1315,7 +1315,6 @@
 return;
   }
 
-  old_nation = pplayer-nation;
   new_nation = get_nation_by_idx(nation_no);
 
   if (new_nation != NO_NATION_SELECTED) {
@@ -1362,10 +1361,6 @@
 
   (void) player_set_nation(pplayer, new_nation);
   send_player_info_c(pplayer, game.est_connections);
-
-  if (old_nation != NO_NATION_SELECTED) {
-old_nation-player = NULL;
-  }
 }
 
 /
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#34446) [Patch] sdl_get_tile_defense_info_text() BF_DEFENSE_BONUS

2007-01-24 Thread Marko Lindqvist

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

 Check against BF_DEFENSE_BONUS instead of presence of S_FORTRESS.


 - ML

diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/dialogs.c freeciv/client/gui-sdl/dialogs.c
--- freeciv/client/gui-sdl/dialogs.c	2007-01-22 20:12:13.0 +0200
+++ freeciv/client/gui-sdl/dialogs.c	2007-01-24 17:12:30.0 +0200
@@ -790,7 +790,7 @@
   if(tile_has_special(ptile, S_RIVER)) {
 bonus += terrain_control.river_defense_bonus;
   }
-  if(tile_has_special(ptile, S_FORTRESS)) {
+  if(tile_has_base_flag(ptile, BF_DEFENSE_BONUS)) {
 bonus += terrain_control.fortress_defense_bonus;
   }
   my_snprintf(buffer, sizeof(buffer), Terrain Defense Bonus: +%d%% , bonus);
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#34276) clients default to the wrong port

2007-01-24 Thread Egor Vyscrebentsov

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

On Tue, 23 Jan 2007 Kevin Benton wrote:

  [dmarks - Mon Jan 22 01:37:38 2007]:
  On 1/22/07, Marko Lindqvist [EMAIL PROTECTED] wrote:
   On 1/22/07, Daniel Markstedt [EMAIL PROTECTED] wrote:
The default port has changed from  to 5556, but the clients
(tested with GTK2 and SDL) still default to .
  
You probably have old port number stored in ~/.civclientrc
 
  Then I suppose this is bound to happen for everyone who updates.
  Suggest making a FAQ entry on it!

 Rather than making a FAQ entry on it and calling it quits, why not offer
 to update the .civclientrc for the user during the upgrade?  That would
 take care of the largest part of the users who never really cared what
 port number FC uses.

This can be done at first launch with old .civclientrc (looking to [civclient] 
version parameter less than 2.1.0). One more reason for this is an amplio
tileset (which is _not a default_ if we already have .civclientrc).

--
Thanks, evyscr



pgpeu3vMA8vvU.pgp
Description: PGP signature
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#34457) [Patch] UCF_CAN_OCCUPY units as Ransom collectors

2007-01-24 Thread Marko Lindqvist

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

 Instead of checking if is_ground_unit() or is_heli_unit(), check for
UCF_CAN_OCCUPY. Using same flag for two different things might be bad,
but creating separate flag just for this seemed waste.


 - ML

diff -Nurd -X.diff_ignore freeciv/common/unittype.h freeciv/common/unittype.h
--- freeciv/common/unittype.h	2007-01-23 16:05:15.0 +0200
+++ freeciv/common/unittype.h	2007-01-24 18:41:17.0 +0200
@@ -28,7 +28,7 @@
 enum unit_class_flag_id {
   UCF_TERRAIN_SPEED = 0,
   UCF_DAMAGE_SLOWS,
-  UCF_CAN_OCCUPY,
+  UCF_CAN_OCCUPY, /* Can occupy enemy cities and collect ransom */
   UCF_MISSILE,
   UCF_ROAD_NATIVE,
   UCF_BUILD_ANYWHERE,
diff -Nurd -X.diff_ignore freeciv/data/civ1/units.ruleset freeciv/data/civ1/units.ruleset
--- freeciv/data/civ1/units.ruleset	2007-01-23 16:05:14.0 +0200
+++ freeciv/data/civ1/units.ruleset	2007-01-24 18:43:03.0 +0200
@@ -62,6 +62,7 @@
 ; TerrainSpeed  = Units use terrain spesific speed
 ; DamageSlows   = Damages units are slowed down
 ; CanOccupy = Military units of this class can occupy enemy cities
+;   and collect ransom from barbarian leaders
 ; Missile   = Unit is destroyed when it attacks
 ; RoadNative= Road tiles are always considered native terrain
 ; BuildAnywhere = Unit can be built even in the middle of non-native terrain
diff -Nurd -X.diff_ignore freeciv/data/civ2/units.ruleset freeciv/data/civ2/units.ruleset
--- freeciv/data/civ2/units.ruleset	2007-01-23 16:05:15.0 +0200
+++ freeciv/data/civ2/units.ruleset	2007-01-24 18:42:22.0 +0200
@@ -62,6 +62,7 @@
 ; TerrainSpeed  = Units use terrain spesific speed
 ; DamageSlows   = Damages units are slowed down
 ; CanOccupy = Military units of this class can occupy enemy cities
+;   and collect ransom from barbarian leaders
 ; Missile   = Unit is destroyed when it attacks
 ; RoadNative= Road tiles are always considered native terrain
 ; BuildAnywhere = Unit can be built even in the middle of non-native terrain
diff -Nurd -X.diff_ignore freeciv/data/default/units.ruleset freeciv/data/default/units.ruleset
--- freeciv/data/default/units.ruleset	2007-01-23 16:05:15.0 +0200
+++ freeciv/data/default/units.ruleset	2007-01-24 18:42:09.0 +0200
@@ -68,6 +68,7 @@
 ; TerrainSpeed  = Units use terrain spesific speed
 ; DamageSlows   = Damages units are slowed down
 ; CanOccupy = Military units of this class can occupy enemy cities
+;   and collect ransom from barbarian leaders
 ; Missile   = Unit is destroyed when it attacks
 ; RoadNative= Road tiles are always considered native terrain
 ; BuildAnywhere = Unit can be built even in the middle of non-native terrain
diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c	2007-01-22 22:06:23.0 +0200
+++ freeciv/server/unittools.c	2007-01-24 18:40:22.0 +0200
@@ -1619,7 +1619,9 @@
   /* barbarian leader ransom hack */
   if( is_barbarian(pplayer)  unit_has_role(punit-type, L_BARBARIAN_LEADER)
(unit_list_size(punit-tile-units) == 1)
-   (is_ground_unit(pkiller) || is_heli_unit(pkiller)) ) {
+   unit_class_flag(get_unit_class(unit_type(pkiller)),
+ UCF_CAN_OCCUPY)) {
+/* Occupying units can collect ransom if leader is alone in the tile */
 ransom = (pplayer-economic.gold = game.info.ransom_gold) 
  ? game.info.ransom_gold : pplayer-economic.gold;
 notify_player(destroyer, pkiller-tile, E_UNIT_WIN_ATT,
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev