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

On 3/11/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
>  This patch adds separate event for tech goal changes.

 - Updated against svn
 - Capitalized First Letter Of Every Word In Event Description Like In
Other Events


 - ML

diff -Nurd -X.diff_ignore freeciv/common/events.c freeciv/common/events.c
--- freeciv/common/events.c	2007-03-14 13:44:42.000000000 +0200
+++ freeciv/common/events.c	2007-03-14 17:14:25.000000000 +0200
@@ -113,6 +113,7 @@
   GEN_EV(N_("Improvement"), N_("Sold"),                     E_IMP_SOLD),
   GEN_EV(N_("Tech"), N_("Learned From Great Library"),      E_TECH_GAIN),
   GEN_EV(N_("Tech"), N_("Learned New Tech"),                E_TECH_LEARNED),
+  GEN_EV(N_("Tech"), N_("Selected New Goal"),               E_TECH_GOAL),
   GEN_EV(N_("Treaty"), N_("Alliance"),                      E_TREATY_ALLIANCE),
   GEN_EV(N_("Treaty"), N_("Broken"),                        E_TREATY_BROKEN),
   GEN_EV(N_("Treaty"), N_("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-14 17:12:57.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-14 17:12:57.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