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

 It bothers me that when I'm considering different tech goals, I get
message to message window for each click I make.
 I found out that this message is using same event as tech gained from
Great Library. I don't want to turn those messages off!
 This patch adds separate event for tech goal changes.


 - ML

diff -Nurd -X.diff_ignore freeciv/common/events.c freeciv/common/events.c
--- freeciv/common/events.c	2007-03-05 21:11:49.000000000 +0200
+++ freeciv/common/events.c	2007-03-10 23:43:43.000000000 +0200
@@ -111,6 +111,7 @@
   GEN_EV(N_("Improvement: Sold"),                     E_IMP_SOLD),
   GEN_EV(N_("Tech: Learned From Great Library"),      E_TECH_GAIN),
   GEN_EV(N_("Tech: Learned New Tech"),                E_TECH_LEARNED),
+  GEN_EV(N_("Tech: Selected new goal"),               E_TECH_GOAL),
   GEN_EV(N_("Treaty: Alliance"),                      E_TREATY_ALLIANCE),
   GEN_EV(N_("Treaty: Broken"),                        E_TREATY_BROKEN),
   GEN_EV(N_("Treaty: Cease-fire"),                    E_TREATY_CEASEFIRE),
diff -Nurd -X.diff_ignore freeciv/common/events.h freeciv/common/events.h
--- freeciv/common/events.h	2007-03-05 21:11:49.000000000 +0200
+++ freeciv/common/events.h	2007-03-10 23:58:04.000000000 +0200
@@ -15,6 +15,9 @@
 
 #include "shared.h"          /* bool type */
 
+/* Add new event types to the end. Client saves message settings by
+ * type number and installing new event type in between would cause
+ * erronous loading of existing .civclientrc */
 enum event_type {
   E_CITY_CANTBUILD,
   E_CITY_LOST,
@@ -117,6 +120,7 @@
   E_CONNECTION, /* Messages about acquired or lost connections */
   E_AI_DEBUG, /* AI debugging messages */
   E_PLAYER_SETTINGS, /* taxes etc */
+  E_TECH_GOAL,       /* Changed tech goal */
   /* 
    * Note: If you add a new event, make sure you make a similar change
    * to the events array in common/events.c using GEN_EV and to
diff -Nurd -X.diff_ignore freeciv/server/techtools.c freeciv/server/techtools.c
--- freeciv/server/techtools.c	2007-03-05 21:09:47.000000000 +0200
+++ freeciv/server/techtools.c	2007-03-10 23:56:08.000000000 +0200
@@ -561,7 +561,7 @@
     /* It's been suggested that if the research target is empty then
      * choose_random_tech should be called here. */
     research->tech_goal = tech;
-    notify_research(plr, E_TECH_GAIN /* ? */,
+    notify_research(plr, E_TECH_GOAL,
 		    _("Technology goal is %s."),
 		    get_tech_name(plr, tech));
   }
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to