Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
[Freeciv-Dev] Re: Need more city names?
Home

[Freeciv-Dev] Re: Need more city names?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Need more city names?
From: "Daniel Deckers" <fh5y076@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Nov 1998 16:27:58 +0100 (MET)

Hi,

now that Falk's patch does away with the lack of city-names, may I suggest
three tiny changes (patch to recent CVS + Falk's "more citynames" patch):

- The rename dialog now actually suggests a new name (if you wish to retain
  the old name, you can just press cancel anyways).

- Try to create shorter names for new cities first.

- Make the ai rename any city it conquers (I find this creates less of a
  mess in games with several ai players; what do others think?)

Dan


>>><<<
--- freeciv/client/citydlg.c
+++ freeciv/client/citydlg.c
@@ -866,7 +866,7 @@
   input_dialog_create(pdialog->shell, 
                      "shellrenamecity", 
                      "What should we rename the city to?",
-                     pdialog->pcity->name,
+                     
city_name_suggestion(&game.players[pdialog->pcity->owner]),
                      (void*)rename_city_callback, (XtPointer)pdialog,
                      (void*)rename_city_callback, (XtPointer)0);
 }
--- freeciv/common/city.c
+++ freeciv/common/city.c
@@ -420,7 +420,7 @@
        tempname[++c] = citynames[p + 1];
     } while(tempname[c] != '\n');
     tempname[c] = 0;
-    if (strlen(tempname) < 16 && !game_find_city_by_name(tempname))
+    if (strlen(tempname) < 9+i/100 && !game_find_city_by_name(tempname))
       return tempname;
   }
   
--- freeciv/server/unithand.c
+++ freeciv/server/unithand.c
@@ -1042,6 +1042,8 @@
           light_square(pplayer, x+pnewcity->x-2, y+pnewcity->y-2, 0);
         }
       }
+      strcpy(pnewcity->name, city_name_suggestion(pplayer));
+      /* rename the city */
     }
 
 /* maybe should auto_arr or otherwise reset ->worked? -- Syela */

>>><<<
-- 
Daniel_Deckers@xxxxxxxxxxxxxxxxxxxxx


[Prev in Thread] Current Thread [Next in Thread]