Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12723) Even nicer AI debugging
Home

[Freeciv-Dev] (PR#12723) Even nicer AI debugging

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12723) Even nicer AI debugging
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 13:03:46 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Now in the messages dialog where you can use 'go to position' and 'view
city'!

  - Per

Index: ai/ailog.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/ailog.c,v
retrieving revision 1.22
diff -u -r1.22 ailog.c
--- ai/ailog.c  21 Mar 2005 14:10:53 -0000      1.22
+++ ai/ailog.c  5 Apr 2005 20:02:26 -0000
@@ -65,7 +65,7 @@
 
   cat_snprintf(buffer, sizeof(buffer), buffer2);
   if (BV_ISSET(pplayer->debug, PLAYER_DEBUG_TECH)) {
-    notify_conn(game.est_connections, buffer);
+    notify_conn_ex(game.est_connections, NULL, E_AI_DEBUG, buffer);
   }
   freelog(minlevel, buffer);
 }
@@ -110,7 +110,7 @@
 
   cat_snprintf(buffer, sizeof(buffer), buffer2);
   if (BV_ISSET(pplayer->debug, PLAYER_DEBUG_DIPLOMACY)) {
-    notify_conn(game.est_connections, buffer);
+    notify_conn_ex(game.est_connections, NULL, E_AI_DEBUG, buffer);
   }
   freelog(minlevel, buffer);
 }
@@ -144,7 +144,7 @@
 
   cat_snprintf(buffer, sizeof(buffer), buffer2);
   if (pcity->debug) {
-    notify_conn(game.est_connections, buffer);
+    notify_conn_ex(game.est_connections, pcity->tile, E_AI_DEBUG, buffer);
   }
   freelog(minlevel, buffer);
 }
@@ -200,7 +200,7 @@
 
   cat_snprintf(buffer, sizeof(buffer), buffer2);
   if (punit->debug || messwin) {
-    notify_conn(game.est_connections, buffer);
+    notify_conn_ex(game.est_connections, punit->tile, E_AI_DEBUG, buffer);
   }
   freelog(minlevel, buffer);
 }
@@ -244,7 +244,7 @@
              s, id, ptile->x, ptile->y);
   cat_snprintf(buffer, sizeof(buffer), msg);
   if (punit->debug) {
-    notify_conn(game.est_connections, buffer);
+    notify_conn_ex(game.est_connections, punit->tile, E_AI_DEBUG, buffer);
   }
   freelog(minlevel, buffer);
 }
@@ -282,7 +282,7 @@
   clear_timer_start(t);
   cat_snprintf(buffer, sizeof(buffer), msg);
   if (srvarg.timing_debug) {
-    notify_conn(game.est_connections, buffer);
+    notify_conn_ex(game.est_connections, NULL, E_AI_DEBUG, buffer);
   }
   freelog(minlevel, buffer);
 }
Index: common/events.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/events.h,v
retrieving revision 1.27
diff -u -r1.27 events.h
--- common/events.h     6 Mar 2004 11:13:05 -0000       1.27
+++ common/events.h     5 Apr 2005 20:02:26 -0000
@@ -107,6 +107,7 @@
   E_DIPLOMACY,
   E_CITY_PRODUCTION_CHANGED,
   E_TREATY_EMBASSY,
+  E_AI_DEBUG,
   /* 
    * Note: If you add a new event, make sure you make a similar change
    * to the events array in client/options.c using GEN_EV and to
Index: client/options.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.c,v
retrieving revision 1.124
diff -u -r1.124 options.c
--- client/options.c    15 Feb 2005 16:40:40 -0000      1.124
+++ client/options.c    5 Apr 2005 20:02:27 -0000
@@ -367,6 +367,7 @@
   GEN_EV(N_("Diplomatic Message"),                    E_DIPLOMACY),
   GEN_EV(N_("City: Production changed"),              
E_CITY_PRODUCTION_CHANGED),
   GEN_EV(N_("Treaty: Embassy"),                       E_TREATY_EMBASSY),
+  GEN_EV(N_("AI debugging"),                          E_AI_DEBUG),
   GEN_EV_TERMINATOR
 };
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12723) Even nicer AI debugging, Per I. Mathisen <=