Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#9926) logging in apply_result
Home

[Freeciv-Dev] (PR#9926) logging in apply_result

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9926) logging in apply_result
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 3 Sep 2004 15:23:29 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9926 >

This patch adds some useful logs in apply_result.  See also PR#9563.

jason

Index: client/agents/cma_core.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_core.c,v
retrieving revision 1.61
diff -u -r1.61 cma_core.c
--- client/agents/cma_core.c    23 Jul 2004 05:06:12 -0000      1.61
+++ client/agents/cma_core.c    3 Sep 2004 22:22:52 -0000
@@ -225,6 +225,7 @@
   my_city_map_iterate(pcity, x, y) {
     if ((pcity->city_map[x][y] == C_TILE_WORKER) &&
        !result->worker_positions_used[x][y]) {
+      freelog(APPLY_RESULT_LOG_LEVEL, "Removing worker at %d,%d.", x, y);
       last_request_id = city_toggle_worker(pcity, x, y);
       if (first_request_id == 0) {
        first_request_id = last_request_id;
@@ -236,6 +237,8 @@
   assert(SP_ELVIS == 0);
   for (sp = 1; sp < SP_COUNT; sp++) {
     for (i = 0; i < pcity->specialists[sp] - result->specialists[sp]; i++) {
+      freelog(APPLY_RESULT_LOG_LEVEL, "Change specialist from %d to %d.",
+             sp, SP_ELVIS);
       last_request_id = city_change_specialist(pcity, sp, SP_ELVIS);
       if (first_request_id == 0) {
        first_request_id = last_request_id;
@@ -252,6 +255,7 @@
     if (result->worker_positions_used[x][y] &&
        pcity->city_map[x][y] != C_TILE_WORKER) {
       assert(pcity->city_map[x][y] == C_TILE_EMPTY);
+      freelog(APPLY_RESULT_LOG_LEVEL, "Putting worker at %d,%d.", x, y);
       last_request_id = city_toggle_worker(pcity, x, y);
       if (first_request_id == 0) {
        first_request_id = last_request_id;
@@ -264,6 +268,8 @@
   assert(SP_ELVIS == 0);
   for (sp = 1; sp < SP_COUNT; sp++) {
     for (i = 0; i < result->specialists[sp] - pcity->specialists[sp]; i++) {
+      freelog(APPLY_RESULT_LOG_LEVEL, "Changing specialist from %d to %d.",
+             SP_ELVIS, sp);
       last_request_id = city_change_specialist(pcity, SP_ELVIS, sp);
       if (first_request_id == 0) {
        first_request_id = last_request_id;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9926) logging in apply_result, Jason Short <=