Author: sveinung
Date: Tue Aug 16 04:33:44 2016
New Revision: 33605

URL: http://svn.gna.org/viewcvs/freeciv?rev=33605&view=rev
Log:
Introduce a beginner help event type.

Experienced players can get annoyed by message spam telling them things they
already know or can tell. Beginners may like this sort of help. Introduce an
event type for messages like this so experienced players can filter them.

Its only message for now explains how to select a target tile for "Do...".

See patch #7601

Modified:
    trunk/client/control.c
    trunk/common/events.c
    trunk/common/events.h
    trunk/data/misc/events.spec
    trunk/data/stdsounds.soundspec
    trunk/fc_version

Modified: trunk/client/control.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=33605&r1=33604&r2=33605&view=diff
==============================================================================
--- trunk/client/control.c      (original)
+++ trunk/client/control.c      Tue Aug 16 04:33:44 2016
@@ -3080,6 +3080,12 @@
     return;
   }
 
+  create_event(unit_tile(unit_list_get(punits, 0)), E_BEGINNER_HELP,
+               ftc_client,
+               /* TRANS: "Do..." action selection dialog target. */
+               _("Click on a tile to act against it. "
+                 "Press 'd' again to act against own tile."));
+
   set_hover_state(punits, HOVER_ACT_SEL_TGT, ACTIVITY_LAST, NULL,
                   EXTRA_NONE, ACTION_COUNT, ORDER_LAST);
 }

Modified: trunk/common/events.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/events.c?rev=33605&r1=33604&r2=33605&view=diff
==============================================================================
--- trunk/common/events.c       (original)
+++ trunk/common/events.c       Tue Aug 16 04:33:44 2016
@@ -214,7 +214,8 @@
   GEN_EV(E_DEPRECATION_WARNING, E_S_XYZZY,     N_("Deprecated Modpack syntax 
warnings")),
   GEN_EV(E_SPONTANEOUS_EXTRA,   E_S_XYZZY,      N_("Extra Appears or 
Disappears")),
   GEN_EV(E_UNIT_ILLEGAL_ACTION, E_S_UNIT,       N_("Unit Illegal Action")),
-  GEN_EV(E_UNIT_ESCAPED, E_S_UNIT,       N_("Unit escaped"))
+  GEN_EV(E_UNIT_ESCAPED,        E_S_UNIT,       N_("Unit escaped")),
+  GEN_EV(E_BEGINNER_HELP,       E_S_XYZZY,      N_("Help for beginners")),
   /* The sound system also generates "e_game_quit", although there's no
    * corresponding identifier E_GAME_QUIT. */
 };

Modified: trunk/common/events.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/events.h?rev=33605&r1=33604&r2=33605&view=diff
==============================================================================
--- trunk/common/events.h       (original)
+++ trunk/common/events.h       Tue Aug 16 04:33:44 2016
@@ -162,6 +162,8 @@
 #define SPECENUM_VALUE124 E_UNIT_ACTION_FAILED
 #define SPECENUM_VALUE125 E_UNIT_ESCAPED
 #define SPECENUM_VALUE126 E_DEPRECATION_WARNING
+/* Used for messages about things experienced players already know. */
+#define SPECENUM_VALUE127 E_BEGINNER_HELP
 /*
  * 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, to

Modified: trunk/data/misc/events.spec
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/events.spec?rev=33605&r1=33604&r2=33605&view=diff
==============================================================================
--- trunk/data/misc/events.spec (original)
+++ trunk/data/misc/events.spec Tue Aug 16 04:33:44 2016
@@ -159,6 +159,7 @@
   4, 15, "e_log_fatal"
   4, 15, "e_chat_error"
   4, 16, "e_bad_command"
+  4, 14, "e_beginner_help"  ; PLACEHOLDER
 
   4, 17,  "e_game_start"
   4, 18,  "e_next_year"

Modified: trunk/data/stdsounds.soundspec
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stdsounds.soundspec?rev=33605&r1=33604&r2=33605&view=diff
==============================================================================
--- trunk/data/stdsounds.soundspec      (original)
+++ trunk/data/stdsounds.soundspec      Tue Aug 16 04:33:44 2016
@@ -202,6 +202,7 @@
 ;e_ai_debug = ""
 ;e_anarchy = ""
 e_bad_command = "stdsounds/illegal.ogg" ; [fcol]
+;e_beginner_help = ""
 ;e_broadcast_report = ""
 ;e_caravan_action = ""
 ;e_chat_error = ""

Modified: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=33605&r1=33604&r2=33605&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Tue Aug 16 04:33:44 2016
@@ -56,7 +56,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Aug.04"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Aug.16"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to