Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2005:
[Freeciv-Dev] (PR#13880) demystify AI messages
Home

[Freeciv-Dev] (PR#13880) demystify AI messages

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13880) demystify AI messages
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 5 Sep 2005 19:18:03 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13880 >

All sorts of messages use the player name.  This is quite mystifying 
since it's not easy to remember the player names for all nations (by 
comparison it is easy to associate the nation name with the flag you see 
on the map).  This is particularly a problem in games with lots of 
nations and particularly a problem with the growing number of nations we 
have.

This patch fixes a small set of AI messages in this way.  Obviously all 
AI messages should be consistent.  I'm not going to change all of them 
so I hand this over to Per.

-jason

Index: ai/advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.90
diff -p -u -r1.90 advdiplomacy.c
--- ai/advdiplomacy.c   5 Sep 2005 04:21:54 -0000       1.90
+++ ai/advdiplomacy.c   6 Sep 2005 02:07:58 -0000
@@ -1135,41 +1135,47 @@ void static war_countdown(struct player 
     case WAR_REASON_SPACE:
       notify(ally, _("*%s (AI)* We will be launching an all-out war "
                      "against %s in %d turns to stop the spaceship "
-                     "launch."), pplayer->name, target->name, countdown);
+                     "launch."),
+            pplayer->nation->name, target->nation->name, countdown);
       notify(ally, _("*%s (AI)* Your aid in this matter will be expected. "
-                     "Long live our glorious alliance!"), pplayer->name);
+                     "Long live our glorious alliance!"),
+            pplayer->nation->name);
       break;
     case WAR_REASON_BEHAVIOUR:
     case WAR_REASON_EXCUSE:
       notify(ally, _("*%s (AI)* %s has grossly violated his treaties with us "
                      "for own gain.  We will answer in force in %d turns " 
                      "and expect you to honour your alliance with us and do "
-                     "likewise!"), pplayer->name, target->name, countdown);
+                     "likewise!"),
+            pplayer->nation->name, target->nation->name, countdown);
       break;
     case WAR_REASON_NONE:
       notify(ally, _("*%s (AI)* We intend to pillage and plunder the rich "
                      "civilization of %s. We declare war in %d turns."), 
-                     pplayer->name, target->name, countdown);
+                     pplayer->nation->name, target->nation->name, countdown);
       notify(ally, _("*%s (AI)* If you want a piece of the loot, feel "
-                     "free to join in the action!"), pplayer->name);
+                     "free to join in the action!"), pplayer->nation->name);
       break;
     case WAR_REASON_HATRED:
-      notify(ally, _("*%s (AI)* We have had it with %s. Let us tear this "
-                     "pathetic civilization apart. We declare war in %d "
-                     "turns."), pplayer->name, target->name, countdown);
+      notify(ally,
+            
+            _("*%s (AI)* We have had it with %s. Let us tear this "
+              "pathetic civilization apart. We declare war in %d "
+              "turns."),
+            pplayer->nation->name, target->nation->name, countdown);
       notify(ally, _("*%s (AI)* As our glorious allies, we expect your "
-                     "help in this war."), pplayer->name);
+                     "help in this war."), pplayer->nation->name);
       break;
     case WAR_REASON_ALLIANCE:
       if (WAR(ally, target)) {
         notify(ally, _("*%s (AI)* We will honour our alliance and declare "
                        "war on %s in %d turns.  Hold on - we are coming!"),
-                       pplayer->name, target->name, countdown);
+                       pplayer->nation->name, target->name, countdown);
       } else if (adip->at_war_with_ally) {
         notify(ally, _("*%s (AI)* We will honour our alliance with %s and "
                        "declare war on %s in %d turns.  We expect you to "
-                       "do likewise."), pplayer->name, 
-                       adip->at_war_with_ally->name, target->name,
+                       "do likewise."), pplayer->nation->name, 
+                       adip->at_war_with_ally->name, target->nation->name,
                        countdown);
       } else {
         assert(FALSE); /* Huh? */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13880) demystify AI messages, Jason Short <=